Cloud Spanner Client - Class CommitTimestamp (2.6.0)
Reference documentation and code samples for the Cloud Spanner Client class CommitTimestamp.
A special value which, when used, will set the field value to the value of
the commit timestamp.
Cloud Spanner allows users to designate a specific Timestamp column in the
table schema to contain commit timestamps. When writing to this column, a
manually-created timestamp (in the past) may be supplied, or Cloud Spanner
can populate it server-side.
Note that this special value cannot be used unless the column has been
annotated with support for commit timestamps:
CREATE TABLE myTable (
id STRING(100) NOT NULL,
commitTimestamp TIMESTAMP NOT NULL OPTIONS
(allow_commit_timestamp=true)
) PRIMARY KEY(id, commitTimestamp DESC)
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-03-18 UTC."],[],[]]