update to crystal-db feature/unprepared branch

This commit is contained in:
Brian J. Cardiff 2016-12-03 17:52:24 -03:00
parent 71347ad377
commit 242e3dfa02

View file

@ -14,10 +14,20 @@ class SQLite3::Connection < DB::Connection
end)
end
def build_statement(query)
def build_prepared_statement(query)
Statement.new(self, query)
end
def build_unprepared_statement(query)
# sqlite3 does not support unprepared statement.
# All statements once prepared should be released
# when unneeded. Unprepared statement are not aim
# to leave state in the connection. Mimicking them
# with prepared statement would be wrong with
# respect connection resources.
raise DB::Error.new("SQLite3 driver does not support unprepared statements")
end
def do_close
super
LibSQLite3.close_v2(self)