Reference documentation and code samples for the Cloud Spanner V1 Client class ColumnMetadata.
Metadata for a column.
Generated from protobuf message google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
Namespace
Google \ Cloud \ Spanner \ V1 \ ChangeStreamRecord \ DataChangeRecordMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Name of the column. |
↳ type |
Google\Cloud\Spanner\V1\Type
Type of the column. |
↳ is_primary_key |
bool
Indicates whether the column is a primary key column. |
↳ ordinal_position |
int|string
Ordinal position of the column based on the original table definition in the schema starting with a value of 1. |
getName
Name of the column.
Returns | |
---|---|
Type | Description |
string |
setName
Name of the column.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getType
Type of the column.
Returns | |
---|---|
Type | Description |
Google\Cloud\Spanner\V1\Type|null |
hasType
clearType
setType
Type of the column.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Spanner\V1\Type
|
Returns | |
---|---|
Type | Description |
$this |
getIsPrimaryKey
Indicates whether the column is a primary key column.
Returns | |
---|---|
Type | Description |
bool |
setIsPrimaryKey
Indicates whether the column is a primary key column.
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getOrdinalPosition
Ordinal position of the column based on the original table definition in the schema starting with a value of 1.
Returns | |
---|---|
Type | Description |
int|string |
setOrdinalPosition
Ordinal position of the column based on the original table definition in the schema starting with a value of 1.
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |