Merge pull request #11 from crystal-lang/feature/unprepared

update to crystal-db feature/unprepared branch
This commit is contained in:
Brian J. Cardiff 2016-12-13 16:51:49 -03:00 committed by GitHub
commit c39220e3f0

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)