$1, $2, … placeholders instead of hard-coded values. The actual values are supplied separately at execution time and substituted on the server side. This approach provides two key benefits:
- SQL injection protection – Parameter values are validated and escaped by Firebolt before being applied to the query, preventing malicious input from altering query logic.
- Code clarity – Queries remain readable and reusable regardless of the values being substituted.
.NET SDK
Repository: firebolt-db/firebolt-net-sdk AddpreparedStatementParamStyle=FbNumeric to your connection string to enable server-side parametrized queries, then use $1, $2, … as placeholders.
bool, byte, short, int, long, float, double, decimal, string, Guid, DateTime, DateOnly, DateTimeOffset, TimeOnly, byte[], and IList (arrays).
For more details, see the .NET SDK README.
Go SDK
Repository: firebolt-db/firebolt-go-sdk Pass a context with theFbNumeric style enabled when preparing or executing statements. Use $1, $2, … as placeholders.
JDBC driver
Repository: firebolt-db/jdbcDocumentation: Connecting with JDBC Add
preparedStatementParamStyle=FbNumeric to your JDBC connection properties to enable server-side parametrized queries, then use $1, $2, … as placeholders.
addBatch() and executeBatch().
Supported types: boolean, byte, short, int, long, float, double, BigDecimal, String, Date, Timestamp, byte[], and Array.
For more details, see the JDBC driver documentation.
Node.js SDK
Repository: firebolt-db/firebolt-node-sdkDocumentation: Connecting with Node.js Set
preparedStatementParamStyle: 'fb_numeric' in the connection options to enable server-side parametrized queries, then use $1, $2, … as placeholders.
namedParameters:
REST API
When calling the Firebolt query API directly (without an SDK), passquery_parameters as a URL query string parameter containing a JSON array that maps each $number placeholder to its value.
Format:
query_parameters value must be URL-encoded when passed as a query string. The example above shows it unencoded for readability.
Summary
| SDK / Driver | Placeholder syntax | How to enable |
|---|---|---|
| REST API | $1, $2, … | query_parameters URL query string parameter |
| .NET SDK | $1, $2, … | Connection string: preparedStatementParamStyle=FbNumeric |
| Go SDK | $1, $2, … | fireboltContext.WithPreparedStatementsStyle(..., PreparedStatementsStyleFbNumeric) |
| JDBC driver | $1, $2, … | Connection property: preparedStatementParamStyle=FbNumeric |
| Node.js SDK | $1, $2, … | Connection option: preparedStatementParamStyle: 'fb_numeric' |