karlseguin / pg.zig

Native PostgreSQL driver / client for Zig
MIT License
250 stars 18 forks source link

named params? #29

Closed sdykae closed 3 months ago

sdykae commented 3 months ago

is there a way to query with named params with the semicolon notation :param1 select * from table where id = :param1

karlseguin commented 3 months ago

No. It isn't something I think I want to add. PostgreSQL doesn't support this itself - it only supports positional parameters. The client/library has to do the transformation from named parameters -> positional itself. This means parsing the statement and doing the substitution.

sdykae commented 3 months ago

understood thanks