diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2016-11-04 15:11:24 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2016-11-04 15:11:24 +0900 |
commit | 025b917610cf628e9be1dcf9386525d0dbc22659 (patch) | |
tree | d07015c8f2199a5dce8e647bda486c42e34bb90a /sqlite3.go | |
parent | build tag (diff) | |
download | golite-025b917610cf628e9be1dcf9386525d0dbc22659.tar.gz golite-025b917610cf628e9be1dcf9386525d0dbc22659.tar.xz |
add PrepareContext
Diffstat (limited to 'sqlite3.go')
-rw-r--r-- | sqlite3.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |