Cloud Spanner V1 Client - Class CreateSessionRequest (1.76.0)

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

The request for CreateSession.

Generated from protobuf message google.spanner.v1.CreateSessionRequest

Namespace

Google \ Cloud \ Spanner \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ database string

Required. The database in which the new session is created.

↳ session Google\Cloud\Spanner\V1\Session

Required. The session to create.

getDatabase

Required. The database in which the new session is created.

Returns
TypeDescription
string

setDatabase

Required. The database in which the new session is created.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSession

Required. The session to create.

Returns
TypeDescription
Google\Cloud\Spanner\V1\Session|null

hasSession

clearSession

setSession

Required. The session to create.

Parameter
NameDescription
var Google\Cloud\Spanner\V1\Session
Returns
TypeDescription
$this

static::build

Parameter
NameDescription
database string

Required. The database in which the new session is created. Please see Google\Cloud\Spanner\V1\SpannerClient::databaseName() for help formatting this field.

Returns
TypeDescription
Google\Cloud\Spanner\V1\CreateSessionRequest