Sha256: 04a3ae646d592d84620415d2f4154bbf7c84b461ce6ccdec9847a6ad85fc1432

Contents?: true

Size: 342 Bytes

Versions: 1

Compression:

Stored size: 342 Bytes

Contents

module BigQueryAdapter
  # Includes helper methods
  module Quoting
    # Quotes a string, escaping any ' (single quote) characters.
    def quote_string(string)
      string.gsub(/\'/, "''")
    end

    # Quotes the table name. Defaults to column name quoting.
    def quote_table_name(table_name)
      "`#{table_name}`"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
big_query_adapter-0.1.0 lib/big_query_adapter/quoting.rb