You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add typed JSON parameter input for d1 query and raw #672
cf d1 query "$DATABASE_ID" \
--sql 'SELECT typeof(?1) AS n, typeof(?2) AS nil' \
--params 42.5 null
Flags return {"n":"text","nil":"text"}. Compare:
cf d1 query "$DATABASE_ID" --body \
'{"sql":"SELECT typeof(?1) AS n, typeof(?2) AS nil","params":[42.5,null]}'
The JSON body preserves real and null.
Requested: a typed JSON parameter option, such as --params-json '[42.5,null]', for query/raw commands. Preserve existing string parameter behavior, including the literal string "null". This is an input capability request; the raw-body workaround works.
We need to discuss as a team how this should be supported. I am not sure that postfixing param names with -json is necessarily the correct approach. Moving this feature request to a discussion while we decide what to do.
Activity
TheVicky1 commentedon Nov 18, 2026
Hey, i would like to work on this issue. Thanks!
petebacondarwin commentedon Nov 18, 2026
We need to discuss as a team how this should be supported. I am not sure that postfixing param names with
-jsonis necessarily the correct approach. Moving this feature request to a discussion while we decide what to do.