Skip to content
Discussion options

You must be logged in to vote

Hi @ddunlea, thank you very much for the project, that was helpful to see what is going on!

And it's tricky, but the behavior you are seeing is to be expected. The problem is that a count() query always returns an integer, and so that forces something to be returned for the public let one: OneRecord in your @Selection. But because your tables are empty, it has no choice but to return NULL for the fields of "oneRecords".

You can verify this by running the queries directly in SQLite. I opened an in-memory database from the command line, copy-pasted the "CREATE TABLE" statements that your logs output, and then ran the query:

sqlite> SELECT "oneRecords"."id", "oneRecords"."name" AS "one", count(

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ddunlea
Comment options

Answer selected by ddunlea
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