package
1.36.0
Repository: https://github.com/lingio/go-common.git
Documentation: pkg.go.dev

# README

spanner

Spanner utilities:

  • ChangeStreamReader with ChangeStreamHandler
  • DetectDialect for postgres / google sql dialect

integration testing

Using default credentials:

SPANNER_TEST_PROJECT_ID=lingio-stage \
SPANNER_TEST_INSTANCE_ID=lingio-staging-1 \
SPANNER_TEST_DATABASE_ID=test \
go test ./spanner

otherwise, add SPANNER_TEST_CREDENTIALS_BASE64=base64-encoded-jsoncreds.

# Functions

ChangeStreamHandler returns a change stream handler that converts spanner change stream records with primary key type K, calling the provided handler function with the record data and key.
No description provided by the author
NewChangeStreamReader creates a new reader.
NewChangeStreamReaderWithConfig creates a new reader with a given configuration.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

ChangeRecord is the single unit of the records from the change stream.
ChangeStreamReader is the change stream reader.
ChangeStreamReaderConfig is the configuration for the reader.
No description provided by the author
ChildPartition contains the child partition token.
ChildPartitionsRecord contains the child partitions of the stream.
ColumnType is the metadata of the column.
DataChangeRecord contains a set of changes to the table.
HeartbeatRecord is the heartbeat record returned from Cloud Spanner.
Mod is the changes that were made on the table.
ReadResult is the result of the read change records from the partition.

# Type aliases

No description provided by the author