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
Gwendal Roué
605aad79ad
Replace use of rowid by primary key when possible. Cleanup management of association cardinality
...
This is a backport of enhancements brought by the failed pull request https://github.com/groue/GRDB.swift/pull/767
2020-04-25 15:15:01 +02:00
Gwendal Roué
37aa7feee9
Rename KeyPathRefining to Refinable
2020-04-09 18:50:36 +02:00
Gwendal Roué
19061934ce
SE-0242: Synthesize default values for the memberwise initializer
...
...and more initializers cleanup
2020-03-09 08:49:06 +01:00
Gwendal Roué
9aa67f9db9
SE-0255: Implicit returns from single-expression functions
2020-03-08 23:12:46 +01:00
Gwendal Roué
7865b0a2ee
SE-0249: Key Path Expressions as Functions
2020-03-08 19:58:51 +01:00
Gwendal Roué
349e34b1c1
Internal API experiment: KeyPathRefining
2020-01-21 19:37:19 +01:00
Gwendal Roué
0b07a6a696
Cleanup
2020-01-11 20:43:37 +01:00
Gwendal Roué
ebdfa9e52a
Fix failiing tests for children relations
2020-01-11 18:36:36 +01:00
Gwendal Roué
df6bb8761c
Swiftlint + whitespace
2019-07-01 08:57:53 +02:00
Gwendal Roué
e7a590b82b
Extract joining methods to the JoinableRequest protocol
2019-05-29 08:36:55 +02:00
Gwendal Roué
1d75863c9a
Also turn SQLAssociationCondition SQL expression into an array
2019-05-26 21:46:19 +02:00
Gwendal Roué
680f3ad20c
Nicer WHERE, HAVING and ON output
2019-05-26 15:32:00 +02:00
Gwendal Roué
0ad7d5e894
Fix failing test for parallel inclusion of hasManyThrough(_, through: belongsTo, via: hasMany)
2019-05-24 13:18:00 +02:00
Gwendal Roué
faae864699
Query Interface code organization
2019-05-22 20:13:33 +02:00