More support for association existence check

New: support for associated tables WITHOUT ROWID with a compound primary key
New: support for associated views

Checking for the existence of associated CTEs is still not implemented (it fails with "table does not exist" error).
This commit is contained in:
Gwendal Roué committed 2021-12-12 16:43:40 +01:00
1 parent dcc2d211b2
commit 7001b60cf7
5 files changed
+182 -23

No files matched your search

@@ -437,8 +437,7 @@ public class TableAlias: Hashable {
/// return try request.fetchAll(db)
/// }
public var exists: SQLExpression {
// TODO: this fails with SQL views. Can we do something?
SQLExpression.qualifiedFastPrimaryKey(self) != nil
SQLExpression.qualifiedExists(self)
}
/// :nodoc: