Method: Sequel::Dataset#quote_identifier_append

Defined in:
lib/sequel/dataset/sql.rb

#quote_identifier_append(sql, name) ⇒ Object

Append literalization of unqualified identifier to SQL string. Adds quoting to identifiers (columns and tables). If identifiers are not being quoted, returns name as a string. If identifiers are being quoted quote the name with quoted_identifier.



688
689
690
691
692
693
694
695
696
697
698
699
700
# File 'lib/sequel/dataset/sql.rb', line 688

def quote_identifier_append(sql, name)
  name = name.value if name.is_a?(SQL::Identifier)
  if name.is_a?(LiteralString)
    sql << name
  else
    name = input_identifier(name)
    if quote_identifiers?
      quoted_identifier_append(sql, name)
    else
      sql << name
    end
  end
end