Commit Graph
140 Commits
Author SHA1 Message Date
Gwendal Roué ec2640a459 CommonTableExpression is a table, after all 2020-11-30 19:21:46 +01:00
Gwendal Roué 755782759a Cleanup 2020-11-30 18:14:03 +01:00
Gwendal Roué 2bb9f5ce0d First joins with CommonTableExpression 2020-11-29 19:05:12 +01:00
Gwendal Roué e1d3c1d7dc Give CommonTableExpression a key, for joins 2020-11-29 18:23:41 +01:00
Gwendal Roué e7dcf25063 CTE aliases 2020-11-29 15:49:55 +01:00
Gwendal Roué d66a3f4ab3 Fix Swiftlint warning 2020-11-01 10:39:48 +01:00
Gwendal Roué 06db4af649 Enhance warning 2020-11-01 10:33:05 +01:00
Gwendal Roué baf1ef32d1 Document why filter(_:) prefers SQLSpecificExpressible over SQLExpressible 2020-11-01 10:29:07 +01:00
Gwendal Roué caa382f41b Deprecate filter(value)
Some people use Player.filter(id) instead of Player.filter(key: id). This is what this commit prevents.
2020-11-01 09:41:16 +01:00
Gwendal Roué 7f229468d2 Documentation 2020-07-12 15:12:04 +02:00
Gwendal Roué 07092169bf Documentation 2020-07-12 14:17:58 +02:00
Gwendal Roué 002287ca28 Close FetchRequest, make it visitable 2020-07-11 17:30:11 +02:00
Gwendal Roué 99ed742555 "row id" -> "rowid" 2020-07-11 13:21:14 +02:00
Gwendal Roué ae41859bbb Cleanup 2020-07-11 10:57:24 +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é 97cb1d595e Improve groupByPrimaryKey()
Using the rowID when possible yields better performance
2020-07-01 21:25:33 +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é c4ab23761e QueryInterfaceRequest.selectPrimaryKey(as:) 2020-06-15 17:02:00 +02:00
Gwendal Roué ab97ceb784 TableRecord.primaryKey 2020-06-15 14:08:50 +02:00
Gwendal Roué a5de2b9288 Breaking: AnyFetchRequest.asRequest(of:) 2020-05-30 10:30:07 +02:00
Gwendal Roué 4c2042c3ce Cleanup 2bb53026ef 2020-05-25 13:04:10 +02:00
Gwendal Roué 2bb53026ef Fix #783 2020-05-25 09:34:11 +02:00
Gwendal Roué 476e72cca2 requestSQL(_:forSingleResult:) is experimental 2020-05-10 15:34:37 +02:00
Gwendal Roué 17e745f52b SQLRequestProtocol, close FetchRequest 2020-05-10 15:34:37 +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é 27ffb2a418 Rename index(ofColumn:) to index(forColumn:) 2020-05-01 15:01:01 +02:00
Gwendal Roué dfcc6f99a5 SQLCollection can be qualified, now 2020-04-30 18:49:20 +02:00
Gwendal Roué 664c1ed281 Documentation 2020-04-30 18:35:05 +02:00
Gwendal Roué 057679a2ba We don't need to prevent requests that select several columns 2020-04-30 18:22:59 +02:00
Gwendal Roué 9006c701b3 Replace the expectsSingleResult hint with an analysis of the query 2020-04-30 14:14:07 +02:00
Gwendal Roué cb7a7633b1 TODO 2020-04-30 09:04:17 +02:00
Gwendal Roué 1e92b98165 TODO 2020-04-30 08:40:35 +02:00
Gwendal Roué 1d89d184fd Fix subqueries semantics 2020-04-30 08:19:00 +02:00
Gwendal Roué be249bc697 SQLRequestExpressible is a sub protocol of SQLSpecificExpressible 2020-04-29 23:40:37 +02:00
Gwendal Roué 4245e8f09e Cleanup 2020-04-29 22:24:58 +02:00
Gwendal Roué a15233eff1 SQLGenerationContext no longer needs to be mutated 2020-04-29 21:59:04 +02:00
Gwendal Roué 188f51c513 Refactor handling of arguments during SQL generation 2020-04-29 21:27:14 +02:00
Gwendal Roué 3d86f45aa2 SQLRequestExpressible
This protocol makes it possible to write request.filter(column == subRequest)
2020-04-29 20:18:00 +02:00
Gwendal Roué 473bc3a88e SQLQueryGenerator handles the single result optimization. Make sure a single column is selected for expression/collection requests 2020-04-29 18:30:46 +02:00
Gwendal Roué 8bcf9257f6 TODO 2020-04-29 14:32:53 +02:00
Gwendal Roué 82ff6cb4c5 Cleanup 2020-04-29 14:24:25 +02:00
Gwendal Roué 21552d8838 SQLRequest & QueryInterfaceRequest are SQLExpression 2020-04-29 14:24:18 +02:00
Gwendal Roué 6dca9e1068 Cleanup 2020-04-29 09:49:24 +02:00
Gwendal Roué 8cb75dd814 Subqueries wip 2020-04-28 21:03:58 +02:00
Gwendal Roué 59e81f70bd Cleanup aggregates 2020-04-28 19:49:41 +02:00
Gwendal Roué f543784241 TODO 2020-04-28 14:20:05 +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