Skip to main content

sql_modes

Creates, updates, deletes, gets or lists a sql_modes resource.

Overview

Namesql_modes
TypeResource
Iddigitalocean.databases.sql_modes

Fields

NameDatatypeDescription
column_anonstringA string specifying the configured SQL modes for the MySQL cluster.

Methods

NameAccessible byRequired ParamsDescription
databases_get_sql_modeSELECTdatabase_cluster_uuidTo 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_modeEXECdatabase_cluster_uuid, data__sql_modeTo 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 }}';