Skip to content

Releases: CaliLuke/go-typeql

v1.10.1

24 Apr 05:09

Choose a tag to compare

Highlights

  • Added caller-fast asynchronous transaction close for uncommitted driver transactions.
  • Added Transaction.CloseAsync, Transaction.CloseChecked, and driver.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.md and added the benchmark-gotypeql agent 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.sh passed.

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

24 Apr 05:03

Choose a tag to compare

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, and driver.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 16b15c1 and 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, and staticcheck passed.

v1.9.0

23 Apr 20:52

Choose a tag to compare

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.
  • ModelStrategy methods now return (string, error) so TypeQL compile failures propagate instead of silently emitting empty strings. Custom strategy implementations must update signatures.
  • ComparisonFilter.ToPatterns now 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 through Tx.QueryWithContext, so deadlines and cancellation reach the driver on bound-transaction and *Many paths that previously dropped ctx.
  • Database.TransactionContext(ctx, txType) / Begin(Context) / Conn.TransactionContext surface ctx at transaction open — pool Get can now honor caller deadlines.
  • InsertMany no longer mutates instance IIDs until after the batch commits, so a rollback leaves the caller's objects untouched.
  • Query.Delete / Query.Update return the real match count instead of -1.
  • Pool Get no longer calls IsOpen() under the pool mutex; health-check latency no longer stalls unrelated Get / Put calls.
  • Transaction.Close now 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.
  • TransactionContext leaks increment a counter in addition to logging, so leaks show up in metrics, not just stdout.
  • QueryWithContext docstring explicitly documents the single-threaded-Rust-handle constraint and what cancellation can and cannot do, killing a recurring false-positive in reviews.
  • logFFIDuration collapsed into a single logQueryDuration helper; fewer hand-kept KV lists to drift apart.

Performance

  • Msgpack decoders are pooled via sync.Pool and reused across queries.
  • parseValueString rewritten with strings.CutPrefix + strconv.ParseFloat — no more fmt.Sscanf on every aggregate row.
  • Query builders in gotype/query.go and gotype/crud.go use a single strings.Builder instead of fmt.Sprintf + strings.Join chains.
  • Scalar field extraction no longer allocates a one-element []any per field via a new visitFieldValues callback.
  • ast.Compiler is 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

  • ModelStrategy split into composable InsertBuilder / MatchBuilder / FetchBuilder interfaces.
  • 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 / queryFingerprint computed once per query, not twice.

Build

  • check.sh entry point for quality gates.
  • golangci-lint thresholds tightened: gocyclo >= 20, dupl >= 75 on non-test code.
  • Tests run with -race by default.

Install

```bash
go get github.com/CaliLuke/go-typeql@v1.9.0
```

Full Changelog: v1.8.1...v1.9.0

v1.8.1

23 Apr 18:38

Choose a tag to compare

Dependencies

  • typedb-driver Rust crate bumped from 3.8.4-rc0 to 3.10.0
  • typeql Rust crate added as direct dependency at 3.10.1
  • TypeDB server image updated to 3.10.1 for integration tests
  • TypeQL grammar reference updated to tag 3.10.1 (no grammar changes from 3.10.0)
  • Cargo.lock regenerated with all transitive updates

Other

  • Release checklist extended with an upstream dependency version audit step

v1.8.0

22 Apr 16:50

Choose a tag to compare

Highlights

  • tqlgen now decodes escaped TypeQL string literals in schema annotations, including \uXXXX and \u{...} forms used in @regex(...) and @values(...).
  • The bundled Rust FFI crate now tracks typedb-driver 3.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 on localhost:1730
  • Coverage: 76.3% across ast/, gotype/, and tqlgen/
  • Linters: go vet, golangci-lint, and staticcheck all passed

Full Changelog: v1.7.0...v1.8.0

v1.7.0

09 Mar 20:43

Choose a tag to compare

Highlights

  • Added a persistent benchmark harness wired into the test workflow, with results saved in benchmarks/benchmarks.sqlite so 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_CompileBatch by 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 bench
  • make build-rust
  • go 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/op
  • BenchmarkHydrate_1000Rows: 66.04% faster, 65.75% fewer bytes/op, 85.72% fewer allocs/op
  • BenchmarkHydrate_100Rows: 67.28% faster, 65.93% fewer bytes/op, 85.67% fewer allocs/op
  • BenchmarkHydrate_SingleRow: 42.04% faster, 66.67% fewer bytes/op, 85.71% fewer allocs/op
  • BenchmarkCompiler_CompileBatch: 49.07% faster, 0.32% fewer bytes/op, 52.86% fewer allocs/op
  • BenchmarkCompiler_FormatGoValue: 20.76% faster, bytes/op flat, 20.00% fewer allocs/op

v1.6.1

09 Mar 16:47

Choose a tag to compare

Full Changelog: v1.6.0...v1.6.1

v1.6.0

09 Mar 16:32

Choose a tag to compare

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

04 Mar 18:08

Choose a tag to compare

Highlights

  • Added Go and Rust debug-gated FFI boundary diagnostics for transaction lifecycle and query execution timing.
  • Added query metadata logging: query_op classification and stable query_fingerprint hashing (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-hang target that captures a sample trace on timeout.
  • Added dedicated docs page: docs/DEBUGGING_HANGS.md and 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

04 Mar 09:19

Choose a tag to compare

Highlights

  • Added a new v2-style high-level fluent TypeQL API in the ast package 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, and PaginatedSearch.
  • 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