Class | Sequel::SQL::VirtualRow |
In: |
lib/sequel_core/sql.rb
|
Parent: | BasicObject |
An instance of this class is yielded to the block supplied to filter. Useful if another library also defines the operator methods that Sequel defines for symbols.
Examples:
ds = DB[:t] ds.filter{|r| r.name < 2} # SELECT * FROM t WHERE (name < 2) ds.filter{|r| r.table__column + 1 < 2} # SELECT * FROM t WHERE ((table.column + 1) < 2) ds.filter{|r| r.is_active(1, 'arg2')} # SELECT * FROM t WHERE is_active(1, 'arg2')
Can return Identifiers, QualifiedIdentifiers, or Functions:
# File lib/sequel_core/sql.rb, line 841 841: def method_missing(m, *args) 842: if args.empty? 843: table, column = m.to_s.split('__', 2) 844: column ? QualifiedIdentifier.new(table, column) : Identifier.new(m) 845: else 846: Function.new(m, *args) 847: end 848: end