Reference documentation and code samples for the Google Cloud Oracle Database V1 Client class SqlParameter.
Represents a bind variable (parameter) for SQL execution.
Generated from protobuf message google.cloud.oracledatabase.v1.SqlParameter
Namespace
Google \ Cloud \ OracleDatabase \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Optional. The name of the SQL bind parameter (excluding the leading colon, e.g. "id"). If omitted, parameters bind positionally based on their order in the list. |
↳ value |
Google\Protobuf\Value
Required. Use protobuf.Value so clients can pass ints, bools, and strings natively. |
↳ type_name |
string
Optional. Optional: Datatype hint for the parameter (e.g., "VARCHAR2", "NUMBER", "DATE", "TIMESTAMP"). If omitted, the Oracle driver will infer the type from the value string. |
getName
Optional. The name of the SQL bind parameter (excluding the leading colon, e.g. "id"). If omitted, parameters bind positionally based on their order in the list.
| Returns | |
|---|---|
| Type | Description |
string |
|
setName
Optional. The name of the SQL bind parameter (excluding the leading colon, e.g. "id"). If omitted, parameters bind positionally based on their order in the list.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getValue
Required. Use protobuf.Value so clients can pass ints, bools, and strings natively.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Value|null |
|
hasValue
clearValue
setValue
Required. Use protobuf.Value so clients can pass ints, bools, and strings natively.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Protobuf\Value
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getTypeName
Optional. Optional: Datatype hint for the parameter (e.g., "VARCHAR2", "NUMBER", "DATE", "TIMESTAMP"). If omitted, the Oracle driver will infer the type from the value string.
| Returns | |
|---|---|
| Type | Description |
string |
|
setTypeName
Optional. Optional: Datatype hint for the parameter (e.g., "VARCHAR2", "NUMBER", "DATE", "TIMESTAMP"). If omitted, the Oracle driver will infer the type from the value string.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|