You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a tree like scheme where the items can have parent from the same table what I need is to query the items whose parent is deleted
select * from items as c where not exists (select p.id from items as p where c.parent_id == p.id)
I tried to achieve this as :
let child = ItemTable.table.alias("child")
let parent = ItemTable.table.alias("parent")
let parentExists = parent.filter(child[ItemTable.parentId] == parent[ItemTable.id]).exists
let r = child.filter(parentExists)
but the last line gives the following compilation error :
Cannot invoke 'filter' with an argument list of type '(Select<Bool>)'
I can write the whole code in sql and run the query, but I need to achieve this using the ORM provided by SQLite Swift.
The text was updated successfully, but these errors were encountered:
I have a tree like scheme where the items can have parent from the same table what I need is to query the items whose parent is deleted
I tried to achieve this as :
but the last line gives the following compilation error :
I can write the whole code in sql and run the query, but I need to achieve this using the ORM provided by SQLite Swift.
The text was updated successfully, but these errors were encountered: