aboutsummaryrefslogtreecommitdiff
path: root/sqlite3_go18.go
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite3_go18.go')
-rw-r--r--sqlite3_go18.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/sqlite3_go18.go b/sqlite3_go18.go
index 1ee4c6a..3993490 100644
--- a/sqlite3_go18.go
+++ b/sqlite3_go18.go
@@ -23,6 +23,14 @@ func (c *SQLiteConn) QueryContext(ctx context.Context, query string, args []driv
return c.query(ctx, query, list)
}
+func (c *SQLiteConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {
+ list := make([]namedValue, len(args))
+ for i, nv := range args {
+ list[i] = namedValue(nv)
+ }
+ return c.exec(ctx, query, list)
+}
+
func (s *SQLiteStmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) {
list := make([]namedValue, len(args))
for i, nv := range args {
@@ -30,3 +38,11 @@ func (s *SQLiteStmt) QueryContext(ctx context.Context, args []driver.NamedValue)
}
return s.query(ctx, list)
}
+
+func (s *SQLiteStmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) {
+ list := make([]namedValue, len(args))
+ for i, nv := range args {
+ list[i] = namedValue(nv)
+ }
+ return s.exec(ctx, list)
+}