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
let a = 4 in
[%pgsql dbh "execute" "something $a"]
~~
I think it work fine but I have tested something="drop table" and something="select" the last one work under MySQL but don't under postgresql. So I shout manually escape and execute ... 😭
this is also in feature request: ```
let b = Printf.sprintf "something '%d'" 5 in
[%pgsql dbh "execute" b]
EDIT: explain why I have strike text.
The text was updated successfully, but these errors were encountered:
Et7f3
changed the title
PPX support format to include value
Feature request: PPX support format to include value
Aug 8, 2019
I'm not sure I understand your first problem. Can you please provide more details?
As for the feature request:
let b = Printf.sprintf "something '%d'" 5 in
[%pgsql dbh "execute" b]
This is impossible, because of how the PPX works. The SQL expression (the string at the end of [% ... ]) is dealt with entirely at compile time, and cannot be made from a runtime value. Please let me know if this is clear enough, or check https://github.com/darioteixeira/pgocaml/blob/master/doc/HOW_IT_WORKS.txt for a better (albeit slightly outdated) explanation.
~~
~~
I think it work fine but I have tested something="drop table" and something="select" the last one work under MySQL but don't under postgresql. So I shout manually escape and execute ... 😭
this is also in feature request: ```
let b = Printf.sprintf "something '%d'" 5 in
[%pgsql dbh "execute" b]
The text was updated successfully, but these errors were encountered: