Specify the type of parameters separately instead of casting at every use site #1580
CodesInChaos
started this conversation in
Ideas
Replies: 1 comment
-
You can already do this:
meaning that the proposed There's another limitation of current EdgeQL though: we cannot yet accept tuple query arguments. This is a limitation of Postgres, but I think we should be able to work around it. We'll basically need some new low-level mechanism to decode and re-encode tuples. Once that mechanism is implemented we can consider sugar syntax like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently when using parameters they need to be cast to the desired type at every use site. I consider this suboptimal for several reasons:
As an alternative I propose adding an optional separate section at the beginning of the query which assigns types to the parameters.
The driver could generate the
PARAMETERS
statement and combine it with the query using simple string concatenation.Beta Was this translation helpful? Give feedback.
All reactions