Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code generation? #106

Closed
delaneyj opened this issue Dec 6, 2020 · 1 comment
Closed

Code generation? #106

delaneyj opened this issue Dec 6, 2020 · 1 comment

Comments

@delaneyj
Copy link

delaneyj commented Dec 6, 2020

There has been talk of sqlc's code generation supporting crawsahw/sqlite. It made me think since SQLite is such a different database would it make more sense as something handled directly in a tool like sqlitex? My guess is the driver is not aware enough of the contents to generate code but may have more insight than i realize.

@AdamSLevy
Copy link
Collaborator

In general this package is a fairly thin wrapper around the actual sqlite C API. It doesn't perform any analysis on queries although it does provide statement caching within a Conn. This speeds up subsequent Prepares. However the caching doesn't know anything about the query, it just uses the query string as the key.

In other words, this library does not parse SQL. Does that answer your question? I don't have the context on sqlc or the discussion you linked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants