class Identifier
Represents one or more identifiers for databases, tables or columns.
Definitions
def self.coerce(name_or_identifier)
Convert various input types to an Identifier instance.
Signature
-
parameter
name_or_identifier
Identifier, Array, Symbol, String
The value to convert.
-
returns
Identifier
An Identifier instance.
Implementation
def self.coerce(name_or_identifier)
case name_or_identifier
when Identifier
name_or_identifier
when Array
self.new(name_or_identifier)
when Symbol
self[name_or_identifier]
else
self[name_or_identifier.to_sym]
end
end
def append_to(query)
Append this identifier to the provided query builder.
Signature
-
parameter
query
Query
The query builder to append to.
Implementation
def append_to(query)
query.identifier(self)
end