module Sequel::SQL::QualifyingMethods

  1. lib/sequel/sql.rb
Parent: SQL

Includes a qualify method that created QualifiedIdentifiers, 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.

Methods

Public Instance

  1. *
  2. qualify

Public Instance methods

* (ce=(arg=false;nil))

If no arguments are given, return an SQL::ColumnAll:

Sequel.expr(:a__b).*  # a.b.*
[show source]
# File lib/sequel/sql.rb, line 852
def *(ce=(arg=false;nil))
  if arg == false
    Sequel::SQL::ColumnAll.new(self)
  else
    super(ce)
  end
end
qualify (qualifier)

Qualify the receiver with the given qualifier (table for column/schema for table).

Sequel.expr(:column).qualify(:table) # "table"."column"
Sequel.expr(:table).qualify(:schema) # "schema"."table"
Sequel.qualify(:table, :column).qualify(:schema) # "schema"."table"."column"
[show source]
# File lib/sequel/sql.rb, line 865
def qualify(qualifier)
  QualifiedIdentifier.new(qualifier, self)
end