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
This is a really cool idea but I can see some potential problems.
SELECT col1, col2, col3 FROM table1 WHERE col4=?
There's no way to know the type of col[1-4] from that query without connecting to the database and inspecting the schema. So this library goes from just parsing the query to actually needing to connect to the database at compile time. Also, the schema could be changed in the database after the Rust program is compiled.
This has existed for a few years:
https://www.haskell.org/haskellwiki/MetaHDBC
Essentially parses the query and generates type-safe code function @ compile time. Not sure how much of that is possible in Rust macros.
The text was updated successfully, but these errors were encountered: