lib/motion-sqlite3/database.rb in motion-sqlite3-1.0.0 vs lib/motion-sqlite3/database.rb in motion-sqlite3-2.0.0

- old
+ new

@@ -1,13 +1,15 @@ module SQLite3 class Database + attr_accessor :logging + def initialize(filename) @handle = Pointer.new(::Sqlite3.type) @logging = false result = sqlite3_open(filename, @handle) - raise SQLite3Error, sqlite3_errmsg(@handle.value) if result != SQLITE_OK + raise SQLite3Error, sqlite3_errmsg(@handle.value_with_autorelease) if result != SQLITE_OK end def execute(sql, params = nil, &block) raise ArgumentError if sql.nil? @@ -36,11 +38,9 @@ end def execute_scalar(*args) execute(*args).first.values.first end - - attr_accessor :logging def transaction(&block) execute("BEGIN TRANSACTION") begin