class Symbol

  1. lib/sequel/extensions/core_extensions.rb
  2. lib/sequel/extensions/is_distinct_from.rb
  3. lib/sequel/extensions/pg_array_ops.rb
  4. lib/sequel/extensions/pg_hstore_ops.rb
  5. lib/sequel/extensions/pg_inet_ops.rb
  6. lib/sequel/extensions/pg_json_ops.rb
  7. lib/sequel/extensions/pg_range_ops.rb
  8. lib/sequel/extensions/pg_row_ops.rb
  9. lib/sequel/extensions/sqlite_json_ops.rb
  10. lib/sequel/extensions/symbol_aref.rb
  11. lib/sequel/extensions/symbol_as.rb
  12. 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::SQL::IsDistinctFrom::Methods
  10. Sequel::Postgres::ArrayOpMethods
  11. Sequel::Postgres::HStoreOpMethods
  12. Sequel::Postgres::InetOpMethods
  13. Sequel::Postgres::JSONOpMethods
  14. Sequel::Postgres::RangeOpMethods
  15. Sequel::Postgres::PGRowOp::ExpressionMethods
  16. Sequel::SQLite::JSONOpMethods
  17. Sequel::SQL::AliasMethods

Public Instance methods

[](v)
[show source]
   # File lib/sequel/extensions/symbol_aref.rb
45 def [](v)
46   case v
47   when Symbol, Sequel::SQL::Identifier, Sequel::SQL::QualifiedIdentifier
48     Sequel::SQL::QualifiedIdentifier.new(self, v)
49   else
50     aref_before_sequel(v)
51   end
52 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