sql_modes
Creates, updates, deletes, gets or lists a sql_modes
resource.
Overview
Name | sql_modes |
Type | Resource |
Id | digitalocean.databases.sql_modes |
Fields
Name | Datatype | Description |
---|---|---|
column_anon | string | A string specifying the configured SQL modes for the MySQL cluster. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
databases_get_sql_mode | SELECT | database_cluster_uuid | To retrieve the configured SQL modes for an existing MySQL cluster, send a GET request to /v2/databases/$DATABASE_ID/sql_mode . The response will be a JSON object with a sql_mode key. This will be set to a string representing the configured SQL modes. |
databases_update_sql_mode | EXEC | database_cluster_uuid, data__sql_mode | To configure the SQL modes for an existing MySQL cluster, send a PUT request to /v2/databases/$DATABASE_ID/sql_mode specifying the desired modes. See the official MySQL 8 documentation for a full list of supported SQL modes. A successful request will receive a 204 No Content status code with no body in response. |
SELECT
examples
To retrieve the configured SQL modes for an existing MySQL cluster, send a GET request to /v2/databases/$DATABASE_ID/sql_mode
. The response will be a JSON object with a sql_mode
key. This will be set to a string representing the configured SQL modes.
SELECT
column_anon
FROM digitalocean.databases.sql_modes
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}';