Skip to content

Can GRDB parse a SQL query string into a QueryInterfaceRequest<Row>? #1201

Answered by groue
mallman asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @mallman!

There is no built-in conversion from SQLRequest to QueryInterfaceRequest, because GRDB does not contain any SQL parser at all!

As far as I know, SQLite does not expose any parsing function. And shipping a home-made parser is 1. a difficult task, 2. begging for troubles.

It is begging for troubles because the slightest difference between GRDB parsing vs. SQLite parsing would be... a GRDB bug that users would be entitled to report. I don't want to ship code that generates bugs as time passes and SQLite evolves. It is not sustainable to live at the rhythm of iOS/macOS/SQLite releases. And did I mention the huge number of SQLite versions supported by the library, considering its …

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@mallman
Comment options

mallman Apr 14, 2022
Collaborator Author

@groue
Comment options

@mallman
Comment options

mallman Apr 18, 2022
Collaborator Author

@mallman
Comment options

mallman Apr 18, 2022
Collaborator Author

@groue
Comment options

Answer selected by mallman
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants