Ad
  • Default User Avatar

    @AndrewSouthpaw

    I guess it would have to be changed because if there is some other column that gets added to the table, then we would have to update the query and select the newly added column as well.

    If we use select ALL(select * ) we won't have to edit the query, as it selects all the columns there are to select.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    How do I return a new column without creating one?

  • Default User Avatar

    I used CREATE TABLE with IF NOT EXISTS clause and I am getting following error in the log :

    An error occurred while loading ./spec/query_spec.rb.
    Failure/Error:
      it "Testing for move(#{tests[i][0]}, #{tests[i][1]})" do
        expect(x[:res]).to eq tests[i][2]
      end
    
    NoMethodError:
      undefined method '[]' for nil:NilClass
    # ./spec/support/preloaded.rb:14:in 'block in run_tests'
    # ./spec/support/preloaded.rb:13:in 'each'
    # ./spec/support/preloaded.rb:13:in 'each_with_index'
    # ./spec/support/preloaded.rb:13:in 'run_tests'
    # ./spec/query_spec.rb:10:in 'block in <top (required)>'
    # ./spec/query_spec.rb:9:in '<top (required)>'