gotosocial/vendor/github.com/ncruces/go-sqlite3
Daenney 9ae0c7b363
[chore] Update ncruces/go-sqlite3 to 0.21.3 (#3629)
This includes some additional locking fixes for the BSDs.
2024-12-20 21:37:19 +00:00
..
driver [chore] Update ncruces/go-sqlite3 to 0.21.3 (#3629) 2024-12-20 21:37:19 +00:00
embed update ncruces/go-sqlite3 to v0.21.2 (#3626) 2024-12-17 23:16:20 +00:00
internal [chore] Update ncruces/go-sqlite3 to 0.21.3 (#3629) 2024-12-20 21:37:19 +00:00
util update ncruces/go-sqlite3 to v0.21.2 (#3626) 2024-12-17 23:16:20 +00:00
vfs [chore] Update ncruces/go-sqlite3 to 0.21.3 (#3629) 2024-12-20 21:37:19 +00:00
.gitignore [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
backup.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
blob.go update go-sqlite3 => v0.20.0 (#3483) 2024-10-25 16:09:18 +00:00
config.go bump ncruces/go-sqlite3 to v0.20.2 (#3524) 2024-11-07 00:16:28 +00:00
conn.go bump ncruces/go-sqlite3 to v0.21.1 (#3625) 2024-12-16 11:37:53 +00:00
conn_iter.go [chore] update go-sqlite3 to v0.19.0 (#3406) 2024-10-08 11:15:09 +02:00
conn_old.go [chore] update go-sqlite3 to v0.19.0 (#3406) 2024-10-08 11:15:09 +02:00
const.go update go-sqlite3 => v0.20.0 (#3483) 2024-10-25 16:09:18 +00:00
context.go bump ncruces/go-sqlite3 to v0.20.2 (#3524) 2024-11-07 00:16:28 +00:00
error.go bump ncruces/go-sqlite3 to v0.20.2 (#3524) 2024-11-07 00:16:28 +00:00
func.go update go-sqlite3 => v0.20.0 (#3483) 2024-10-25 16:09:18 +00:00
go.work bump ncruces/go-sqlite3 to v0.21.0 (#3621) 2024-12-12 19:44:53 +00:00
go.work.sum bump ncruces/go-sqlite3 to v0.21.1 (#3625) 2024-12-16 11:37:53 +00:00
json.go [chore] Upgrade wasm-sqlite to v0.16.2 (#2997) 2024-06-12 13:21:34 +01:00
LICENSE [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
pointer.go [chore] Upgrade wasm-sqlite to v0.16.2 (#2997) 2024-06-12 13:21:34 +01:00
quote.go [chore] update go-sqlite3 to v0.19.0 (#3406) 2024-10-08 11:15:09 +02:00
README.md update ncruces/go-sqlite3 to v0.21.2 (#3626) 2024-12-17 23:16:20 +00:00
registry.go [chore] Bump ncruces/go-sqlite3 to 0.17.1 (#3085) 2024-07-08 22:03:00 +02:00
sqlite.go [chore] Update ncruces/go-sqlite3 to 0.21.3 (#3629) 2024-12-20 21:37:19 +00:00
stmt.go bump ncruces/go-sqlite3 to v0.21.0 (#3621) 2024-12-12 19:44:53 +00:00
time.go [chore] update go-sqlite3 to v0.19.0 (#3406) 2024-10-08 11:15:09 +02:00
txn.go update go-sqlite3 => v0.20.0 (#3483) 2024-10-25 16:09:18 +00:00
value.go update go-sqlite3 to v0.18.0 (#3204) 2024-08-15 00:30:58 +00:00
vtab.go update go-sqlite3 => v0.20.0 (#3483) 2024-10-25 16:09:18 +00:00

Go bindings to SQLite using wazero

Go Reference Go Report Go Coverage

Go module github.com/ncruces/go-sqlite3 is a cgo-free SQLite wrapper.
It provides a database/sql compatible driver, as well as direct access to most of the C SQLite API.

It wraps a Wasm build of SQLite, and uses wazero as the runtime.
Go, wazero and x/sys are the only direct dependencies.

Getting started

Using the database/sql driver:


import "database/sql"
import _ "github.com/ncruces/go-sqlite3/driver"
import _ "github.com/ncruces/go-sqlite3/embed"

var version string
db, _ := sql.Open("sqlite3", "file:demo.db")
db.QueryRow(`SELECT sqlite_version()`).Scan(&version)

Packages

Advanced features

Caveats

This module replaces the SQLite OS Interface (aka VFS) with a pure Go implementation, which has advantages and disadvantages.

Read more about the Go VFS design here.

Testing

This project aims for high test coverage. It also benefits greatly from SQLite's and wazero's thorough testing.

Every commit is tested on Linux (amd64/arm64/386/riscv64/ppc64le/s390x), macOS (amd64/arm64), Windows (amd64), FreeBSD (amd64), OpenBSD (amd64), NetBSD (amd64), DragonFly BSD (amd64), illumos (amd64), and Solaris (amd64).

The Go VFS is tested by running SQLite's mptest.

Performance

Perfomance of the database/sql driver is competitive with alternatives.

The Wasm and VFS layers are also tested by running SQLite's speedtest1.

FAQ, issues, new features

For questions, please see Discussions.

Also, post there if you used this driver for something interesting ("Show and tell"), have an idea

The Issue tracker is for bugs we want fixed, and features we're working on, planning to work on, or asking for help with.

Alternatives