Skip to content

mysql

MySQL storage, used to define the MySQL instance, database, table, and connection metadata required for query planning.

Kind: mysql

Every element shares the standard envelope kind · metadata · schema.

spec fields

FieldTypeRequiredDefaultDescription
endpointstringyesThe MySQL instance endpoint, usually in host:port format.
databasestringyesThe default database name to query.
tablestringThe default table name to query. It can be overridden by the DataSet or query parameters.
sql_templatestringOptional SQL template for special query planning scenarios. The template must keep read-only semantics and should not contain INSERT, UPDATE, DELETE, DDL, or similar statements.
sql_dialectenum: mysql, ansimysqlSQL dialect. MySQL storage uses mysql by default.
time_fieldstringTime field used to push request time ranges into SQL WHERE conditions.
time_unitenum: second, millisecond, microsecond, nanosecond, datetimesecondTime unit of time_field. Defaults to second.
default_limitinteger1000Default SQL LIMIT when no explicit limit is provided.
max_limitinteger10000Maximum SQL LIMIT allowed by the planner to avoid producing excessively large query plans.
read_onlybooleantrueIndicates whether this storage should only plan read-only queries. Defaults to true; UModel PaaS query planning should not generate write statements.
credential_refstringCredential reference, for example secret://mysql-prod-readonly. Plaintext usernames, passwords, or tokens must not be stored in UModel.
tls_modeenum: disabled, preferred, required, verify_ca, verify_identitypreferredMySQL TLS mode. Defaults to preferred.
propertiesmap<string, string>Additional non-sensitive MySQL configuration, stored as key-value pairs.
tagsmap<string, string>Tags used to describe this MySQL storage.

Released under the Apache-2.0 License.