Go SDK v0.10.0
·
32 commits
to main
since this release
go get github.com/joaoh82/rust_sqlite/sdk/go@v0.10.0package main
import (
"database/sql"
"fmt"
_ "github.com/joaoh82/rust_sqlite/sdk/go" // registers "sqlrite" driver
)
func main() {
db, _ := sql.Open("sqlrite", ":memory:")
defer db.Close()
_, _ = db.Exec("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)")
_, _ = db.Exec("INSERT INTO users (name) VALUES ('alice')")
rows, _ := db.Query("SELECT id, name FROM users")
defer rows.Close()
for rows.Next() {
var id int64
var name string
rows.Scan(&id, &name)
fmt.Printf("%d: %s\n", id, name)
}
}Prebuilt libsqlrite_c (cgo dependency)
The Go binding uses cgo against the libsqlrite_c shared library shipped by sqlrite-ffi. The tarballs attached below are the same ones from this release wave's C FFI release — provided here so Go users have a one-stop-shop:
sqlrite-ffi-v0.10.0-linux-x86_64.tar.gzsqlrite-ffi-v0.10.0-linux-aarch64.tar.gzsqlrite-ffi-v0.10.0-macos-aarch64.tar.gzsqlrite-ffi-v0.10.0-windows-x86_64.tar.gz
Extract for your platform, then point cgo at it:
tar xzf sqlrite-ffi-v0.10.0-<platform>.tar.gz
export CGO_CFLAGS="-I$(pwd)/sqlrite-ffi-v0.10.0-<platform>/include"
export CGO_LDFLAGS="-L$(pwd)/sqlrite-ffi-v0.10.0-<platform>/lib -lsqlrite_c"
export LD_LIBRARY_PATH="$(pwd)/sqlrite-ffi-v0.10.0-<platform>/lib"
go build ./...(On macOS use DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH. On Windows, place the .dll next to your binary or on %PATH%.)
See the umbrella release v0.10.0 for the full changelog.
What's Changed
- feat(web): launch sqlrite.dev — landing, /docs, benchmarks viz, doc sweep (SQLR-1) by @joaoh82 in #117
- feat(web): technical SEO foundation for sqlritedb.com (SQLR-32) by @joaoh82 in #118
- feat(web): mobile-friendly + responsive sqlritedb.com (SQLR-37) by @joaoh82 in #119
- feat(web): blog at sqlritedb.com/blog with 5 launch posts (SQLR-34) by @joaoh82 in #120
- feat(web): syntax highlighting for blog MDX + SDK showcase (SQLR-44) by @joaoh82 in #121
- feat(engine): Phase 11.1 multi-connection foundation (SQLR-22) by @joaoh82 in #122
- feat(engine): Phase 11.2 logical clock + active-tx registry (SQLR-22) by @joaoh82 in #123
- feat(engine): Phase 11.3 MvStore skeleton + PRAGMA journal_mode (SQLR-22) by @joaoh82 in #124
- feat(engine): Phase 11.4 BEGIN CONCURRENT writes + commit-time validation (SQLR-22) by @joaoh82 in #125
- feat(engine): Phase 11.5 snapshot-isolated reads via Statement::query (SQLR-22) by @joaoh82 in #126
- feat(engine): Phase 11.6 MVCC garbage collection (SQLR-22) by @joaoh82 in #127
- feat(sdk): Phase 11.7 SDK propagation of Busy / BusySnapshot (SQLR-22) by @joaoh82 in #128
- feat(sdk): Phase 11.8 multi-handle SDK shape (SQLR-22) by @joaoh82 in #129
- feat(engine): Phase 11.9 WAL log-record durability + crash recovery (SQLR-22) by @joaoh82 in #130
- feat(repl): Phase 11.11a REPL .spawn for interactive BEGIN CONCURRENT demos (SQLR-22) by @joaoh82 in #131
- docs: Phase 11.12 — promote concurrent-writes-plan.md to canonical reference (SQLR-22) by @joaoh82 in #132
- bench(W13): Phase 11.11b — concurrent-writers workload (SQLR-22 / SQLR-16) by @joaoh82 in #133
- feat(sdk:go): Phase 11.11c — cross-pool sibling shape via path registry (SQLR-22) by @joaoh82 in #134
Full Changelog: sdk/go/v0.9.1...sdk/go/v0.10.0