Zev Eisenberg
8b060e6b09
Add angle brackets to URLs to make them clickable in Xcode's rendered documentation.
2021-07-20 20:53:58 -04:00
Gwendal Roué
0098369e29
Simplify Refinable
2021-06-27 13:11:26 +02:00
Gwendal Roué
e7ef3e1867
Prevent aggregate misuse
...
I wrote association.max("id") when I meant association.max(Column("id"))
2021-06-20 11:08:24 +02:00
Gwendal Roué
c3b3d2eeb8
Fix Xcode 13 beta 1 compilation warnings
2021-06-08 05:54:45 +02:00
Gwendal Roué
002399ff1a
Remove limit(_:offset:) from documentation
2021-04-17 15:44:53 +02:00
Gwendal Roué
7fd51f440a
Warn about DerivableRequest.limit(_:offset:)
...
We can't deprecate it because the compiler emits a warning on acceptable request.limit() calls :-(
2021-04-17 13:22:08 +02:00
Gwendal Roué
cb8611587c
Fix Swiftlint warning
2021-03-12 13:48:41 +01:00
Gwendal Roué
42718db49d
Documentation
2021-03-08 21:11:36 +01:00
Gwendal Roué
f9b554d00a
Merge AggregateJoinableRequest into DerivableRequest
...
Also put distinct(), limit(_:offset:) and with(_:) into DerivableRequest
2021-03-08 07:55:20 +01:00
Gwendal Roué
f0aec27095
AssociationToMany: distinct(), limit(_:offset:), with(_:)
2021-03-07 20:25:30 +01:00
Gwendal Roué
9c6ff6a1c0
Simplifly association aggregates
...
We don't need any promise. We used to, but SQLExpression.fastPrimaryKey has been introduced since then.
2021-03-07 19:36:08 +01:00
Gwendal Roué
a4dca3390a
AggregateJoinableRequest is the new protocol that supports aggregate annotations
...
AssociationToMany is a subprotocol of AggregateJoinableRequest :-)
2021-03-07 19:15:09 +01:00
Gwendal Roué
bac7b6b0e5
Refactor function calls
...
and make it possible to express other DISTINCT aggregates than COUNT: SUM(DISTINCT ...), etc.
2021-03-06 13:25:25 +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é
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é
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é
3094c274df
Enhance error message
2020-12-05 10:34:32 +01:00
Gwendal Roué
6f409f2140
Fix typo
2020-12-03 09:22:15 +01:00
Gwendal Roué
0dc9215df6
Documentation
2020-12-02 22:15:50 +01:00
Gwendal Roué
333ffc1ebe
Documentation
2020-12-02 21:55:51 +01:00
Gwendal Roué
992e8f3423
Remove header
2020-12-02 06:25:18 +01:00
Gwendal Roué
2b6c3fb868
Remove misleading comment
2020-12-01 20:38:19 +01:00
Gwendal Roué
b7b89c5fa9
CTE associations
2020-11-30 21:51:17 +01:00
Gwendal Roué
c776ee8d47
Association: remove TableRecord requirement
2020-11-30 21:50:18 +01:00
Gwendal Roué
07092169bf
Documentation
2020-07-12 14:17:58 +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é
268a45a635
Prepare for different kinds of SQLAssociationCondition
2020-07-02 08:29:49 +02:00
Gwendal Roué
2201026ce8
Introduce FastPrimaryKeyExpression, drop SQLPrimaryKeyExpression
...
Also, don't let the user access this expression, so that he does not attempt at decoding it. Its only purpose is to generate efficient SQL.
2020-07-01 20:40:11 +02:00
Gwendal Roué
ab97ceb784
TableRecord.primaryKey
2020-06-15 14:08:50 +02:00
Gwendal Roué
59e81f70bd
Cleanup aggregates
2020-04-28 19:49:41 +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é
27120643b9
SE-0255: Implicit returns from single-expression functions
2020-04-09 17:16:23 +02:00
Gwendal Roué
d988be49a6
Revert #748
2020-04-09 13:42:37 +02:00
Gwendal Roué
7ce6a8a094
Rename QueryInterfaceRequest to Request
2020-04-04 20:12:03 +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é
694adcec64
Remove other deprecated methods
2020-03-08 18:03:11 +01:00
Gwendal Roué
349e34b1c1
Internal API experiment: KeyPathRefining
2020-01-21 19:37:19 +01:00
Gwendal Roué
14c3c7865e
Move association initialization where they belong
2020-01-03 08:27:15 +01:00
Gwendal Roué
9dd5fd198b
Fix documentation bug - #672
2020-01-03 08:09:54 +01:00