Releases: CaliLuke/go-typeql
Releases · CaliLuke/go-typeql
v1.10.1
Highlights
- Added caller-fast asynchronous transaction close for uncommitted driver transactions.
- Added
Transaction.CloseAsync,Transaction.CloseChecked, anddriver.WaitForPendingCloses. - Updated pooled transaction close handling to return the connection after scheduling close work once overlap testing proved immediate reuse safe.
- Added live TypeDB benchmarks and stress tests for close latency, close backlog, and same-connection overlap.
- Documented the benchmark evidence in
docs/benchmarks/async-transaction-close.mdand added thebenchmark-gotypeqlagent skill. - Updated install examples for
v1.10.1.
Validation
- Unit tests: 416 pure-Go tests.
- Coverage: 76.9%.
- Integration tests passed against TypeDB on
localhost:1730. make build-rust,go vet ./...,golangci-lint run ./...,~/go/bin/staticcheck ./...,go mod tidy, and./check.shpassed.
v1.10.1 supersedes v1.10.0; it includes the same async close implementation plus the benchmark documentation and benchmark skill that were committed immediately after v1.10.0.
v1.10.0
Highlights
- Added caller-fast asynchronous transaction close for the CGo TypeDB driver. Normal
Transaction.Close()now detaches the Go handle immediately and completes checked close work in the background. - Added
Transaction.CloseAsync(func(error)),Transaction.CloseChecked() error, anddriver.WaitForPendingCloses(ctx)for callers that need completion callbacks, synchronous close errors, or graceful shutdown drains. - Updated pooled transaction close handling so pooled read paths can return connections immediately after scheduling close work.
- Added live TypeDB benchmarks and stress tests proving the close regression started at
16b15c1and that caller-visible close latency is back near the pre-regression path. - Documented the new close behavior and release install examples for
v1.10.0.
Validation
- Unit tests: 416 pure-Go tests.
- Coverage: 76.9% statement coverage across unit packages.
- Integration tests passed against TypeDB on
TEST_DB_ADDRESS=localhost:1730. ./check.sh,go vet,golangci-lint, andstaticcheckpassed.
v1.9.0
A broad correctness, debuggability, and performance pass driven by a full code review of ast/, gotype/, and driver/. See CODE_REVIEW.md for the full triage.
Breaking changes
NewManager[T](db)now returns(*Manager[T], error)instead of panicking on unregistered types.NewManagerWithTx[T]shares the change.ModelStrategymethods now return(string, error)so TypeQL compile failures propagate instead of silently emitting empty strings. Custom strategy implementations must update signatures.ComparisonFilter.ToPatternsnow panics when the compared value is a non-scalar struct, rather than silently producing invalid TypeQL.
Correctness
- Context plumbing: every query path in
gotype/now routes throughTx.QueryWithContext, so deadlines and cancellation reach the driver on bound-transaction and*Manypaths that previously dropped ctx. Database.TransactionContext(ctx, txType)/Begin(Context)/Conn.TransactionContextsurface ctx at transaction open — poolGetcan now honor caller deadlines.InsertManyno longer mutates instance IIDs until after the batch commits, so a rollback leaves the caller's objects untouched.Query.Delete/Query.Updatereturn the real match count instead of-1.- Pool
Getno longer callsIsOpen()under the pool mutex; health-check latency no longer stalls unrelatedGet/Putcalls. Transaction.Closenow surfaces FFI errors through the activity log instead of silently dropping them.
Debuggability
- Driver errors now carry the offending query string via
DriverError.Query— error messages read...: query=<...>on every FFI failure. TransactionContextleaks increment a counter in addition to logging, so leaks show up in metrics, not just stdout.QueryWithContextdocstring explicitly documents the single-threaded-Rust-handle constraint and what cancellation can and cannot do, killing a recurring false-positive in reviews.logFFIDurationcollapsed into a singlelogQueryDurationhelper; fewer hand-kept KV lists to drift apart.
Performance
- Msgpack decoders are pooled via
sync.Pooland reused across queries. parseValueStringrewritten withstrings.CutPrefix+strconv.ParseFloat— no morefmt.Sscanfon every aggregate row.- Query builders in
gotype/query.goandgotype/crud.gouse a singlestrings.Builderinstead offmt.Sprintf+strings.Joinchains. - Scalar field extraction no longer allocates a one-element
[]anyper field via a newvisitFieldValuescallback. ast.Compileris now reused across strategy calls.- Time hydration caches the last successful layout per field.
- Registry lookups by Go-type name use a secondary index instead of a linear scan.
Refactoring
ModelStrategysplit into composableInsertBuilder/MatchBuilder/FetchBuilderinterfaces.- Batch write scaffolding (Delete/DeleteMany/Update/UpdateMany/Put/PutMany) deduplicated into a shared helper.
- Fetch-item assembly centralized into one helper shared across strategies.
- Transaction query duration logging consolidated.
queryOperation/queryFingerprintcomputed once per query, not twice.
Build
check.shentry point for quality gates.golangci-lintthresholds tightened:gocyclo >= 20,dupl >= 75on non-test code.- Tests run with
-raceby default.
Install
```bash
go get github.com/CaliLuke/go-typeql@v1.9.0
```
Full Changelog: v1.8.1...v1.9.0
v1.8.1
Dependencies
- typedb-driver Rust crate bumped from
3.8.4-rc0to3.10.0 - typeql Rust crate added as direct dependency at
3.10.1 - TypeDB server image updated to
3.10.1for integration tests - TypeQL grammar reference updated to tag
3.10.1(no grammar changes from 3.10.0) Cargo.lockregenerated with all transitive updates
Other
- Release checklist extended with an upstream dependency version audit step
v1.8.0
Highlights
tqlgennow decodes escaped TypeQL string literals in schema annotations, including\uXXXXand\u{...}forms used in@regex(...)and@values(...).- The bundled Rust FFI crate now tracks
typedb-driver3.8.4-rc0. - Documentation was refreshed for the repo compose port mapping (
TEST_DB_ADDRESS=localhost:1730), Go 1.26.2, and the current install/release flow for prebuilt FFI archives.
Validation
- Unit tests: 401 passing
- Integration tests:
go test -tags "cgo,typedb,integration" ./driver/... ./gotype/...against local TypeDB onlocalhost:1730 - Coverage: 76.3% across
ast/,gotype/, andtqlgen/ - Linters:
go vet,golangci-lint, andstaticcheckall passed
Full Changelog: v1.7.0...v1.8.0
v1.7.0
Highlights
- Added a persistent benchmark harness wired into the test workflow, with results saved in
benchmarks/benchmarks.sqliteso performance progression ships with the repo. - Optimized the hydration hot path, cutting hydration time by 42-68% versus the original baseline while reducing hydration allocations by about 86%.
- Optimized compiler formatting and string assembly paths, improving
BenchmarkCompiler_CompileBatchby about 49% and cutting its allocations by about 53% versus baseline. - Updated the performance audit and supporting docs to reflect the measured improvements and the current testing workflow.
Validation
go test ./ast/... ./gotype/... ./tqlgen/...go test -tags "cgo,typedb,integration" ./driver/... ./gotype/...make benchmake build-rustgo vet ./...golangci-lint run ./...~/go/bin/staticcheck ./...
Benchmark Snapshot
Baseline run 1 vs release-prep run 7:
BenchmarkHydrate_10000Rows: 67.85% faster, 67.46% fewer bytes/op, 85.72% fewer allocs/opBenchmarkHydrate_1000Rows: 66.04% faster, 65.75% fewer bytes/op, 85.72% fewer allocs/opBenchmarkHydrate_100Rows: 67.28% faster, 65.93% fewer bytes/op, 85.67% fewer allocs/opBenchmarkHydrate_SingleRow: 42.04% faster, 66.67% fewer bytes/op, 85.71% fewer allocs/opBenchmarkCompiler_CompileBatch: 49.07% faster, 0.32% fewer bytes/op, 52.86% fewer allocs/opBenchmarkCompiler_FormatGoValue: 20.76% faster, bytes/op flat, 20.00% fewer allocs/op
v1.6.1
Full Changelog: v1.6.0...v1.6.1
v1.6.0
Highlights
- Add strict relation pattern support through ast.RelationPattern.IsStrict, allowing the compiler to emit isa! for strict relation matches.
- Publish the API surface that downstream code was already relying on locally, so builds no longer break when the workspace override is removed.
- Clarify the Rust FFI install path in the docs: go get downloads source only, while driver builds still require either make build-rust or a prebuilt libtypedb_go_ffi.a.
- Tighten the release checklist to validate Rust artifact generation, staticcheck, and release assets before and after publish.
Validation
- go test ./ast/... ./gotype/... ./tqlgen/...
- make build-rust
- go test -tags "cgo,typedb,integration" ./driver/... ./gotype/...
- go vet ./...
- golangci-lint run ./...
- ~/go/bin/staticcheck ./...
v1.5.2
Highlights
- Added Go and Rust debug-gated FFI boundary diagnostics for transaction lifecycle and query execution timing.
- Added query metadata logging:
query_opclassification and stablequery_fingerprinthashing (no raw query logging). - Added in-flight gauges and high-water tracking for transaction open/query concurrency with warning thresholds.
- Added debug leak signal for transactions finalized while still open.
- Added context deadline budget logging for
QueryWithContext. - Added startup-hang regression tests and a
make diagnose-startup-hangtarget that captures asampletrace on timeout. - Added dedicated docs page:
docs/DEBUGGING_HANGS.mdand linked it from README.
Validation
- Unit tests:
go test ./ast/... ./gotype/... ./tqlgen/... - Integration tests:
TEST_DB_ADDRESS=localhost:1730 go test -tags "cgo,typedb,integration" ./driver/... ./gotype/... - Startup smoke:
go test -tags "cgo,typedb" ./driver -run '^$' -count=1 -timeout 30s -v - Lint/static analysis:
go vet ./...,golangci-lint run ./...,~/go/bin/staticcheck ./...
v1.5.0
Highlights
- Added a new v2-style high-level fluent TypeQL API in the
astpackage with immutable chaining. - Added staged fluent builders (
MatchStage/MatchResultStage,FunctionStage/FunctionResultStage) so query method ordering is safer by type. - Added reusable query templates for common operations:
UpdateAttribute,DeleteArtifact,DeleteArtifactWithOptions, andPaginatedSearch. - Added pluggable identifier matching (
IdentifierMatcher) for IID-vs-attribute matching behavior.
Quality and Compatibility
Build()in fluent builders now returns(string, error)for explicit compile error handling.- Added fluent API unit tests and updated API docs for staged builder usage.
- Fixed lint findings in batch update query construction in
gotype. - Updated test/documentation metadata and refreshed generated API reference docs.
Infra
- Updated TypeDB test image version in compose config.
Full Changelog: v1.4.0...v1.5.0