We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.5.3
MacOS BigSur 11.6.4 (20G417)
7.3.0-alpha03
1.6.10
No response
Using WITH RECURSIVE does not generate required data class for query. Here's my sql:
WITH RECURSIVE
CREATE TABLE item ( id INTEGER PRIMARY KEY AUTOINCREMENT, parent_id INTEGER, children INTEGER NOT NULL ); test: WITH RECURSIVE descendants AS ( SELECT id, parent_id FROM item WHERE item.id = :id UNION ALL SELECT item.id, item.parent_id FROM item, descendants WHERE item.id = descendants.parent_id ) SELECT descendants.id, descendants.parent_id FROM descendants;
This also does not work (but changing 7 line to descendants AS ( fixes):
descendants AS (
CREATE TABLE item ( id INTEGER PRIMARY KEY AUTOINCREMENT, parent_id INTEGER ); test: WITH RECURSIVE descendants(id, parent_id) AS ( SELECT id, parent_id FROM item WHERE item.id = :id UNION ALL SELECT item.id, item.parent_id FROM item, descendants WHERE item.id = descendants.parent_id ) SELECT descendants.id, descendants.parent_id FROM descendants;
Here's generated query class, but Descendants cannot be found (red) as it is not generated.
Descendants
public interface ItemQueries : Transacter { public fun <T : Any> test(id: Long, mapper: (id: Long, parent_id: Long?) -> T): Query<T> public fun test(id: Long): Query<Descendants> }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
SQLDelight Version
1.5.3
Operating System
MacOS BigSur 11.6.4 (20G417)
Gradle Version
7.3.0-alpha03
Kotlin Version
1.6.10
AGP Version
No response
Describe the Bug
Using
WITH RECURSIVE
does not generate required data class for query. Here's my sql:This also does not work (but changing 7 line to
descendants AS (
fixes):Here's generated query class, but
Descendants
cannot be found (red) as it is not generated.The text was updated successfully, but these errors were encountered: