Sequel extends Array to add methods to implement the SQL DSL. Most of these methods require that the array not be empty and that it must consist solely of other arrays that have exactly two elements.
# File lib/sequel/deprecated_core_extensions.rb, line 11 def case(*args) Sequel::Deprecation.deprecate('Array#case', 'Please use Sequel.case instead, or Sequel.extension(:core_extensions) to continue using it') ::Sequel::SQL::CaseExpression.new(self, *args) end
Return a PGArray proxy to the receiver, using a specific database type if given. This is mostly useful as a short cut for creating PGArray objects that didn't come from the database.
# File lib/sequel/extensions/pg_array.rb, line 599 def pg_array(type=nil) Sequel::Postgres::PGArray.new(self, type) end
Return a Sequel::Postgres::JSONArray proxy to the receiver. This is mostly useful as a short cut for creating JSONArray objects that didn't come from the database.
# File lib/sequel/extensions/pg_json.rb, line 208 def pg_json Sequel::Postgres::JSONArray.new(self) end
Wraps the receiver in an anonymous Sequel::Postgres::PGRow::ArrayRow instance.
# File lib/sequel/extensions/pg_row.rb, line 596 def pg_row Sequel::Postgres::PGRow::ArrayRow.new(self) end
# File lib/sequel/deprecated_core_extensions.rb, line 22 def sql_expr Sequel::Deprecation.deprecate('Array#sql_expr', 'Please use Sequel.expr instead, or Sequel.extension(:core_extensions) to continue using it') Sequel.expr(self) end
# File lib/sequel/deprecated_core_extensions.rb, line 27 def sql_negate Sequel::Deprecation.deprecate('Array#sql_negate', 'Please use Sequel.negate instead, or Sequel.extension(:core_extensions) to continue using it') Sequel.negate(self) end
# File lib/sequel/deprecated_core_extensions.rb, line 32 def sql_or Sequel::Deprecation.deprecate('Array#sql_or', 'Please use Sequel.or instead, or Sequel.extension(:core_extensions) to continue using it') Sequel.or(self) end
# File lib/sequel/deprecated_core_extensions.rb, line 37 def sql_string_join(joiner=nil) Sequel::Deprecation.deprecate('Array#sql_string_join', 'Please use Sequel.join instead, or Sequel.extension(:core_extensions) to continue using it') Sequel.join(self, joiner) end
# File lib/sequel/deprecated_core_extensions.rb, line 16 def sql_value_list Sequel::Deprecation.deprecate('Array#sql_value_list/Array#sql_array', 'Please use Sequel.value_list instead, or Sequel.extension(:core_extensions) to continue using it') ::Sequel::SQL::ValueList.new(self) end
Generated with the Darkfish Rdoc Generator 2.