Sha256: 408c2a5e6df861cb151ae5fae35193b098e8659b7bfe71fdc7be920b43629ee2

Contents?: true

Size: 641 Bytes

Versions: 8

Compression:

Stored size: 641 Bytes

Contents

require 'upsert/connection/sqlite3'

class Upsert
  class Connection
    # @private
    class SQLite3_Database < Connection
      include Sqlite3

      def execute(sql, params = nil)
        if params
          Upsert.logger.debug { %{[upsert] #{sql} with #{params.inspect}} }
          metal.execute sql, convert_binary(params)
        else
          Upsert.logger.debug { %{[upsert] #{sql}} }
          metal.execute sql
        end
      end
      
      def quote_ident(k)
        DOUBLE_QUOTE + SQLite3::Database.quote(k.to_s) + DOUBLE_QUOTE
      end

      def binary(v)
        SQLite3::Blob.new v.value
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
upsert-1.2.0 lib/upsert/connection/SQLite3_Database.rb
upsert-1.1.7 lib/upsert/connection/SQLite3_Database.rb
upsert-1.1.6 lib/upsert/connection/SQLite3_Database.rb
upsert-1.1.5 lib/upsert/connection/SQLite3_Database.rb
upsert-1.1.4 lib/upsert/connection/SQLite3_Database.rb
upsert-1.1.3 lib/upsert/connection/SQLite3_Database.rb
upsert-1.1.1 lib/upsert/connection/SQLite3_Database.rb
upsert-1.1.0 lib/upsert/connection/SQLite3_Database.rb