SQL Parameters
SQL requests can pass parameter placeholders:
SELECT id, name FROM robots WHERE id = @id;
UPDATE robots SET name = @name WHERE id = @id;
Parameter values are bound by the client, shell command, HTTP request, or gRPC request that submits the SQL.
For hot statements that execute many times with different parameter values, see Prepared Statements. Prepared execution reuses the same SQL shape and sends only the parameter values after registration.
HTTP Example
{
"databaseName": "app",
"sql": "SELECT id, name FROM robots WHERE year >= @year",
"parameters": {
"@year": {
"type": 2,
"strValue": null,
"longValue": 1970,
"floatValue": 0,
"boolValue": false
}
}
}
See Prepared Statements, HTTP API, gRPC API, and .NET Driver for client-specific binding details.