Cloud Spanner V1 Client - Class KeyRecipe (2.1.0)

Reference documentation and code samples for the Cloud Spanner V1 Client class KeyRecipe.

A KeyRecipe provides the metadata required to translate reads, mutations, and queries into a byte array in "sortable string format" (ssformat)that can be used with Ranges to route requests. Note that the client must tolerate KeyRecipes that appear to be invalid, since the KeyRecipe format may change over time. Requests with invalid KeyRecipes should be routed to a default server.

Generated from protobuf message google.spanner.v1.KeyRecipe

Namespace

Google \ Cloud \ Spanner \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ table_name string

A table name, matching the name from the database schema.

↳ index_name string

An index name, matching the name from the database schema.

↳ operation_uid int|string

The UID of a query, matching the UID from RoutingHint.

↳ part array<KeyRecipe\Part>

Parts are in the order they should appear in the encoded key.

getTableName

A table name, matching the name from the database schema.

Returns
Type Description
string

hasTableName

setTableName

A table name, matching the name from the database schema.

Parameter
Name Description
var string
Returns
Type Description
$this

getIndexName

An index name, matching the name from the database schema.

Returns
Type Description
string

hasIndexName

setIndexName

An index name, matching the name from the database schema.

Parameter
Name Description
var string
Returns
Type Description
$this

getOperationUid

The UID of a query, matching the UID from RoutingHint.

Returns
Type Description
int|string

hasOperationUid

setOperationUid

The UID of a query, matching the UID from RoutingHint.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getPart

Parts are in the order they should appear in the encoded key.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setPart

Parts are in the order they should appear in the encoded key.

Parameter
Name Description
var array<KeyRecipe\Part>
Returns
Type Description
$this

getTarget

Returns
Type Description
string