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
A SQL-engine-agnostic AST and the ability to execute statements written in this AST
A fancy and user-friendly macro-powered S-expression notation for constructing this AST
The second piece is nice when performing operations on a known table structure, but when trying to write libraries that abstract over bits of SQL the first piece is more important. It doesn't seem like dynamic constructors for the AST are stable or well documented. Based on the project TODOs, I'm guessing more support for the dynamic API is expected in the future. What do you imagine it looking like?
For reference, I'm trying to write a function that basically pairs an insert statement with a delete statement in a single value to automatically construct and destruct a row in a database for integration tests.
The text was updated successfully, but these errors were encountered:
Yes, the dynamic representation is private, and it will probably stay that way.
The priority for the dynamic API would be to enable abstraction where it currently isn't possible. Greg's request in #1, for dynamic selection of ORDER BY columns and directions, is a good example.
Probably the most power would come from adding functions for the various non-terminals to parse run-time s-expressions (or syntax objects) into ASTs. I think I'd rather do that than try to make a general make-select-stmt function.
This package seems to provide two main pieces:
The second piece is nice when performing operations on a known table structure, but when trying to write libraries that abstract over bits of SQL the first piece is more important. It doesn't seem like dynamic constructors for the AST are stable or well documented. Based on the project TODOs, I'm guessing more support for the dynamic API is expected in the future. What do you imagine it looking like?
For reference, I'm trying to write a function that basically pairs an
insert
statement with adelete
statement in a single value to automatically construct and destruct a row in a database for integration tests.The text was updated successfully, but these errors were encountered: