Sha256: 2456ef8178418a310a18a2f344574b0156ceae8ddcd77893d353637a1a8c420f

Contents?: true

Size: 539 Bytes

Versions: 2

Compression:

Stored size: 539 Bytes

Contents

class Upsert
  class Connection
    # @private
    class PG_Connection < Connection
      def execute(sql, params = nil)
        if params
          Upsert.logger.debug { %{[upsert] #{sql} with #{params.inspect}} }
          metal.exec sql, convert_binary(params)
        else
          Upsert.logger.debug { %{[upsert] #{sql}} }
          metal.exec sql
        end
      end

      def quote_ident(k)
        metal.quote_ident k.to_s
      end

      def binary(v)
        { :value => v.value, :format => 1 }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
upsert-1.1.1 lib/upsert/connection/PG_Connection.rb
upsert-1.1.0 lib/upsert/connection/PG_Connection.rb