mirror of
https://gitea.invidious.io/iv-org/shard-crystal-sqlite3.git
synced 2024-08-15 00:53:26 +00:00
Merge pull request #11 from crystal-lang/feature/unprepared
update to crystal-db feature/unprepared branch
This commit is contained in:
commit
c39220e3f0
1 changed files with 11 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue