Gwendal Roué
df4d5b8603
Back to basics, round 2: keep all children of firstOnly relations
2020-04-19 17:44:50 +02:00
Gwendal Roué
a7b8a73dba
Cleanup
...
After failed experiment:
SELECT ...
FROM parent
JOIN (SELECT * FROM child LIMIT 1) child ON child.parentId = child.id
The problem is that the join condition can't go inside the subquery, because SQLite complains about unknown table "parent". And when the join condition is outside the subquery, the LIMIT clause has been applied too early.
So we're still stuck with:
SELECT ...
FROM parent
JOIN child ON child.id = (SELECT id FROM child WHERE child.parentId = child.id LIMIT 1)
For some reason SQLite accepts the reference to the parent table in this case.
2020-04-19 14:14:13 +02:00
Gwendal Roué
278c18adfc
Cleanup
2020-04-18 20:21:14 +02:00
Gwendal Roué
cbd494e3b9
Documentation
2020-04-18 20:19:47 +02:00
Gwendal Roué
c73fb0dd9b
Back to basics
2020-04-18 20:14:27 +02:00
Gwendal Roué
c966eb3ecf
Cleanup
2020-04-18 19:09:02 +02:00
Gwendal Roué
162da80e4f
Attempt at expressing some todos
2020-04-18 17:06:29 +02:00
Gwendal Roué
615f4159d6
Rename firstInMany to firstOnly
2020-04-18 17:06:29 +02:00
Gwendal Roué
8057572357
Move firstInMany flag in SQLRelation
2020-04-18 17:06:29 +02:00
Gwendal Roué
f545789205
Avoid using the rowid column when we can use the regular primary key
2020-04-18 17:06:23 +02:00
Gwendal Roué
4483f037a4
Cleanup
2020-04-18 16:40:22 +02:00
Gwendal Roué
d80922954a
Let hasMany.first include nested associations
2020-04-18 16:40:22 +02:00
Gwendal Roué
fb550d30a0
HasManyAssociation.first and last
2020-04-18 16:40:22 +02:00
Gwendal Roué
a715c6328d
Merge branch 'master' into GRDB5
...
# Conflicts:
# CHANGELOG.md
# GRDB/QueryInterface/Request/QueryInterfaceRequest.swift
# Makefile
# README.md
# Tests/Performance/GRDBPerformance/GRDBPerformance.xcodeproj/project.pbxproj
2020-04-18 16:36:26 +02:00
Gwendal Roué
d35ad59f9c
Fix failing test for #758
2020-04-14 12:51:24 +02:00
Gwendal Roué
37aa7feee9
Rename KeyPathRefining to Refinable
2020-04-09 18:50:36 +02:00
Gwendal Roué
56f332122d
The observed region is always recorded
2020-03-24 22:59:07 +01:00
Gwendal Roué
dab8e28f6d
Merge branch 'master' into GRDB5
...
# Conflicts:
# GRDB/Migration/DatabaseMigrator.swift
# GRDB/QueryInterface/Request/QueryInterfaceRequest.swift
# README.md
2020-03-21 14:35:57 +01:00
Gwendal Roué
a0faf6aa68
Support for nil assignment
2020-03-18 19:34:43 +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é
86e32cdc23
Cleanup SQLGenerationContext
2020-01-24 08:55:55 +01:00
Gwendal Roué
349e34b1c1
Internal API experiment: KeyPathRefining
2020-01-21 19:37:19 +01:00
Gwendal Roué
32a40b18fd
Introduce associative binary operators
2020-01-16 08:01:48 +01:00
Gwendal Roué
5b841cf4cb
Cleanup
2020-01-09 08:24:00 +01:00
Gwendal Roué
ffd1222990
Fix comment
2020-01-06 09:14:57 +01:00
Gwendal Roué
07266d0b31
Remove useless captures
2020-01-06 09:12:55 +01:00
Gwendal Roué
eb8ec327a8
Cleanup
2020-01-06 09:09:27 +01:00
Gwendal Roué
4896741706
Remove code smell
2020-01-06 08:13:32 +01:00
Gwendal Roué
944f4309a8
Cleanup
2019-12-29 19:06:29 +01:00
Gwendal Roué
b302051f87
Cleanup
2019-12-29 18:46:06 +01:00
Gwendal Roué
71d97b04a5
Move code
2019-12-29 18:26:27 +01:00
Gwendal Roué
fa5198354a
Fix failing tests for deleteAll and updateAll for grouped and joined queries
2019-12-29 17:50:53 +01:00
Gwendal Roué
baa9695678
SQLQueryGenerator.grouping(_:)
2019-12-29 17:18:17 +01:00
Gwendal Roué
a42a5cc2ca
SQLQualifiedRelation.selectOnly(_:)
2019-12-29 16:57:26 +01:00
Gwendal Roué
58263e9b60
Fix failing test for batch update policy
2019-11-10 12:42:01 +01:00
Gwendal Roué
cb77fe2ed3
Don't check for ENABLE_UPDATE_DELETE_LIMIT: let SQLite emit syntax errors
2019-11-08 18:08:27 +01:00
Gwendal Roué
dd4a2c5d9c
Better error message when ENABLE_UPDATE_DELETE_LIMIT is missing
2019-11-08 09:04:34 +01:00
Gwendal Roué
995d1b851a
Rename setter to assignment
2019-11-08 09:04:34 +01:00
Gwendal Roué
205398b65a
Batch update
2019-11-08 09:04:34 +01:00
Gwendal Roué
0f2c5cd8a0
Fix failling test for rowid optimization in Database.recordingSelectedRegion
2019-08-04 14:37:40 +02:00
Gwendal Roué
89001f11c3
Spot that annotations are another challenge on the way to optional + required join chaining
2019-07-27 15:23:29 +02:00
Gwendal Roué
df6bb8761c
Swiftlint + whitespace
2019-07-01 08:57:53 +02:00
Gwendal Roué
1d75863c9a
Also turn SQLAssociationCondition SQL expression into an array
2019-05-26 21:46:19 +02:00
Gwendal Roué
ab000d7a4f
Remove useless expression parenthesis from SQL
2019-05-26 20:08:13 +02:00
Gwendal Roué
680f3ad20c
Nicer WHERE, HAVING and ON output
2019-05-26 15:32:00 +02:00
Gwendal Roué
faae864699
Query Interface code organization
2019-05-22 20:13:33 +02:00