Gwendal Roué
6a29d6c081
[BREAKING] Prefer Collection over Sequence for filter(keys:) and derived APIs
...
We were frequently turning those sequences into an Array in order to check their emptiness, and generally were not sure we'd iterate a sequence only once.
Also use `some Sequence` and `some Collection` whenever possible.
2024-09-08 12:52:27 +02:00
Gwendal Roué
b1424d16d5
[BREAKING] PersistenceContainer is Sendable
2024-08-31 10:08:44 +02:00
Gwendal Roué
aff662c101
SQL is Sendable
2024-08-25 18:06:29 +02:00
Gwendal Roué
56e2ab85b7
SQLAssociationCondition is Sendable
2024-08-25 18:06:29 +02:00
Gwendal Roué
1036371dff
DatabasePromise is Sendable
2024-08-25 18:06:29 +02:00
Gwendal Roué
f4b4035704
Fix Swiftlint warnings
2024-08-24 14:39:44 +02:00
Gwendal Roué
42fd32731a
Make withStableOrder able to deal with views
2023-10-28 15:46:10 +02:00
Gwendal Roué
7a7ee554c7
OrderedRequest.withStableOrder()
2023-10-12 09:17:50 +02:00
Gwendal Roué
b81e858ca0
Better fix for #1357
...
Previous fix would not correctly address #1357 when invalid double-quoted identifiers are interpreted as string literals (Configuration.acceptsDoubleQuotedStringLiterals = true, or SQLCipher 3)
2023-04-01 14:59:42 +02:00
Gwendal Roué
373fe467d6
Fix failing test for #1357
2023-04-01 14:09:50 +02:00
Gwendal Roué
ac214e6760
SE-0345: if let shorthand for shadowing an existing optional variable
2023-01-30 08:00:47 +01:00
Gwendal Roué
2976e81a95
Fix failing test for #1315
2023-01-15 13:39:05 +01:00
Gwendal Roué
b0f7493765
BREAKING: rename request methods that build a DatabasePromise
...
This creates an opportunity for future `request.filter { ... }` apis that look like standard ones. Why not `Player.filter { $0.score > 1000 }` eventually, perhaps with code generation?
2022-09-06 22:56:40 +02:00
Gwendal Roué
4ced8c78e7
Less "iff" (some people think this is a typo)
...
iff = if and only if
2022-08-21 21:22:34 +02:00
Gwendal Roué
11a6d53d8a
SE-0326: closure result type inference
...
https://github.com/apple/swift-evolution/blob/main/proposals/0326-extending-multi-statement-closure-inference.md
2022-08-21 21:22:34 +02:00
Gwendal Roué
301fb34702
Fix failing test for including(all:) on limited request and composite primary keys
2022-01-21 13:42:42 +01:00
BB9z
6d3f309cad
Fix typos
2022-01-19 00:10:42 +08:00
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