Commit Graph
674 Commits
Author SHA1 Message Date
Gwendal Roué ada6002c91 Cleanup 2019-05-19 18:50:13 +02:00
Gwendal Roué 09afd2fadf Tests for singularization of hasMany relationship 2019-05-19 18:20:55 +02:00
Gwendal Roué ae6a224122 Documentation 2019-05-19 16:08:29 +02:00
Gwendal Roué 73773358c9 Tests for non-inflected singular 2019-05-19 16:06:36 +02:00
Gwendal Roué 8e2a8fe9d8 More Associations and inflections 2019-05-19 15:03:54 +02:00
Gwendal Roué ca76032b8b Association name is turned into singularized or pluralized keys 2019-05-19 07:33:18 +02:00
Gwendal Roué c95e9fafb1 Cleanup 2019-05-18 15:43:57 +02:00
Gwendal Roué 1a368d30b0 Cleanup 2019-05-18 15:03:17 +02:00
Gwendal Roué 27cbe18c51 Pass tests for database region of prefetching requests 2019-05-18 14:09:00 +02:00
Gwendal Roué 2a85d89364 Cleanup 2019-05-17 18:16:01 +02:00
Gwendal Roué c5ac0ea941 Cleanup 2019-05-17 18:13:32 +02:00
Gwendal Roué d23f4c3ac7 Prevent fetching cursor of prefetched rows with a "Not implemented" fatal error 2019-05-17 18:10:26 +02:00
Gwendal Roué 604a51bb79 Cleanup 2019-05-17 17:58:57 +02:00
Gwendal Roué 3786482368 Add unordered() to OrderedRequest 2019-05-17 17:53:25 +02:00
Gwendal Roué f98502a136 Association: remove pivot/destination relation ambiguity 2019-05-17 17:24:02 +02:00
Gwendal Roué ad1bdd7f01 Rename Row.prefetches to Row.prefetchedRows 2019-05-17 14:08:33 +02:00
Gwendal Roué f5177a5612 Cleanup 2019-05-16 19:54:00 +02:00
Gwendal Roué a7ea0913fa Fix SPM 2019-05-08 07:59:34 +02:00
Gwendal Roué 9fc5cda92b Rename PrefetchesTreeView to PrefetchesView 2019-05-06 08:19:12 +02:00
Gwendal Roué 04ffc71dbb TODO 2019-05-05 22:35:37 +02:00
Gwendal Roué 17e8df2d25 Tests for consumption of prefetched rows into Decodable records 2019-05-05 21:09:23 +02:00
Gwendal Roué acb7432610 TODO 2019-05-05 20:23:23 +02:00
Gwendal Roué bd0884503e Failing tests for consumption of prefetched rows 2019-05-05 18:19:19 +02:00
Gwendal Roué b1bcf637ab Fix failing tests for consumption of prefetched rows 2019-05-05 17:25:17 +02:00
Gwendal Roué 40b11f9f2f TODO: light HasManyThrough 2019-05-05 16:36:22 +02:00
Gwendal Roué 623f2eaf43 First tests for consumption of prefetched rows 2019-05-05 13:54:55 +02:00
Gwendal Roué 8d759898d3 Cleanup 2019-05-04 23:07:45 +02:00
Gwendal Roué 5fb6c40036 Almost ready to use prefetched rows 2019-05-04 22:54:10 +02:00
Gwendal Roué 91ec3bada3 Group prefetched rows 2019-05-04 22:29:07 +02:00
Gwendal Roué 73d622a074 Don't prefetch when there is no row 2019-05-04 21:28:47 +02:00
Gwendal Roué 4b82656d3a More passing prefetch tests 2019-05-04 17:20:56 +02:00
Gwendal Roué 2ca2f11883 First prefetch and passing tests 2019-05-04 17:02:19 +02:00
Gwendal Roué 331938c647 More including(all:) 2019-05-04 15:48:58 +02:00
Gwendal Roué 995657108d Not all relation children impact parent's count 2019-05-04 14:34:49 +02:00
Gwendal Roué f6a5279ac9 Use "join" for actual SQL joins, and refactor SQLRelation around "children" 2019-05-04 14:15:53 +02:00
Gwendal Roué a88f20fb50 Introduce including(all:) 2019-05-04 12:24:43 +02:00
Gwendal Roué cfb1b2fc4d QueryInterfaceRequest is not a FetchRequest like others: it will prefetch 2019-05-04 12:20:36 +02:00
Gwendal Roué 0e2daff329 More Association cleanup 2019-05-04 12:17:47 +02:00
Gwendal Roué 18bd025e1c SQLAssociation clarification 2019-05-03 20:32:21 +02:00
Gwendal Roué dd87a8d42c SQLAssociation clarification 2019-05-03 20:16:05 +02:00
Gwendal Roué 820db3f07d Refactor SQLAssociation
# Conflicts:
#	GRDB/QueryInterface/Association/Association.swift
2019-05-02 20:34:10 +02:00
Gwendal Roué 708538bcf0 Refactor join conditions 2019-04-28 14:46:20 +02:00
Gwendal Roué 1e3de49251 Rename SQLJoin.Condition to SQLJoinCondition 2019-04-28 13:25:56 +02:00
Gwendal Roué 73f4a9fb23 whitespace 2019-04-28 13:23:53 +02:00
Wolfgang Lutz 8fcabb5b73 fix typos in documentation 2019-04-26 11:50:22 +02:00
Gwendal Roué 4716f91d8b Bake the single result expectation right into filter(key:) methods
This better hides this flag inside SQLSelectQuery, and avoids explicit support from FetchableRecord and TableRecord
2019-04-16 08:47:50 +02:00
Gwendal Roué 46791c8f74 Remove QueryInterfaceRequest.init(query:) 2019-04-16 07:56:44 +02:00
Alex Robinson e2211aca21 Exclude LIMIT 1 in more cases
Adds a flag to SQLSelectQuery indicating that it expects a single record (for example when querying by primary or unique key).

Ensures that this example doesn't add an unnecessary LIMIT 1 to the resulting query:

    let request = Player.filter(key: 123) // or Player.filter(key: ["email": "me@example.com"])
    let player = try dbQueue.read { db in try request.fetchOne(db) }
2019-04-16 11:10:43 +10:00
Alex Robinson 7070dedf1a Replace FetchRequestHint with a boolean for single results
Fixes previous test failure
2019-04-16 10:20:36 +10:00
Alex Robinson 088f6c92c7 Update inline docs 2019-04-11 13:50:57 +10:00