7
7
Go module ` github.com/ncruces/go-sqlite3 ` wraps a [ WASM] ( https://webassembly.org/ ) build of [ SQLite] ( https://sqlite.org/ ) ,
8
8
and uses [ wazero] ( https://wazero.io/ ) to provide ` cgo ` -free SQLite bindings.
9
9
10
- - Package [ ` github.com/ncruces/go-sqlite3 ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3 )
10
+ - [ ` github.com/ncruces/go-sqlite3 ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3 )
11
11
wraps the [ C SQLite API] ( https://www.sqlite.org/cintro.html )
12
12
([ example usage] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3#example-package ) ).
13
- - Package [ ` github.com/ncruces/go-sqlite3/driver ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/driver )
13
+ - [ ` github.com/ncruces/go-sqlite3/driver ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/driver )
14
14
provides a [ ` database/sql ` ] ( https://pkg.go.dev/database/sql ) driver
15
15
([ example usage] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/driver#example-package ) ).
16
- - Package [ ` github.com/ncruces/go-sqlite3/embed ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/embed )
16
+ - [ ` github.com/ncruces/go-sqlite3/embed ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/embed )
17
17
embeds a build of SQLite into your application.
18
- - Package [ ` github.com/ncruces/go-sqlite3/vfs ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs )
18
+ - [ ` github.com/ncruces/go-sqlite3/vfs ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs )
19
19
wraps the [ C SQLite VFS API] ( https://www.sqlite.org/vfs.html ) and provides a pure Go implementation.
20
- - Package [ ` github.com/ncruces/go-sqlite3/vfs/memdb ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/memdb )
20
+ - [ ` github.com/ncruces/go-sqlite3/vfs/memdb ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/memdb )
21
21
implements an in-memory VFS.
22
- - Package [ ` github.com/ncruces/go-sqlite3/vfs/readervfs ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/readervfs )
22
+ - [ ` github.com/ncruces/go-sqlite3/vfs/readervfs ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/readervfs )
23
23
implements a VFS for immutable databases.
24
- - Package [ ` github.com/ncruces/go-sqlite3/ext/unicode ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/unicode )
24
+ - [ ` github.com/ncruces/go-sqlite3/ext/unicode ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/unicode )
25
25
registers Unicode aware functions.
26
- - Package [ ` github.com/ncruces/go-sqlite3/ext/stats ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/stats )
26
+ - [ ` github.com/ncruces/go-sqlite3/ext/stats ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/stats )
27
27
registers [ statistics functions] ( https://www.oreilly.com/library/view/sql-in-a/9780596155322/ch04s02.html ) .
28
- - Package [ ` github.com/ncruces/go-sqlite3/gormlite ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/gormlite )
28
+ - [ ` github.com/ncruces/go-sqlite3/gormlite ` ] ( https://pkg.go.dev/github.com/ncruces/go-sqlite3/gormlite )
29
29
provides a [ GORM] ( https://gorm.io ) driver.
30
30
31
31
### Caveats
@@ -44,13 +44,13 @@ to always use `EXCLUSIVE` locking mode for WAL databases.
44
44
45
45
Because connection pooling is incompatible with ` EXCLUSIVE ` locking mode,
46
46
to use the [ ` database/sql ` ] ( https://pkg.go.dev/database/sql )
47
- driver with WAL databases you should disable connection pooling by calling
47
+ driver with WAL mode databases you should disable connection pooling by calling
48
48
[ ` db.SetMaxOpenConns(1) ` ] ( https://pkg.go.dev/database/sql#DB.SetMaxOpenConns ) .
49
49
50
50
#### POSIX Advisory Locks
51
51
52
52
POSIX advisory locks, which SQLite uses, are
53
- [ broken by design] ( https://www.sqlite.org/src/artifact/90c4fa ?ln=1073-1161 ) .
53
+ [ broken by design] ( https://www.sqlite.org/src/artifact/2e8b12 ?ln=1073-1161 ) .
54
54
55
55
On Linux, macOS and illumos, this module uses
56
56
[ OFD locks] ( https://www.gnu.org/software/libc/manual/html_node/Open-File-Description-Locks.html )
@@ -72,7 +72,7 @@ it is _also_ safe to use it to access databases concurrently
72
72
with _ other_ implementations of SQLite.
73
73
74
74
On other BSDs, where this might be unsafe,
75
- [ this test] ( https://github.com/ncruces/go-sqlite3/blob/main/ vfs/lock_test.go) should fail.
75
+ [ this test] ( vfs/lock_test.go ) should fail.
76
76
77
77
#### Testing
78
78
@@ -96,7 +96,6 @@ Performance is tested by running
96
96
- [x] in-memory VFS
97
97
- [x] read-only VFS, wrapping an [ ` io.ReaderAt ` ] ( https://pkg.go.dev/io#ReaderAt )
98
98
- [ ] cloud-based VFS, based on [ Cloud Backed SQLite] ( https://sqlite.org/cloudsqlite/doc/trunk/www/index.wiki )
99
- - [ ] [ MVCC] ( https://en.wikipedia.org/wiki/Multiversion_concurrency_control ) VFS, using [ BadgerDB] ( https://github.com/dgraph-io/badger )
100
99
101
100
### Alternatives
102
101
0 commit comments