Sha256: 9f247fa97dcf747068a9e0ce9ecafdbff8735bcc7cd080169e4436885ac6e729

Contents?: true

Size: 573 Bytes

Versions: 6

Compression:

Stored size: 573 Bytes

Contents

class Upsert
  class Connection
    # @private
    class PG_Connection < Connection
      include Postgresql
      
      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

6 entries across 6 versions & 1 rubygems

Version Path
upsert-2.1.2 lib/upsert/connection/PG_Connection.rb
upsert-2.1.1 lib/upsert/connection/PG_Connection.rb
upsert-2.1.0 lib/upsert/connection/PG_Connection.rb
upsert-2.0.4 lib/upsert/connection/PG_Connection.rb
upsert-2.0.3 lib/upsert/connection/PG_Connection.rb
upsert-2.0.2 lib/upsert/connection/PG_Connection.rb