Sha256: 3aa61b31f2cdc6c986bae6bf4b9d0b3764afd4f32eff948e9bfedee8f44e4cb1
Contents?: true
Size: 796 Bytes
Versions: 4
Compression:
Stored size: 796 Bytes
Contents
require 'upsert/merge_function/postgresql' class Upsert class MergeFunction # @private class Java_OrgPostgresqlJdbc_PgConnection < MergeFunction ERROR_CLASS = org.postgresql.util.PSQLException include Postgresql def execute_parameterized(query, args = []) query_args = [] query = query.gsub(/\$(\d+)/) do |str| query_args << args[Regexp.last_match[1].to_i - 1] "?" end controller.connection.execute(query, query_args) end def unique_index_on_selector? return @unique_index_on_selector if defined?(@unique_index_on_selector) @unique_index_on_selector = unique_index_columns.any? do |row| row["index_columns"].sort == selector_keys.sort end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems