Skip to content

Commit

Permalink
update to crystal-db feature/unprepared branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian J. Cardiff committed Dec 3, 2016
1 parent 71347ad commit 242e3df
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/sqlite3/connection.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 242e3df

Please sign in to comment.