Experimental, optional layer for PostgreSQL dialect ergonomics around Cloud Spanner — built on top of:
github.com/apstndb/spanvalue—GenericColumnValueformatting and constructorshub.lumenfield.work/apstndb/spantype—google.spanner.v1.Typestring rendering
The module API is unstable until declared otherwise.
FormatPostgreSQLType— render agoogle.spanner.v1.Typeusing PostgreSQL-dialect spellings (includingSTRUCT<…>andjson/jsonbby annotation).StatementParamKey/PostgreSQLPlaceholder— pair$nplaceholders withspanner.Statement.Paramskeys (p1,p2, …), matching the client convention (seeintegration/pgtypeannotation).PostgreSQLLiteralFormatConfig/FormatColumnPostgreSQLLiteral/FormatRowPostgreSQLLiteral— formatGenericColumnValue/*spanner.Rowvalues as PostgreSQL literal SQL and reject Spanner types the PostgreSQL interface does not support.FormatColumnSimple— delegates tospanvalue.SimpleFormatConfigfor readable column text.
go.mod pins github.com/apstndb/spanvalue v0.2.1 and github.com/apstndb/spantype v0.3.11. The API remains unstable until declared otherwise.
The nested module integration/pgtypeannotation runs PostgreSQL-dialect Spanner client probes (emulator or real instance). It is not part of root go test ./...; use make test-integration (see Makefile and .github/workflows/go.yml).
go test ./...
go vet ./...MIT — see LICENSE.