Could you provide a minimal working example (a code example to see what you want and if possible without )?
I'm guessing what you do:
require 'sequel'
db = Sequel.sqlite()
db.create_table(:test){
field :x1
field :x2
}
db[:test].insert(1,2)
p db.run('select * from test') #->nil
If you don't use run
but []
you get another result:
p db['select * from test'] #-> #<Sequel::SQLite::Dataset: "select * from test">
Based on this solution you can use columns
to get the fields:
p db['select * from test'].columns #->[:x1, :x2]
p db['select x1 from test'].columns #->[:x1]