From ddfaf12cd87d7ec091f17b14e9880ce135e4ef64 Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Tue, 15 Oct 2024 14:42:56 +0100 Subject: [PATCH] Reorg READMEs. --- .github/workflows/test.yml | 4 ++++ README.md | 45 +++++--------------------------------- ext/README.md | 37 +++++++++++++++++++++++++++++++ util/README.md | 4 ++++ vfs/README.md | 11 +++++++++- 5 files changed, 60 insertions(+), 41 deletions(-) create mode 100644 ext/README.md create mode 100644 util/README.md diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 197a4f5..c5cc4c2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,10 @@ name: Test on: push: branches: [ "main" ] + paths: + - '**.go' + - '**.wasm' + - '**.wasm.bz2' pull_request: branches: [ "main" ] workflow_dispatch: diff --git a/README.md b/README.md index 2ba19cc..935b9f2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Go bindings to SQLite using Wazero +# Go bindings to SQLite using wazero [![Go Reference](https://pkg.go.dev/badge/image)](https://pkg.go.dev/github.com/ncruces/go-sqlite3) [![Go Report](https://goreportcard.com/badge/github.com/ncruces/go-sqlite3)](https://goreportcard.com/report/github.com/ncruces/go-sqlite3) @@ -41,45 +41,6 @@ db.QueryRow(`SELECT sqlite_version()`).Scan(&version) - [`github.com/ncruces/go-sqlite3/gormlite`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/gormlite) provides a [GORM](https://gorm.io) driver. -### Extensions - -- [`github.com/ncruces/go-sqlite3/ext/array`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/array) - provides the [`array`](https://sqlite.org/carray.html) table-valued function. -- [`github.com/ncruces/go-sqlite3/ext/blobio`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/blobio) - simplifies [incremental BLOB I/O](https://sqlite.org/c3ref/blob_open.html). -- [`github.com/ncruces/go-sqlite3/ext/bloom`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/bloom) - provides a [Bloom filter](https://github.com/nalgeon/sqlean/issues/27#issuecomment-1002267134) virtual table. -- [`github.com/ncruces/go-sqlite3/ext/closure`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/closure) - provides a transitive closure virtual table. -- [`github.com/ncruces/go-sqlite3/ext/csv`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/csv) - reads [comma-separated values](https://sqlite.org/csv.html). -- [`github.com/ncruces/go-sqlite3/ext/fileio`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/fileio) - reads, writes and lists files. -- [`github.com/ncruces/go-sqlite3/ext/hash`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/hash) - provides cryptographic hash functions. -- [`github.com/ncruces/go-sqlite3/ext/lines`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/lines) - reads data [line-by-line](https://github.com/asg017/sqlite-lines). -- [`github.com/ncruces/go-sqlite3/ext/pivot`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/pivot) - creates [pivot tables](https://github.com/jakethaw/pivot_vtab). -- [`github.com/ncruces/go-sqlite3/ext/regexp`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/regexp) - provides regular expression functions. -- [`github.com/ncruces/go-sqlite3/ext/statement`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/statement) - creates [parameterized views](https://github.com/0x09/sqlite-statement-vtab). -- [`github.com/ncruces/go-sqlite3/ext/stats`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/stats) - provides [statistics](https://www.oreilly.com/library/view/sql-in-a/9780596155322/ch04s02.html) functions. -- [`github.com/ncruces/go-sqlite3/ext/unicode`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/unicode) - provides [Unicode aware](https://sqlite.org/src/dir/ext/icu) functions. -- [`github.com/ncruces/go-sqlite3/ext/uuid`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/uuid) - generates [UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier). -- [`github.com/ncruces/go-sqlite3/ext/zorder`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/zorder) - maps multidimensional data to one dimension. -- [`github.com/ncruces/go-sqlite3/vfs/adiantum`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/adiantum) - wraps a VFS to offer encryption at rest. -- [`github.com/ncruces/go-sqlite3/vfs/memdb`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/memdb) - implements an in-memory VFS. -- [`github.com/ncruces/go-sqlite3/vfs/readervfs`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/readervfs) - implements a VFS for immutable databases. - ### Advanced features - [incremental BLOB I/O](https://sqlite.org/c3ref/blob_open.html) @@ -92,7 +53,11 @@ db.QueryRow(`SELECT sqlite_version()`).Scan(&version) - [math functions](https://sqlite.org/lang_mathfunc.html) - [full-text search](https://sqlite.org/fts5.html) - [geospatial search](https://sqlite.org/geopoly.html) +- [Unicode support](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/unicode) +- [statistics functions](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/stats) - [encryption at rest](vfs/adiantum/README.md) +- [many extensions](ext/README.md) +- [custom VFSes](vfs/README.md#custom-vfses) - [and more…](embed/README.md) ### Caveats diff --git a/ext/README.md b/ext/README.md new file mode 100644 index 0000000..35028dc --- /dev/null +++ b/ext/README.md @@ -0,0 +1,37 @@ +# Go SQLite Extensions + +This folder collects optional SQLite extensions +you can load into your database connections. + +### Extensions + +- [`github.com/ncruces/go-sqlite3/ext/array`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/array) + provides the [`array`](https://sqlite.org/carray.html) table-valued function. +- [`github.com/ncruces/go-sqlite3/ext/blobio`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/blobio) + simplifies [incremental BLOB I/O](https://sqlite.org/c3ref/blob_open.html). +- [`github.com/ncruces/go-sqlite3/ext/bloom`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/bloom) + provides a [Bloom filter](https://github.com/nalgeon/sqlean/issues/27#issuecomment-1002267134) virtual table. +- [`github.com/ncruces/go-sqlite3/ext/closure`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/closure) + provides a transitive closure virtual table. +- [`github.com/ncruces/go-sqlite3/ext/csv`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/csv) + reads [comma-separated values](https://sqlite.org/csv.html). +- [`github.com/ncruces/go-sqlite3/ext/fileio`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/fileio) + reads, writes and lists files. +- [`github.com/ncruces/go-sqlite3/ext/hash`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/hash) + provides cryptographic hash functions. +- [`github.com/ncruces/go-sqlite3/ext/lines`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/lines) + reads data [line-by-line](https://github.com/asg017/sqlite-lines). +- [`github.com/ncruces/go-sqlite3/ext/pivot`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/pivot) + creates [pivot tables](https://github.com/jakethaw/pivot_vtab). +- [`github.com/ncruces/go-sqlite3/ext/regexp`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/regexp) + provides regular expression functions. +- [`github.com/ncruces/go-sqlite3/ext/statement`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/statement) + creates [parameterized views](https://github.com/0x09/sqlite-statement-vtab). +- [`github.com/ncruces/go-sqlite3/ext/stats`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/stats) + provides [statistics](https://www.oreilly.com/library/view/sql-in-a/9780596155322/ch04s02.html) functions. +- [`github.com/ncruces/go-sqlite3/ext/unicode`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/unicode) + provides [Unicode aware](https://sqlite.org/src/dir/ext/icu) functions. +- [`github.com/ncruces/go-sqlite3/ext/uuid`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/uuid) + generates [UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier). +- [`github.com/ncruces/go-sqlite3/ext/zorder`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/zorder) + maps multidimensional data to one dimension. \ No newline at end of file diff --git a/util/README.md b/util/README.md new file mode 100644 index 0000000..d828ac4 --- /dev/null +++ b/util/README.md @@ -0,0 +1,4 @@ +# Go SQLite Utilities + +This folder collects additional SQLite utilities +that help extension writers provide a consistent developer experience. \ No newline at end of file diff --git a/vfs/README.md b/vfs/README.md index b1d9ea2..21e9022 100644 --- a/vfs/README.md +++ b/vfs/README.md @@ -4,7 +4,7 @@ This package implements the SQLite [OS Interface](https://sqlite.org/vfs.html) ( It replaces the default SQLite VFS with a **pure Go** implementation, and exposes [interfaces](https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs#VFS) -that should allow you to implement your own custom VFSes. +that should allow you to implement your own [custom VFSes](#custom-vfses). Since it is a from scratch reimplementation, there are naturally some ways it deviates from the original. @@ -90,3 +90,12 @@ The VFS can be customized with a few build tags: > [`unix-flock` VFS](https://sqlite.org/compile.html#enable_locking_style). > If incompatible file locking is used, accessing databases concurrently with > _other_ SQLite libraries will eventually corrupt data. + +### Custom VFSes + +- [`github.com/ncruces/go-sqlite3/vfs/adiantum`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/adiantum) + wraps a VFS to offer encryption at rest. +- [`github.com/ncruces/go-sqlite3/vfs/memdb`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/memdb) + implements an in-memory VFS. +- [`github.com/ncruces/go-sqlite3/vfs/readervfs`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/readervfs) + implements a VFS for immutable databases. \ No newline at end of file