Includes a qualify
and []
methods that create QualifiedIdentifier
s, used for qualifying column names with a table or table names with a schema, and the * method for returning all columns in the identifier if no arguments are given.
Public Instance methods
*(ce=(arg=false;nil))
If no arguments are given, return an SQL::ColumnAll
:
Sequel[:a].* # a.*
[show source]
# File lib/sequel/sql.rb 924 def *(ce=(arg=false;nil)) 925 if arg == false 926 Sequel::SQL::ColumnAll.new(self) 927 else 928 super(ce) 929 end 930 end
[](identifier)
Qualify the receiver with the given qualifier
(table for column/schema for table).
Sequel[:table][:column] # "table"."column" Sequel[:schema][:table] # "schema"."table" Sequel[:schema][:table][:column] # "schema"."table"."column"
[show source]
# File lib/sequel/sql.rb 946 def [](identifier) 947 QualifiedIdentifier.new(self, identifier) 948 end
qualify(qualifier)
Qualify the receiver with the given qualifier
(table for column/schema for table).
Sequel[:column].qualify(:table) # "table"."column" Sequel[:table].qualify(:schema) # "schema"."table" Sequel.qualify(:table, :column).qualify(:schema) # "schema"."table"."column"
[show source]
# File lib/sequel/sql.rb 937 def qualify(qualifier) 938 QualifiedIdentifier.new(qualifier, self) 939 end