Package types (3.55.0) Stay organized with collections Save and categorize content based on your preferences.
- 3.55.0 (latest)
- 3.54.0
- 3.53.0
- 3.52.0
- 3.51.0
- 3.50.1
- 3.46.0
- 3.45.0
- 3.44.0
- 3.43.0
- 3.42.0
- 3.41.0
- 3.40.1
- 3.39.0
- 3.38.0
- 3.37.0
- 3.36.0
- 3.35.1
- 3.34.0
- 3.33.0
- 3.32.0
- 3.31.0
- 3.30.0
- 3.29.0
- 3.28.0
- 3.27.1
- 3.26.0
- 3.25.0
- 3.24.0
- 3.23.0
- 3.22.2
- 3.21.0
- 3.20.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.1
- 3.14.1
- 3.13.0
- 3.12.1
- 3.11.1
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.1.1
- 2.0.0
- 1.19.3
- 1.18.0
- 1.17.1
- 1.16.0
- 1.15.1
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
API documentation forspanner_v1.types
package.
Classes
BatchCreateSessionsRequest
The request forBatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]
.
BatchCreateSessionsResponse
The response forBatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]
.
BatchWriteRequest
The request forBatchWrite][google.spanner.v1.Spanner.BatchWrite]
.
BatchWriteResponse
The result of applying a batch of mutations.
BeginTransactionRequest
The request forBeginTransaction][google.spanner.v1.Spanner.BeginTransaction]
.
CommitRequest
The request forCommit][google.spanner.v1.Spanner.Commit]
.
This message hasoneof
_ fields (mutually exclusive fields).For each oneof, at most one member field can be set at the same time.Setting any member of the oneof automatically clears all othermembers.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
CommitResponse
The response forCommit][google.spanner.v1.Spanner.Commit]
.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
CreateSessionRequest
The request forCreateSession][google.spanner.v1.Spanner.CreateSession]
.
DeleteSessionRequest
The request forDeleteSession][google.spanner.v1.Spanner.DeleteSession]
.
DirectedReadOptions
The DirectedReadOptions can be used to indicate which replicas orregions should be used for non-transactional reads or queries.
DirectedReadOptions may only be specified for a read-onlytransaction, otherwise the API will return anINVALID_ARGUMENT
error.
This message hasoneof
_ fields (mutually exclusive fields).For each oneof, at most one member field can be set at the same time.Setting any member of the oneof automatically clears all othermembers.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
ExecuteBatchDmlRequest
The request forExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]
.
ExecuteBatchDmlResponse
The response forExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]
.Contains a list ofResultSet][google.spanner.v1.ResultSet]
messages, one for each DML statement that has successfully executed,in the same order as the statements in the request. If a statementfails, the status in the response body identifies the cause of thefailure.
To check for DML statements that failed, use the following approach:
- Check the status in the response message. The
google.rpc.Code][google.rpc.Code]
enum valueOK
indicatesthat all statements were executed successfully. - If the status was not
OK
, check the number of result sets inthe response. If the response containsN
ResultSet][google.spanner.v1.ResultSet]
messages, then statementN+1
in the request failed.
Example 1:
- Request: 5 DML statements, all executed successfully.
- Response: 5
ResultSet][google.spanner.v1.ResultSet]
messages,with the statusOK
.
Example 2:
- Request: 5 DML statements. The third statement has a syntaxerror.
- Response: 2
ResultSet][google.spanner.v1.ResultSet]
messages,and a syntax error (INVALID_ARGUMENT
) status. The number ofResultSet][google.spanner.v1.ResultSet]
messages indicates thatthe third statement failed, and the fourth and fifth statementswere not executed.
ExecuteSqlRequest
The request forExecuteSql][google.spanner.v1.Spanner.ExecuteSql]
andExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql]
.
GetSessionRequest
The request forGetSession][google.spanner.v1.Spanner.GetSession]
.
KeyRange
KeyRange represents a range of rows in a table or index.
A range has a start key and an end key. These keys can be open orclosed, indicating if the range includes rows with that key.
Keys are represented by lists, where the ith value in the listcorresponds to the ith component of the table or index primary key.Individual values are encoded as describedhere][google.spanner.v1.TypeCode]
.
For example, consider the following table definition:
::
CREATE TABLE UserEvents ( UserName STRING(MAX), EventDate STRING(10)) PRIMARY KEY(UserName, EventDate);
The following keys name rows in this table:
::
["Bob", "2014-09-23"]["Alfred", "2015-06-12"]
Since theUserEvents
table'sPRIMARY KEY
clause names twocolumns, eachUserEvents
key has two elements; the first is theUserName
, and the second is theEventDate
.
Key ranges with multiple components are interpretedlexicographically by component using the table or index key'sdeclared sort order. For example, the following range returns allevents for user"Bob"
that occurred in the year 2015:
::
"start_closed": ["Bob", "2015-01-01"]"end_closed": ["Bob", "2015-12-31"]
Start and end keys can omit trailing key components. This affectsthe inclusion and exclusion of rows that exactly match the providedkey components: if the key is closed, then rows that exactly matchthe provided components are included; if the key is open, then rowsthat exactly match are not included.
For example, the following range includes all events for"Bob"
that occurred during and after the year 2000:
::
"start_closed": ["Bob", "2000-01-01"]"end_closed": ["Bob"]
The next example retrieves all events for"Bob"
:
::
"start_closed": ["Bob"]"end_closed": ["Bob"]
To retrieve events before the year 2000:
::
"start_closed": ["Bob"]"end_open": ["Bob", "2000-01-01"]
The following range includes all rows in the table:
::
"start_closed": []"end_closed": []
This range returns all users whoseUserName
begins with anycharacter from A to C:
::
"start_closed": ["A"]"end_open": ["D"]
This range returns all users whoseUserName
begins with B:
::
"start_closed": ["B"]"end_open": ["C"]
Key ranges honor column sort order. For example, suppose a table isdefined as follows:
::
CREATE TABLE DescendingSortedTable { Key INT64, ...) PRIMARY KEY(Key DESC);
The following range retrieves all rows with key values between 1 and100 inclusive:
::
"start_closed": ["100"]"end_closed": ["1"]
Note that 100 is passed as the start, and 1 is passed as the end,becauseKey
is a descending column in the schema.
This message hasoneof
_ fields (mutually exclusive fields).For each oneof, at most one member field can be set at the same time.Setting any member of the oneof automatically clears all othermembers.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
KeySet
KeySet
defines a collection of Cloud Spanner keys and/or keyranges. All the keys are expected to be in the same table or index.The keys need not be sorted in any particular way.
If the same key is specified multiple times in the set (for exampleif two ranges, two keys, or a key and a range overlap), CloudSpanner behaves as if the key were only specified once.
ListSessionsRequest
The request forListSessions][google.spanner.v1.Spanner.ListSessions]
.
ListSessionsResponse
The response forListSessions][google.spanner.v1.Spanner.ListSessions]
.
MultiplexedSessionPrecommitToken
When a read-write transaction is executed on a multiplexed session,this precommit token is sent back to the client as a part of the[Transaction] message in the BeginTransaction response and also as apart of the [ResultSet] and [PartialResultSet] responses.
Mutation
A modification to one or more Cloud Spanner rows. Mutations can beapplied to a Cloud Spanner database by sending them in aCommit][google.spanner.v1.Spanner.Commit]
call.
This message hasoneof
_ fields (mutually exclusive fields).For each oneof, at most one member field can be set at the same time.Setting any member of the oneof automatically clears all othermembers.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
PartialResultSet
Partial results from a streaming read or SQL query. Streamingreads and SQL queries better tolerate large result sets, largerows, and large values, but are a little trickier to consume.
Partition
Information returned for each partition returned in aPartitionResponse.
PartitionOptions
Options for a PartitionQueryRequest andPartitionReadRequest.
PartitionQueryRequest
The request forPartitionQuery][google.spanner.v1.Spanner.PartitionQuery]
PartitionReadRequest
The request forPartitionRead][google.spanner.v1.Spanner.PartitionRead]
PartitionResponse
The response forPartitionQuery][google.spanner.v1.Spanner.PartitionQuery]
orPartitionRead][google.spanner.v1.Spanner.PartitionRead]
PlanNode
Node information for nodes appearing in aQueryPlan.plan_nodes][google.spanner.v1.QueryPlan.plan_nodes]
.
QueryPlan
Contains an ordered list of nodes appearing in the queryplan.
ReadRequest
The request forRead][google.spanner.v1.Spanner.Read]
andStreamingRead][google.spanner.v1.Spanner.StreamingRead]
.
RequestOptions
Common request options for various APIs.
ResultSet
Results fromRead][google.spanner.v1.Spanner.Read]
orExecuteSql][google.spanner.v1.Spanner.ExecuteSql]
.
ResultSetMetadata
Metadata about aResultSet][google.spanner.v1.ResultSet]
orPartialResultSet][google.spanner.v1.PartialResultSet]
.
ResultSetStats
Additional statistics about aResultSet][google.spanner.v1.ResultSet]
orPartialResultSet][google.spanner.v1.PartialResultSet]
.
This message hasoneof
_ fields (mutually exclusive fields).For each oneof, at most one member field can be set at the same time.Setting any member of the oneof automatically clears all othermembers.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
RollbackRequest
The request forRollback][google.spanner.v1.Spanner.Rollback]
.
Session
A session in the Cloud Spanner API.
StructType
StructType
defines the fields of aSTRUCT][google.spanner.v1.TypeCode.STRUCT]
type.
Transaction
A transaction.
TransactionOptions
Transactions:
Each session can have at most one active transaction at a time (notethat standalone reads and queries use a transaction internally anddo count towards the one transaction limit). After the activetransaction is completed, the session can immediately be re-used forthe next transaction. It is not necessary to create a new sessionfor each transaction.
Transaction modes:
Cloud Spanner supports three transaction modes:
Locking read-write. This type of transaction is the only way towrite data into Cloud Spanner. These transactions rely onpessimistic locking and, if necessary, two-phase commit. Lockingread-write transactions may abort, requiring the application toretry.
Snapshot read-only. Snapshot read-only transactions provideguaranteed consistency across several reads, but do not allowwrites. Snapshot read-only transactions can be configured to readat timestamps in the past, or configured to perform a strong read(where Spanner will select a timestamp such that the read isguaranteed to see the effects of all transactions that havecommitted before the start of the read). Snapshot read-onlytransactions do not need to be committed.
Queries on change streams must be performed with the snapshotread-only transaction mode, specifying a strong read. Please see
TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong]
for more details.Partitioned DML. This type of transaction is used to execute asingle Partitioned DML statement. Partitioned DML partitions thekey space and runs the DML statement over each partition inparallel using separate, internal transactions that commitindependently. Partitioned DML transactions do not need to becommitted.
For transactions that only read, snapshot read-only transactionsprovide simpler semantics and are almost always faster. Inparticular, read-only transactions do not take locks, so they do notconflict with read-write transactions. As a consequence of nottaking locks, they also do not abort, so retry loops are not needed.
Transactions may only read-write data in a single database. Theymay, however, read-write data in different tables within thatdatabase.
Locking read-write transactions:
Locking transactions may be used to atomically read-modify-writedata anywhere in a database. This type of transaction is externallyconsistent.
Clients should attempt to minimize the amount of time a transactionis active. Faster transactions commit with higher probability andcause less contention. Cloud Spanner attempts to keep read locksactive as long as the transaction continues to do reads, and thetransaction has not been terminated byCommit][google.spanner.v1.Spanner.Commit]
orRollback][google.spanner.v1.Spanner.Rollback]
. Long periods ofinactivity at the client may cause Cloud Spanner to release atransaction's locks and abort it.
Conceptually, a read-write transaction consists of zero or morereads or SQL statements followed byCommit][google.spanner.v1.Spanner.Commit]
. At any time beforeCommit][google.spanner.v1.Spanner.Commit]
, the client can send aRollback][google.spanner.v1.Spanner.Rollback]
request to abort thetransaction.
Semantics:
Cloud Spanner can commit the transaction if all read locks itacquired are still valid at commit time, and it is able to acquirewrite locks for all writes. Cloud Spanner can abort the transactionfor any reason. If a commit attempt returnsABORTED
, CloudSpanner guarantees that the transaction has not modified any userdata in Cloud Spanner.
Unless the transaction commits, Cloud Spanner makes no guaranteesabout how long the transaction's locks were held for. It is an errorto use Cloud Spanner locks for any sort of mutual exclusion otherthan between Cloud Spanner transactions themselves.
Retrying aborted transactions:
When a transaction aborts, the application can choose to retry thewhole transaction again. To maximize the chances of successfullycommitting the retry, the client should execute the retry in thesame session as the original attempt. The original session's lockpriority increases with each consecutive abort, meaning that eachattempt has a slightly better chance of success than the previous.
Under some circumstances (for example, many transactions attemptingto modify the same row(s)), a transaction can abort many times in ashort period before successfully committing. Thus, it is not a goodidea to cap the number of retries a transaction can attempt;instead, it is better to limit the total amount of time spentretrying.
Idle transactions:
A transaction is considered idle if it has no outstanding reads orSQL queries and has not started a read or SQL query within the last10 seconds. Idle transactions can be aborted by Cloud Spanner sothat they don't hold on to locks indefinitely. If an idletransaction is aborted, the commit will fail with errorABORTED
.
If this behavior is undesirable, periodically executing a simple SQLquery in the transaction (for example,SELECT 1
) prevents thetransaction from becoming idle.
Snapshot read-only transactions:
Snapshot read-only transactions provides a simpler method thanlocking read-write transactions for doing several consistent reads.However, this type of transaction does not support writes.
Snapshot transactions do not take locks. Instead, they work bychoosing a Cloud Spanner timestamp, then executing all reads at thattimestamp. Since they do not acquire locks, they do not blockconcurrent read-write transactions.
Unlike locking read-write transactions, snapshot read-onlytransactions never abort. They can fail if the chosen read timestampis garbage collected; however, the default garbage collection policyis generous enough that most applications do not need to worry aboutthis in practice.
Snapshot read-only transactions do not need to callCommit][google.spanner.v1.Spanner.Commit]
orRollback][google.spanner.v1.Spanner.Rollback]
(and in fact are notpermitted to do so).
To execute a snapshot transaction, the client specifies a timestampbound, which tells Cloud Spanner how to choose a read timestamp.
The types of timestamp bound are:
- Strong (the default).
- Bounded staleness.
- Exact staleness.
If the Cloud Spanner database to be read is geographicallydistributed, stale read-only transactions can execute more quicklythan strong or read-write transactions, because they are able toexecute far from the leader replica.
Each type of timestamp bound is discussed in detail below.
Strong: Strong reads are guaranteed to see the effects of alltransactions that have committed before the start of the read.Furthermore, all rows yielded by a single read are consistent witheach other -- if any part of the read observes a transaction, allparts of the read see the transaction.
Strong reads are not repeatable: two consecutive strong read-onlytransactions might return inconsistent results if there areconcurrent writes. If consistency across reads is required, thereads should be executed within a transaction or at an exact readtimestamp.
Queries on change streams (see below for more details) must alsospecify the strong read timestamp bound.
SeeTransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong]
.
Exact staleness:
These timestamp bounds execute reads at a user-specified timestamp.Reads at a timestamp are guaranteed to see a consistent prefix ofthe global transaction history: they observe modifications done byall transactions with a commit timestamp less than or equal to theread timestamp, and observe none of the modifications done bytransactions with a larger commit timestamp. They will block untilall conflicting transactions that may be assigned commit timestamps<= the read timestamp have finished.
The timestamp can either be expressed as an absolute Cloud Spannercommit timestamp or a staleness relative to the current time.
These modes do not require a "negotiation phase" to pick atimestamp. As a result, they execute slightly faster than theequivalent boundedly stale concurrency modes. On the other hand,boundedly stale reads usually return fresher results.
SeeTransactionOptions.ReadOnly.read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp]
andTransactionOptions.ReadOnly.exact_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact_staleness]
.
Bounded staleness:
Bounded staleness modes allow Cloud Spanner to pick the readtimestamp, subject to a user-provided staleness bound. Cloud Spannerchooses the newest timestamp within the staleness bound that allowsexecution of the reads at the closest available replica withoutblocking.
All rows yielded are consistent with each other -- if any part ofthe read observes a transaction, all parts of the read see thetransaction. Boundedly stale reads are not repeatable: two stalereads, even if they use the same staleness bound, can execute atdifferent timestamps and thus return inconsistent results.
Boundedly stale reads execute in two phases: the first phasenegotiates a timestamp among all replicas needed to serve the read.In the second phase, reads are executed at the negotiated timestamp.
As a result of the two phase execution, bounded staleness reads areusually a little slower than comparable exact staleness reads.However, they are typically able to return fresher results, and aremore likely to execute at the closest replica.
Because the timestamp negotiation requires up-front knowledge ofwhich rows will be read, it can only be used with single-useread-only transactions.
SeeTransactionOptions.ReadOnly.max_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max_staleness]
andTransactionOptions.ReadOnly.min_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min_read_timestamp]
.
Old read timestamps and garbage collection:
Cloud Spanner continuously garbage collects deleted and overwrittendata in the background to reclaim storage space. This process isknown as "version GC". By default, version GC reclaims versionsafter they are one hour old. Because of this, Cloud Spanner cannotperform reads at read timestamps more than one hour in the past.This restriction also applies to in-progress reads and/or SQLqueries whose timestamp become too old while executing. Reads andSQL queries with too-old read timestamps fail with the errorFAILED_PRECONDITION
.
You can configure and extend theVERSION_RETENTION_PERIOD
of adatabase up to a period as long as one week, which allows CloudSpanner to perform reads up to one week in the past.
Querying change Streams:
A Change Stream is a schema object that can be configured to watchdata changes on the entire database, a set of tables, or a set ofcolumns in a database.
When a change stream is created, Spanner automatically defines acorresponding SQL Table-Valued Function (TVF) that can be used toquery the change records in the associated change stream using theExecuteStreamingSql API. The name of the TVF for a change stream isgenerated from the name of the change stream:READ_<change_stream_name>.
All queries on change stream TVFs must be executed using theExecuteStreamingSql API with a single-use read-only transaction witha strong read-only timestamp_bound. The change stream TVF allowsusers to specify the start_timestamp and end_timestamp for the timerange of interest. All change records within the retention period isaccessible using the strong read-only timestamp_bound. All otherTransactionOptions are invalid for change stream queries.
In addition, if TransactionOptions.read_only.return_read_timestampis set to true, a special value of 2^63 - 2 will be returned in theTransaction][google.spanner.v1.Transaction]
message that describesthe transaction, instead of a valid read timestamp. This specialvalue should be discarded and not used for any subsequent queries.
Please seehttps://cloud.google.com/spanner/docs/change-streams formore details on how to query the change stream TVFs.
Partitioned DML transactions:
Partitioned DML transactions are used to execute DML statements witha different execution strategy that provides different, and oftenbetter, scalability properties for large, table-wide operations thanDML in a ReadWrite transaction. Smaller scoped statements, such asan OLTP workload, should prefer using ReadWrite transactions.
Partitioned DML partitions the keyspace and runs the DML statementon each partition in separate, internal transactions. Thesetransactions commit automatically when complete, and runindependently from one another.
To reduce lock contention, this execution strategy only acquiresread locks on rows that match the WHERE clause of the statement.Additionally, the smaller per-partition transactions hold locks forless time.
That said, Partitioned DML is not a drop-in replacement for standardDML used in ReadWrite transactions.
The DML statement must be fully-partitionable. Specifically, thestatement must be expressible as the union of many statementswhich each access only a single row of the table.
The statement is not applied atomically to all rows of the table.Rather, the statement is applied atomically to partitions of thetable, in independent transactions. Secondary index rows areupdated atomically with the base table rows.
Partitioned DML does not guarantee exactly-once executionsemantics against a partition. The statement will be applied atleast once to each partition. It is strongly recommended that theDML statement should be idempotent to avoid unexpected results.For instance, it is potentially dangerous to run a statement suchas
UPDATE table SET column = column + 1
as it could be runmultiple times against some rows.The partitions are committed automatically - there is no supportfor Commit or Rollback. If the call returns an error, or if theclient issuing the ExecuteSql call dies, it is possible that somerows had the statement executed on them successfully. It is alsopossible that statement was never executed against other rows.
Partitioned DML transactions may only contain the execution of asingle DML statement via ExecuteSql or ExecuteStreamingSql.
If any error is encountered during the execution of thepartitioned DML operation (for instance, a UNIQUE INDEXviolation, division by zero, or a value that cannot be stored dueto schema constraints), then the operation is stopped at thatpoint and an error is returned. It is possible that at thispoint, some partitions have been committed (or even committedmultiple times), and other partitions have not been run at all.
Given the above, Partitioned DML is good fit for large,database-wide, operations that are idempotent, such as deleting oldrows from a very large table.
This message hasoneof
_ fields (mutually exclusive fields).For each oneof, at most one member field can be set at the same time.Setting any member of the oneof automatically clears all othermembers.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
TransactionSelector
This message is used to select the transaction in which aRead][google.spanner.v1.Spanner.Read]
orExecuteSql][google.spanner.v1.Spanner.ExecuteSql]
call runs.
SeeTransactionOptions][google.spanner.v1.TransactionOptions]
formore information about transactions.
This message hasoneof
_ fields (mutually exclusive fields).For each oneof, at most one member field can be set at the same time.Setting any member of the oneof automatically clears all othermembers.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Type
Type
indicates the type of a Cloud Spanner value, as might bestored in a table cell or returned from an SQL query.
TypeAnnotationCode
TypeAnnotationCode
is used as a part ofType][google.spanner.v1.Type]
to disambiguate SQL types that shouldbe used for a given Cloud Spanner value. Disambiguation is neededbecause the same Cloud Spanner type can be mapped to different SQLtypes depending on SQL dialect. TypeAnnotationCode doesn't affectthe way value is serialized.
TypeCode
TypeCode
is used as part ofType][google.spanner.v1.Type]
toindicate the type of a Cloud Spanner value.
Each legal value of a type can be encoded to or decoded from a JSONvalue, using the encodings described below. All Cloud Spanner valuescan benull
, regardless of type;null
\ s are always encodedas a JSONnull
.
If the schema has the column option `allow_commit_timestamp=true`, the placeholder string `"spanner.commit_timestamp()"` can be used to instruct the system to insert the commit timestamp associated with the transaction commit.DATE (5): Encoded as `string` in RFC 3339 date format.STRING (6): Encoded as `string`.BYTES (7): Encoded as a base64-encoded `string`, as described in RFC 4648, section 4.ARRAY (8): Encoded as `list`, where the list elements are represented according to `array_element_type][google.spanner.v1.Type.array_element_type]`.STRUCT (9): Encoded as `list`, where list element `i` is represented according to [struct_type.fields[i]][google.spanner.v1.StructType.fields].NUMERIC (10): Encoded as `string`, in decimal format or scientific notation format. Decimal format: `[+-]Digits[.[Digits]]` or `[+-][Digits].Digits` Scientific notation: `[+-]Digits[.[Digits]][ExponentIndicator[+-]Digits]` or `[+-][Digits].Digits[ExponentIndicator[+-]Digits]` (ExponentIndicator is `"e"` or `"E"`)JSON (11): Encoded as a JSON-formatted `string` as described in RFC 7159. The following rules are applied when parsing JSON input: - Whitespace characters are not preserved. - If a JSON object has duplicate keys, only the first key is preserved. - Members of a JSON object are not guaranteed to have their order preserved. - JSON array elements will have their order preserved.PROTO (13): Encoded as a base64-encoded `string`, as described in RFC 4648, section 4.ENUM (14): Encoded as `string`, in decimal format.INTERVAL (16): Encoded as `string`, in `ISO8601` duration format - `P[n]Y[n]M[n]DT[n]H[n]M[n[.fraction]]S` where `n` is an integer. For example, `P1Y2M3DT4H5M6.5S` represents time duration of 1 year, 2 months, 3 days, 4 hours, 5 minutes, and 6.5 seconds.UUID (17): Encoded as `string`, in lower-case hexa-decimal format, as described in RFC 9562, section 4.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-18 UTC.