Sequel extends Hash to add methods to implement the SQL DSL.
# File lib/sequel/deprecated_core_extensions.rb, line 44 def &(ce) Sequel::Deprecation.deprecate('Hash#&', 'Please use Sequel.& instead, or Sequel.extension(:core_extensions) to continue using it') ::Sequel::SQL::BooleanExpression.new(:AND, self, ce) end
# File lib/sequel/deprecated_core_extensions.rb, line 59 def case(*args) Sequel::Deprecation.deprecate('Hash#case', 'Please use Sequel.case instead, or Sequel.extension(:core_extensions) to continue using it') ::Sequel::SQL::CaseExpression.new(to_a, *args) end
Create a new HStore using the receiver as the input hash. Note that the HStore created will not use the receiver as the backing store, since it has to modify the hash. To get the new backing store, use:
hash.hstore.to_hash
# File lib/sequel/extensions/pg_hstore.rb, line 339 def hstore Sequel::Postgres::HStore.new(self) end
Return a Sequel::Postgres::JSONHash proxy to the receiver. This is mostly useful as a short cut for creating JSONHash objects that didn't come from the database.
# File lib/sequel/extensions/pg_json.rb, line 217 def pg_json Sequel::Postgres::JSONHash.new(self) end
# File lib/sequel/deprecated_core_extensions.rb, line 64 def sql_expr Sequel::Deprecation.deprecate('Hash#sql_expr', 'Please use Sequel.expr instead, or Sequel.extension(:core_extensions) to continue using it') ::Sequel::SQL::BooleanExpression.from_value_pairs(self) end
# File lib/sequel/deprecated_core_extensions.rb, line 69 def sql_negate Sequel::Deprecation.deprecate('Hash#sql_negate', 'Please use Sequel.negate instead, or Sequel.extension(:core_extensions) to continue using it') ::Sequel::SQL::BooleanExpression.from_value_pairs(self, :AND, true) end
# File lib/sequel/deprecated_core_extensions.rb, line 74 def sql_or Sequel::Deprecation.deprecate('Hash#sql_or', 'Please use Sequel.or instead, or Sequel.extension(:core_extensions) to continue using it') ::Sequel::SQL::BooleanExpression.from_value_pairs(self, :OR) end
Generated with the Darkfish Rdoc Generator 2.