aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/sqlite3.go b/sqlite3.go
index 3b80eeb..bef5627 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -644,6 +644,10 @@ func (c *SQLiteConn) Close() error {
// Prepare the query string. Return a new statement.
func (c *SQLiteConn) Prepare(query string) (driver.Stmt, error) {
+ return c.prepare(context.Background(), query)
+}
+
+func (c *SQLiteConn) prepare(ctx context.Context, query string) (driver.Stmt, error) {
pquery := C.CString(query)
defer C.free(unsafe.Pointer(pquery))
var s *C.sqlite3_stmt