Skip to main content

MariaDB

DoubleDino supports native MariaDB queries through the /query endpoint.

The query is sent directly to MariaDB. DoubleDino does not rewrite or transform the query. MariaDB executes it normally, and DoubleDino transforms the returned values before sending the result to the client.

Query

Use normal MariaDB SQL:

curl -G "http://localhost:8080/query" \
--data-urlencode "q=SELECT * FROM orders WHERE id=1" \
-H "x-api-key: your-api-key"

Example response:

{
"id": 1,
"order_uid": "JHG-9685K",
"status": "processing",
"total_amount": "591.87"
}

The result keeps the original structure and data formats while sensitive values are transformed.

For example:

XTD-1234L → JHG-9685K
Alice → Dkyr

The exact transformed value depends on the configured secret key.

JSON

MariaDB JSON values are transformed recursively, including nested objects and arrays.

For example:

{
"customer": {
"name": "Alice",
"contacts": [
{
"email": "[email protected]"
}
]
}
}

can become:

{
"customer": {
"name": "Dkyr",
"contacts": [
{
"email": "[email protected]"
}
]
}
}

The surrounding JSON structure remains intact.

Preserved expressions

If enabled by your administrator, you can provide additional expressions that should remain unchanged using the x-preserve-expressions header.

curl -G "http://localhost:8080/query" \
--data-urlencode "q=SELECT * FROM orders" \
-H "x-api-key: your-api-key" \
-H "x-preserve-expressions: tracking metadata"

Dynamic expressions are available only when the administrator has enabled:

DD_ALLOW_DYNAMIC_EXPRESSIONS=true

Only use this when you need additional expressions to remain visible. Developers cannot change expressions configured by the administrator.

Read-only

DoubleDino Proxy does not modify the MariaDB source.

The query is executed by MariaDB, and only the returned result is transformed before it reaches the client.