Go SDK v0.9.0
·
65 commits
to main
since this release
go get github.com/joaoh82/rust_sqlite/sdk/go@v0.9.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.9.0-linux-x86_64.tar.gzsqlrite-ffi-v0.9.0-linux-aarch64.tar.gzsqlrite-ffi-v0.9.0-macos-aarch64.tar.gzsqlrite-ffi-v0.9.0-windows-x86_64.tar.gz
Extract for your platform, then point cgo at it:
tar xzf sqlrite-ffi-v0.9.0-<platform>.tar.gz
export CGO_CFLAGS="-I$(pwd)/sqlrite-ffi-v0.9.0-<platform>/include"
export CGO_LDFLAGS="-L$(pwd)/sqlrite-ffi-v0.9.0-<platform>/lib -lsqlrite_c"
export LD_LIBRARY_PATH="$(pwd)/sqlrite-ffi-v0.9.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.9.0 for the full changelog.
What's Changed
- docs(bench): design plan for SQLRite vs SQLite benchmark suite (SQLR-4) by @joaoh82 in #101
- feat(bench): harness scaffolding + W1 read-by-PK (sub-phase 9.1) by @joaoh82 in #102
- feat(bench): Group A workloads — W2..W6 (sub-phase 9.2) by @joaoh82 in #103
- feat(bench): Group B workloads — W7..W9 (sub-phase 9.3) by @joaoh82 in #104
- feat(bench): Group C differentiators — W10..W12 (sub-phase 9.4) by @joaoh82 in #105
- feat(bench): DuckDB driver, Group B only (sub-phase 9.5) by @joaoh82 in #106
- feat(bench): publication — first pinned-host run + canonical docs (sub-phase 9.6) by @joaoh82 in #107
- docs(mvcc): proposal for concurrent writes via MVCC + BEGIN CONCURRENT by @joaoh82 in #109
- feat(engine): prepared-statement plan cache + parameter binding (SQLR… by @joaoh82 in #110
- fix(release): teach bump-version.sh about benchmarks/Cargo.toml's pin by @joaoh82 in #111
- Release v0.9.0 by @github-actions[bot] in #112
Full Changelog: sdk/go/v0.8.0...sdk/go/v0.9.0