Gwendal Roué
665770c50c
Remove all ABI annotations
2021-08-21 13:14:54 +02:00
Gwendal Roué
76852c1f9c
Improve documentation about handling of NULL in foreign keys
2021-06-27 15:36:43 +02:00
Gwendal Roué
2f36fc06f5
Fix failing tests for #999
2021-06-27 15:36:12 +02:00
Gwendal Roué
0098369e29
Simplify Refinable
2021-06-27 13:11:26 +02:00
Gwendal Roué
1297a781fd
Better fatal error messages for unimplemented features
2021-03-27 16:41:23 +01:00
Gwendal Roué
1f27e724c9
Open a door
2021-03-09 07:21:43 +01:00
Gwendal Roué
ed3d1e1ac4
selectOnly() clears the isDistinct flag
2021-03-08 21:36:09 +01:00
Gwendal Roué
4521e6b37d
Make filterPromise an optional promise instead of a promise of optional
...
This way, filterPromise and havingExpressionPromise have the same type
2021-03-08 21:25:27 +01:00
Gwendal Roué
a655974eb0
Let joined associations use CTEs
2021-03-08 14:10:38 +01:00
Gwendal Roué
d2a22ddd97
Make sure joined associations do not use prefetched to-many features
...
One can't join a distinct, grouped, or limited association.
2021-03-07 19:56:04 +01:00
Gwendal Roué
ea6a052b73
Merge all SQLRelation properties
2021-03-07 17:12:44 +01:00
Gwendal Roué
f49fab0cff
Merge SQLQuery into SQLRelation
2021-03-07 14:37:53 +01:00
Gwendal Roué
10a16ac6f0
Rename .allNotPrefetched to .bridge
2021-02-18 08:42:01 +01:00
Gwendal Roué
d7f61fa0f5
Documentation
2021-02-18 07:58:10 +01:00
Gwendal Roué
e40534942c
format
2021-02-17 18:19:52 +01:00
Gwendal Roué
de52856cf3
Aliasing is not qualifying
2021-02-17 18:11:00 +01:00
Gwendal Roué
c4620aa587
SQLRelation no longer depends on SQLExpressible and _JoinableRequest
...
Those are one level up
2021-02-17 17:43:57 +01:00
Gwendal Roué
15b892af6e
Implement filters with SQLExpression? instead of [SQLExpression]
...
Those arrays were introduced so that we can generate nicer sql: `a AND b AND c`, instead of `(a AND b) AND c`.
This flattening is provided by the && operator and `SQLExpression.associativeBinary`, so those arrays are no longer needed.
2021-02-17 08:45:57 +01:00
Gwendal Roué
920417beb3
Replace protocols with enums
2021-02-14 18:28:15 +01:00
Gwendal Roué
40389ee102
Decouple associations from their origin database table
...
This allows us to create an association without providing the origin table name, and thus to build association without TableRecord.
2021-02-07 16:01:34 +01:00
Gwendal Roué
8bf9e5e30f
Decouple associations from TableRecord
...
Associations is generic for type safety, not for defining the association (just as QueryInterfaceRequest)
2021-01-23 09:48:18 +01:00
Gwendal Roué
836efb120f
Xcode 12.3 formatting
2020-12-23 12:13:05 +01:00
Gwendal Roué
6abbf82a89
So long, visitor pattern!
2020-12-23 09:02:17 +01:00
Gwendal Roué
9b15011f17
Move singularity test to SQLAssociationCardinality
2020-12-13 18:29:48 +01:00
Gwendal Roué
6a68e31903
Clarify handling of NULL in foreign keys
2020-12-12 12:40:50 +01:00
Gwendal Roué
b70f85d94b
Fix #871
2020-12-12 12:40:49 +01:00
Gwendal Roué
b60f39e7cc
Merge branch 'development' into dev/cte
...
# Conflicts:
# GRDB/QueryInterface/Request/Association/Association.swift
# GRDB/QueryInterface/Request/QueryInterfaceRequest.swift
# GRDB/QueryInterface/SQL/SQLQuery.swift
# GRDB/QueryInterface/SQLGeneration/SQLGenerationContext.swift
# GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift
2020-12-05 12:31:52 +01:00
Gwendal Roué
1e2d07a16f
Simplify SQLSource
...
SQLSource used to be more or less able to deal with subqueries, as in SELECT ... FROM (SELECT ...).
But we had only one use case for it, the "trivial count query": SELECT COUNT(*) FROM (SELECT ...). And many opportunities for fatal errors, because such subqueries were not generally supported.
So we simplify SQLSource, and implement the trivial count query in another way.
2020-12-05 12:21:14 +01:00
Gwendal Roué
66b23d423f
Cleanup JoinAssociation
2020-12-05 10:54:31 +01:00
Gwendal Roué
836a0a5e37
Documentation
2020-12-03 19:15:57 +01:00
Gwendal Roué
64776682fe
Drop USING clause until actually needed
2020-12-03 09:21:19 +01:00
Gwendal Roué
4ee6f3293a
CTE columns are provided as strings
2020-12-03 08:34:43 +01:00
Gwendal Roué
0f6d36bfc2
Cleanup
2020-12-03 07:07:39 +01:00
Gwendal Roué
a70b42cbf5
Extract SQLAssociationCondition.using
2020-12-01 20:30:36 +01:00
Gwendal Roué
1238843a44
Cleanup
2020-12-01 19:33:43 +01:00
Gwendal Roué
c36fc2813b
Include a raw SQL CTE
2020-11-30 19:29:54 +01:00
Gwendal Roué
ec2640a459
CommonTableExpression is a table, after all
2020-11-30 19:21:46 +01:00
Gwendal Roué
36a8cd1352
CTE merging WIP: we need to postpone TableAlias creation
2020-11-29 19:33:46 +01:00
Gwendal Roué
2bb9f5ce0d
First joins with CommonTableExpression
2020-11-29 19:05:12 +01:00
Gwendal Roué
b6ef89c116
Prefetch cleanup
2020-11-29 11:58:15 +01:00
Gwendal Roué
2f54eda08a
Fix #812
2020-07-23 08:46:05 +02:00
Gwendal Roué
68785d1c2d
Hide _SQLAssociation
2020-07-05 16:21:28 +02:00
Gwendal Roué
90f2642ec6
Make good use of the visitor pattern
2020-07-05 15:07:52 +02:00
Gwendal Roué
4c3029e5c1
Not a bug after all
...
But add comments, and an extra test for compound primary keys
2020-07-02 19:09:46 +02:00
Gwendal Roué
46e9e28a3f
Spot a bug in JoinMapping.joinExpression(leftRows:)
2020-07-02 08:49:55 +02:00
Gwendal Roué
268a45a635
Prepare for different kinds of SQLAssociationCondition
2020-07-02 08:29:49 +02:00
Gwendal Roué
ab97ceb784
TableRecord.primaryKey
2020-06-15 14:08:50 +02:00
Gwendal Roué
da4b96c2ca
Cleanup handling of subquery sources
2020-05-01 15:42:01 +02:00
Gwendal Roué
39f327fcb3
Optimize SQLAssociationCondition.filteringExpression(_:leftRows:)
...
And make sure we compute a correct database region for association requests
2020-05-01 15:06:47 +02:00
Gwendal Roué
d0ba9e342c
Turn selection and having clauses into promises. Give association aggregates access to the actual primary key, for better support for WITHOUT ROW ID tables.
2020-04-25 19:51:03 +02:00