Method: Sequel::Postgres::DatabaseMethods#values
- Defined in:
- lib/sequel/adapters/shared/postgres.rb
#values(v) ⇒ Object
Creates a dataset that uses the VALUES clause:
DB.values([[1, 2], [3, 4]])
# VALUES ((1, 2), (3, 4))
DB.values([[1, 2], [3, 4]]).order(:column2).limit(1, 1)
# VALUES ((1, 2), (3, 4)) ORDER BY column2 LIMIT 1 OFFSET 1
887 888 889 890 |
# File 'lib/sequel/adapters/shared/postgres.rb', line 887 def values(v) raise Error, "Cannot provide an empty array for values" if v.empty? @default_dataset.clone(:values=>v) end |