Replies: 2 comments 1 reply
-
Probably out of scope, unfortunately. I'm not aware of a C API surface for the parser itself in SQLite. Depending on your use case, authorizers or virtual tables might be of interest, but hard to say without knowing more about what you're looking for. |
Beta Was this translation helpful? Give feedback.
-
So I've been using http://sqlc.dev/ which lets you write SQL and have code generated for executing the queries and turning the results in Go structs etc. This works well enough but there's the possibility to do some more complicated things if we had better access to the schema. sqlc gives you some information but it would be nice to know things like constraints for columns etc, which is why I was hoping there was some way to hook into the SQL parser. I see references to lemon in the modernc code but that's about my limit for working out what voodoo is being done and whether it can be used for anything outside of sqlite's normal usage. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi - thanks for this library! I'm having great success using it along with sqlc. However, sqlc is a little basic in terms of what information it gives you about the parsed SQL queries.
I was wondering whether it was possible to get access to the SQLite SQL parser as part of the zombiezen/modernc code. I think there would be some great potential for code generation with full/better access to the schema and queries.
Apologies if this is out of scope or not possible - it was something that occurred to me while playing with sqlc.
Beta Was this translation helpful? Give feedback.
All reactions