Includes a qualify
method that created
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.
If no arguments are given, return an SQL::ColumnAll:
Sequel[:a__b].* # a.b.*
# File lib/sequel/sql.rb, line 952 def *(ce=(arg=false;nil)) if arg == false Sequel::SQL::ColumnAll.new(self) else super(ce) end end
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"
# File lib/sequel/sql.rb, line 974 def [](identifier) QualifiedIdentifier.new(self, identifier) end
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"
# File lib/sequel/sql.rb, line 965 def qualify(qualifier) QualifiedIdentifier.new(qualifier, self) end