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 921 def *(ce=(arg=false;nil)) 922 if arg == false 923 Sequel::SQL::ColumnAll.new(self) 924 else 925 super(ce) 926 end 927 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 943 def [](identifier) 944 QualifiedIdentifier.new(self, identifier) 945 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 934 def qualify(qualifier) 935 QualifiedIdentifier.new(qualifier, self) 936 end