Cloud Spanner V1 Client - Class KeyRecipe (2.2.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 Range s to route requests. Note that the client must tolerate KeyRecipe s that appear to be invalid, since the KeyRecipe format may change over time. Requests with invalid KeyRecipe s 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

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
Design a Mobile Site
View Site in Mobile | Classic
Share by: