Skip to content

Specifiers

imshooter edited this page Nov 29, 2026 · 1 revision

The natives that format queries take these specifiers. A prepared statement takes the same ones, each a value bound as it is.

Specifier Writes
%d, %i an integer, with flags, width and precision as in printf
%u an unsigned integer
%x, %X, %o an integer in hexadecimal or octal
%b an integer in binary
%f a float with as many digits as it needs, or %.4f with four decimals
%F, %g, %G, %a, %A a float as in printf
%s a string as it is
%e a string escaped for a string literal
%q a string escaped and between quotes
%j a string as a JSON string, between double quotes
%Q the text of a builder
%% a percent sign

A float that is not finite writes NULL. In a statement, %i, %d and %x bind an integer, %u an unsigned one, %f a float, %s, %e, %q and %j a string, and %Q the text of a builder as a string.

Home

Guides

Reference

Functions

Connections
Queries
Cache
JSON cells
ORM
Queries built in pieces
Prepared statements
Batches
Transactions
Passwords
Callbacks

Clone this wiki locally