running go 1.8 on OS X:
r, err := store.Db.Exec("select * from kv where json_extract(v, '$.title')")
CheckFatal(err)
goroutine 1 [running]:
runtime/debug.Stack(0xc420128b20, 0x0, 0x0)
/usr/local/Cellar/go/1.8/libexec/src/runtime/debug/stack.go:24 +0x79
runtime/debug.PrintStack()
/usr/local/Cellar/go/1.8/libexec/src/runtime/debug/stack.go:16 +0x22
tpods.CheckFatal(0x473ca40, 0xc420128b20, 0x31, 0x0)
/Users/hgrosman/v/tesla_go/src/tpods/utils.go:100 +0x4c
main.main()
/Users/hgrosman/v/tesla_go/src/tpods/ack_files.go:371 +0x238
2017/04/07 16:15:01 error: no such function: json_extract
also: i am using "database/sql".
is there a way to interact with the sqlite APIs directly
(for example calling the backup APIs to load and unload DB in and from :memory:)
import (
"database/sql"
_ "github.com/mattn/go-sqlite3"
...
log.Println("create store: ", store.Filename)
store.Db, err = sql.Open("sqlite3", store.Filename)
if err != nil {
return nil, err
}
_, err = store.Db.Exec("PRAGMA busy_timeout = 50000;")
if err != nil {
return nil, err
}
_, err = store.Db.Exec("PRAGMA journal_mode = OFF;")
if err != nil {
return nil, err
}
...
build with -tag json.
go build -tag json github.com/mattn/go-sqlite3
?
doesn't work for me
sorry, json1 not json.
that worked! thank you so much!
why is it not on by default?
can you please help with the second question (how to get to the sqlite api directly - for example loading and unloading :memory: DB from and to files)
can indeed see the example i was looking for here now:
https://github.com/mattn/go-sqlite3/blob/master/_example/hook/hook.go
Thank you Very Much!
thank you for this! very cool.

@jonybrn Try -tags not -tag.
Thanks @rittneje this is the right command:
go build -tags json1 github.com/mattn/go-sqlite3
Most helpful comment
@jonybrn Try
-tagsnot-tag.