docs / drivers-go
Go driver
Path: `drivers/go`. Import github.com/bzync/nextsql/drivers/go.
Query returns *Rows (Next, Values, Columns, Close). Canceling the Query context opens a side connection and cancels the in-flight statement.
Continuous change streams use the same API and cancellation path, including prepared statements:
Persist resume_token only after processing every row in its transaction. See Change streams.
For --require-client-key, set Config.KeyProvider (never a URL). Remote connections need a tls.Config with TLS 1.3 and a CA.
To authenticate with a signed short-lived credential, put the NSSC1. value in Config.Password — no other change. See security.
Experimental ENCRYPTED CLIENT columns use the separate Config.FieldKeys provider. Call EncryptField(ctx, table, column, logicalValue) before binding and DecryptField(ctx, table, column, logicalType, resultValue) after a bare projection. MemoryFieldKeyring is bounded convenience storage for keys already loaded from a secret manager; it is not a durable KMS. The field key is never sent to nextsqld. Equivalent helpers now ship in Node.js/TypeScript, Bun, Deno, and PHP; PITR and HA coverage remain open, so this capability is not production-gated.
Multi-statement transactions are a session of BEGIN / statements / COMMIT on the same connection: