Virtual table API.

This commit is contained in:
Nuno Cruces
2023-11-29 00:46:27 +00:00
parent 9bf14becaf
commit 3f05115cd7
7 changed files with 22 additions and 16 deletions

View File

@@ -15,7 +15,7 @@ import (
// https://sqlite.org/carray.html
func Register(db *sqlite3.Conn) {
sqlite3.CreateModule[array](db, "array", nil,
func(db *sqlite3.Conn, arg ...string) (array, error) {
func(db *sqlite3.Conn, _, _, _ string, _ ...string) (array, error) {
err := db.DeclareVtab(`CREATE TABLE x(value, array HIDDEN)`)
return array{}, err
})