lib/upsert/connection/SQLite3_Database.rb in upsert-1.0.2 vs lib/upsert/connection/SQLite3_Database.rb in upsert-1.1.0

- old
+ new

@@ -1,20 +1,28 @@ +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}} } - raw_connection.execute sql, params + metal.execute sql, convert_binary(params) else Upsert.logger.debug { %{[upsert] #{sql}} } - raw_connection.execute 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