Module: BigQueryAdapter::Quoting

Included in:
ActiveRecord::ConnectionAdapters::BigQueryAdapter
Defined in:
lib/big_query_adapter/quoting.rb

Overview

Includes helper methods

Instance Method Summary collapse

Instance Method Details

#quote_string(string) ⇒ Object

Quotes a string, escaping any ‘ (single quote) characters.



5
6
7
# File 'lib/big_query_adapter/quoting.rb', line 5

def quote_string(string)
  string.gsub(/\'/, "''")
end

#quote_table_name(table_name) ⇒ Object

Quotes the table name. Defaults to column name quoting.



10
11
12
# File 'lib/big_query_adapter/quoting.rb', line 10

def quote_table_name(table_name)
  "`#{table_name}`"
end