summaryrefslogtreecommitdiff
path: root/vendor/github.com/ncruces/go-sqlite3/context.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-08-15 00:30:58 +0000
committerLibravatar GitHub <noreply@github.com>2024-08-15 00:30:58 +0000
commit586639ccf0e2fefbd1da2c59d5abcb8d64d37434 (patch)
tree52a9d7412e98ef406c39f09a6fad6e3fa7a7ad49 /vendor/github.com/ncruces/go-sqlite3/context.go
parentupdate go-ffmpreg to v0.2.5 (pulls in latest tetratelabs/wazero) (#3203) (diff)
downloadgotosocial-586639ccf0e2fefbd1da2c59d5abcb8d64d37434.tar.xz
update go-sqlite3 to v0.18.0 (#3204)
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/context.go')
-rw-r--r--vendor/github.com/ncruces/go-sqlite3/context.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/context.go b/vendor/github.com/ncruces/go-sqlite3/context.go
index 8d7604c66..4fcda56d4 100644
--- a/vendor/github.com/ncruces/go-sqlite3/context.go
+++ b/vendor/github.com/ncruces/go-sqlite3/context.go
@@ -130,7 +130,8 @@ func (ctx Context) ResultNull() {
//
// https://sqlite.org/c3ref/result_blob.html
func (ctx Context) ResultTime(value time.Time, format TimeFormat) {
- if format == TimeFormatDefault {
+ switch format {
+ case TimeFormatDefault, TimeFormatAuto, time.RFC3339Nano:
ctx.resultRFC3339Nano(value)
return
}
@@ -165,7 +166,8 @@ func (ctx Context) resultRFC3339Nano(value time.Time) {
// https://sqlite.org/c3ref/result_blob.html
func (ctx Context) ResultPointer(ptr any) {
valPtr := util.AddHandle(ctx.c.ctx, ptr)
- ctx.c.call("sqlite3_result_pointer_go", uint64(valPtr))
+ ctx.c.call("sqlite3_result_pointer_go",
+ uint64(ctx.handle), uint64(valPtr))
}
// ResultJSON sets the result of the function to the JSON encoding of value.
@@ -175,7 +177,7 @@ func (ctx Context) ResultJSON(value any) {
data, err := json.Marshal(value)
if err != nil {
ctx.ResultError(err)
- return
+ return // notest
}
ctx.ResultRawText(data)
}