aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2024-01-25 22:36:00 +0900
committermattn <mattn.jp@gmail.com>2024-01-25 22:55:22 +0900
commitc91bca4fb499831d1bf62fb2b3019338d5a3eb41 (patch)
treeeb8952f7b7c394790c620a65c20c74189f1fcb47 /sqlite3.go
parentFix musl build (#1164) (diff)
downloadgolite-c91bca4fb499831d1bf62fb2b3019338d5a3eb41.tar.gz
golite-c91bca4fb499831d1bf62fb2b3019338d5a3eb41.tar.xz
update go version to 1.19
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/sqlite3.go b/sqlite3.go
index 5764182..b6404b7 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -607,10 +607,9 @@ func (c *SQLiteConn) RegisterAuthorizer(callback func(int, string, string, strin
// RegisterFunc makes a Go function available as a SQLite function.
//
// The Go function can have arguments of the following types: any
-// numeric type except complex, bool, []byte, string and
-// interface{}. interface{} arguments are given the direct translation
-// of the SQLite data type: int64 for INTEGER, float64 for FLOAT,
-// []byte for BLOB, string for TEXT.
+// numeric type except complex, bool, []byte, string and any.
+// any arguments are given the direct translation of the SQLite data type:
+// int64 for INTEGER, float64 for FLOAT, []byte for BLOB, string for TEXT.
//
// The function can additionally be variadic, as long as the type of
// the variadic argument is one of the above.
@@ -620,7 +619,7 @@ func (c *SQLiteConn) RegisterAuthorizer(callback func(int, string, string, strin
// optimizations in its queries.
//
// See _example/go_custom_funcs for a detailed example.
-func (c *SQLiteConn) RegisterFunc(name string, impl interface{}, pure bool) error {
+func (c *SQLiteConn) RegisterFunc(name string, impl any, pure bool) error {
var fi functionInfo
fi.f = reflect.ValueOf(impl)
t := fi.f.Type()
@@ -702,7 +701,7 @@ func sqlite3CreateFunction(db *C.sqlite3, zFunctionName *C.char, nArg C.int, eTe
// return an error in addition to their other return values.
//
// See _example/go_custom_funcs for a detailed example.
-func (c *SQLiteConn) RegisterAggregator(name string, impl interface{}, pure bool) error {
+func (c *SQLiteConn) RegisterAggregator(name string, impl any, pure bool) error {
var ai aggInfo
ai.constructor = reflect.ValueOf(impl)
t := ai.constructor.Type()