Reference documentation and code samples for the Google Cloud AlloyDB for PostgreSQL V1 Client class ExecuteSqlRequest.
Request for ExecuteSql rpc.
Generated from protobuf message google.cloud.alloydb.v1.ExecuteSqlRequest
Namespace
Google \ Cloud \ AlloyDb \ V1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ password |
string
Optional. The database native user’s password. |
↳ instance |
string
Required. The instance where the SQL will be executed. For the required format, see the comment on the Instance.name field. |
↳ database |
string
Required. Name of the database where the query will be executed. Note - Value provided should be the same as expected from |
↳ user |
string
Required. Database user to be used for executing the SQL. Note - Value provided should be the same as expected from |
↳ sql_statement |
string
Required. SQL statement to execute on database. Any valid statement is permitted, including DDL, DML, DQL statements. |
getPassword
Optional. The database native user’s password.
Returns | |
---|---|
Type | Description |
string |
hasPassword
setPassword
Optional. The database native user’s password.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getInstance
Required. The instance where the SQL will be executed. For the required format, see the comment on the Instance.name field.
Returns | |
---|---|
Type | Description |
string |
setInstance
Required. The instance where the SQL will be executed. For the required format, see the comment on the Instance.name field.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDatabase
Required. Name of the database where the query will be executed.
Note - Value provided should be the same as expected from SELECT
current_database();
and NOT as a resource reference.
Returns | |
---|---|
Type | Description |
string |
setDatabase
Required. Name of the database where the query will be executed.
Note - Value provided should be the same as expected from SELECT
current_database();
and NOT as a resource reference.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getUser
Required. Database user to be used for executing the SQL.
Note - Value provided should be the same as expected from
SELECT current_user;
and NOT as a resource reference.
Returns | |
---|---|
Type | Description |
string |
setUser
Required. Database user to be used for executing the SQL.
Note - Value provided should be the same as expected from
SELECT current_user;
and NOT as a resource reference.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getSqlStatement
Required. SQL statement to execute on database. Any valid statement is permitted, including DDL, DML, DQL statements.
Returns | |
---|---|
Type | Description |
string |
setSqlStatement
Required. SQL statement to execute on database. Any valid statement is permitted, including DDL, DML, DQL statements.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getUserCredential
Returns | |
---|---|
Type | Description |
string |
static::build
Parameters | |
---|---|
Name | Description |
instance |
string
Required. The instance where the SQL will be executed. For the required format, see the comment on the Instance.name field. Please see AlloyDBAdminClient::instanceName() for help formatting this field. |
database |
string
Required. Name of the database where the query will be executed.
Note - Value provided should be the same as expected from |
user |
string
Required. Database user to be used for executing the SQL.
Note - Value provided should be the same as expected from
|
sqlStatement |
string
Required. SQL statement to execute on database. Any valid statement is permitted, including DDL, DML, DQL statements. |
password |
string
Optional. The database native user’s password. |
Returns | |
---|---|
Type | Description |
ExecuteSqlRequest |