Reference documentation and code samples for the Cloud Spanner V1 Client class Session.
A session in the Cloud Spanner API.
Generated from protobuf message google.spanner.v1.Session
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Output only. The name of the session. This is always system-assigned. |
↳ labels |
array|Google\Protobuf\Internal\MapField
The labels for the session. * Label keys must be between 1 and 63 characters long and must conform to the following regular expression: |
↳ create_time |
Google\Protobuf\Timestamp
Output only. The timestamp when the session is created. |
↳ approximate_last_use_time |
Google\Protobuf\Timestamp
Output only. The approximate timestamp when the session is last used. It is typically earlier than the actual last use time. |
↳ creator_role |
string
The database role which created this session. |
getName
Output only. The name of the session. This is always system-assigned.
Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
string |
setName
Output only. The name of the session. This is always system-assigned.
Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getLabels
The labels for the session.
- Label keys must be between 1 and 63 characters long and must conform to
the following regular expression:
[a-z]([-a-z0-9]*[a-z0-9])?
.- Label values must be between 0 and 63 characters long and must conform
to the regular expression
([a-z]([-a-z0-9]*[a-z0-9])?)?
. - No more than 64 labels can be associated with a given session. See https://goo.gl/xmQnxf for more information on and examples of labels.
- Label values must be between 0 and 63 characters long and must conform
to the regular expression
Generated from protobuf field map<string, string> labels = 2;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\MapField |
setLabels
The labels for the session.
- Label keys must be between 1 and 63 characters long and must conform to
the following regular expression:
[a-z]([-a-z0-9]*[a-z0-9])?
.- Label values must be between 0 and 63 characters long and must conform
to the regular expression
([a-z]([-a-z0-9]*[a-z0-9])?)?
. - No more than 64 labels can be associated with a given session. See https://goo.gl/xmQnxf for more information on and examples of labels.
- Label values must be between 0 and 63 characters long and must conform
to the regular expression
Generated from protobuf field map<string, string> labels = 2;
Parameter | |
---|---|
Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
Returns | |
---|---|
Type | Description |
$this |
getCreateTime
Output only. The timestamp when the session is created.
Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasCreateTime
clearCreateTime
setCreateTime
Output only. The timestamp when the session is created.
Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getApproximateLastUseTime
Output only. The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
Generated from protobuf field .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasApproximateLastUseTime
clearApproximateLastUseTime
setApproximateLastUseTime
Output only. The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
Generated from protobuf field .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getCreatorRole
The database role which created this session.
Generated from protobuf field string creator_role = 5;
Returns | |
---|---|
Type | Description |
string |
setCreatorRole
The database role which created this session.
Generated from protobuf field string creator_role = 5;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |