Module: ActiveRecord::ConnectionAdapters::Quoting::ClassMethods

Defined in:
lib/active_record/connection_adapters/spanner/quoting.rb

Instance Method Summary collapse

Instance Method Details

#quote_column_name(name) ⇒ Object

This is used for ActiveRecord v8 and higher.



39
40
41
# File 'lib/active_record/connection_adapters/spanner/quoting.rb', line 39

def quote_column_name name
  QUOTED_COLUMN_NAMES[name] ||= "`#{name.to_s.gsub '`', '``'}`".freeze
end

#quote_table_name(name) ⇒ Object



43
44
45
# File 'lib/active_record/connection_adapters/spanner/quoting.rb', line 43

def quote_table_name name
  QUOTED_TABLE_NAMES[name] ||= "`#{name.to_s.gsub '.', '`.`'}`".freeze
end