gotosocial/vendor/github.com/ncruces/go-sqlite3
kim a6429b5410 [chore] update dependencies (#4422)
- github.com/jackc/pgx/v5 v5.7.5 -> v5.7.6
- github.com/ncruces/go-sqlite3 v0.28.0 -> v0.29.0
- github.com/tdewolff/minify/v2 v2.24.2 -> v2.24.3
- golang.org/x/oauth2 v0.30.0 -> v0.31.0
- golang.org/x/sys v0.35.0 -> v0.36.0
- golang.org/x/text v0.28.0 -> v0.29.0

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4422
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
2025-09-08 20:53:25 +02:00
..
driver [chore] bump dependencies (#4406) 2025-09-04 15:29:27 +02:00
embed [chore] update dependencies (#4422) 2025-09-08 20:53:25 +02:00
internal [chore] update dependencies (#4422) 2025-09-08 20:53:25 +02:00
util [chore] update dependencies (#4422) 2025-09-08 20:53:25 +02:00
vfs [chore] bump dependencies (#4406) 2025-09-04 15:29:27 +02:00
.gitignore [chore]: Bump github.com/ncruces/go-sqlite3 from 0.23.0 to 0.24.0 (#3862) 2025-03-03 09:51:42 +00:00
backup.go [chore] bump ncruces go-sqlite3 => v0.23.0 (#3785) 2025-02-13 09:53:40 +01:00
blob.go [chore] bump ncruces/go-sqlite3 to v0.25.0 (#3966) 2025-04-04 17:34:38 +02:00
config.go [chore] Upgrade to SQLite 3.50 (#4218) 2025-05-31 13:43:33 +02:00
conn.go [chore] bump ncruces/go-sqlite3 to v0.25.0 (#3966) 2025-04-04 17:34:38 +02:00
const.go [chore/deps] Upgrade to go-sqlite 0.27.1 (#4334) 2025-07-18 11:56:40 +02:00
context.go [chore/deps] Upgrade to go-sqlite 0.27.1 (#4334) 2025-07-18 11:56:40 +02:00
error.go bump dependencies: minio-go, go-sqlite3, goldmark, otel, x/image/webp (#4075) 2025-04-28 11:20:24 +00:00
func.go [chore] bump dependencies (#4406) 2025-09-04 15:29:27 +02: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/deps] Upgrade to go-sqlite 0.27.1 (#4334) 2025-07-18 11:56:40 +02:00
quote.go [chore] update go-sqlite3 to v0.19.0 (#3406) 2024-10-08 11:15:09 +02:00
README.md [chore] Upgrade to SQLite 3.50 (#4218) 2025-05-31 13:43:33 +02:00
registry.go [chore] Bump ncruces/go-sqlite3 to 0.17.1 (#3085) 2024-07-08 22:03:00 +02:00
sqlite.go [chore] bump ncruces/go-sqlite3 to v0.25.0 (#3966) 2025-04-04 17:34:38 +02:00
stmt.go [chore/deps] Upgrade to go-sqlite 0.27.1 (#4334) 2025-07-18 11:56:40 +02:00
time.go [chore] update go-sqlite3 to v0.19.0 (#3406) 2024-10-08 11:15:09 +02:00
txn.go [chore] bump ncruces/go-sqlite3 to v0.25.0 (#3966) 2025-04-04 17:34:38 +02:00
value.go [chore] bump dependencies (#4406) 2025-09-04 15:29:27 +02:00
vtab.go [chore] bump ncruces/go-sqlite3 to v0.25.0 (#3966) 2025-04-04 17:34:38 +02: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.

Because each database connection executes within a Wasm sandboxed environment, memory usage will be higher than alternatives.

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
  • BSD:
    • FreeBSD: amd64, arm64
    • OpenBSD: amd64
    • NetBSD: amd64, arm64
    • DragonFly BSD: amd64
  • illumos: amd64
  • Solaris: amd64

Certain operating system and CPU combinations have some limitations. See the support matrix for a complete overview.

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

Performance

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

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

Concurrency

This module behaves similarly to SQLite in multi-thread mode: it is goroutine-safe, provided that no single database connection, or object derived from it, is used concurrently by multiple goroutines.

The database/sql API is safe to use concurrently, according to its documentation.

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, and features we're working on, planning to work on, or asking for help with.

Alternatives