class Symbol

  1. lib/sequel/extensions/core_extensions.rb
  2. lib/sequel/extensions/pg_array_ops.rb
  3. lib/sequel/extensions/pg_hstore_ops.rb
  4. lib/sequel/extensions/pg_inet_ops.rb
  5. lib/sequel/extensions/pg_json_ops.rb
  6. lib/sequel/extensions/pg_range_ops.rb
  7. lib/sequel/extensions/pg_row_ops.rb
  8. lib/sequel/extensions/symbol_aref.rb
  9. lib/sequel/extensions/symbol_as.rb
  10. show all
Superclass: Object

Sequel extends Symbol to add methods to implement the SQL DSL.

Methods

Public Instance

  1. []
  2. identifier
  3. sql_function

Included modules

  1. Sequel::SQL::CastMethods
  2. Sequel::SQL::OrderMethods
  3. Sequel::SQL::BooleanMethods
  4. Sequel::SQL::NumericMethods
  5. Sequel::SQL::QualifyingMethods
  6. Sequel::SQL::StringMethods
  7. Sequel::SQL::SubscriptMethods
  8. Sequel::SQL::ComplexExpressionMethods
  9. Sequel::Postgres::ArrayOpMethods
  10. Sequel::Postgres::HStoreOpMethods
  11. Sequel::Postgres::InetOpMethods
  12. Sequel::Postgres::JSONOpMethods
  13. Sequel::Postgres::RangeOpMethods
  14. Sequel::Postgres::PGRowOp::ExpressionMethods
  15. Sequel::SQL::AliasMethods

Public Instance methods

[](v)
[show source]
   # File lib/sequel/extensions/symbol_aref.rb
44 def [](v)
45   case v
46   when Symbol, Sequel::SQL::Identifier, Sequel::SQL::QualifiedIdentifier
47     Sequel::SQL::QualifiedIdentifier.new(self, v)
48   else
49     aref_before_sequel(v)
50   end
51 end
identifier()

Returns receiver wrapped in an Sequel::SQL::Identifier.

:a.identifier # SQL: "a"
[show source]
    # File lib/sequel/extensions/core_extensions.rb
209 def identifier
210   Sequel::SQL::Identifier.new(self)
211 end
sql_function(*args)

Returns a Sequel::SQL::Function with this as the function name, and the given arguments.

:now.sql_function # SQL: now()
:sum.sql_function(:a) # SQL: sum(a)
:concat.sql_function(:a, :b) # SQL: concat(a, b)
[show source]
    # File lib/sequel/extensions/core_extensions.rb
219 def sql_function(*args)
220   Sequel::SQL::Function.new(self, *args)
221 end