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é
6ee7db48c8
Take care of indexes on expressions as well
...
sqlite> create table t(a,b);
sqlite> create index i on t(a like '%a', a, b);
sqlite> explain query plan select * from t where a like '%a';
QUERY PLAN
`--SCAN TABLE t
sqlite> explain query plan select * from t where a not like '%a';
QUERY PLAN
`--SCAN TABLE t
sqlite> explain query plan select * from t where (a like '%a') = 1;
QUERY PLAN
`--SEARCH TABLE t USING COVERING INDEX i (<expr>=?)
sqlite> explain query plan select * from t where (a like '%a') = 0;
QUERY PLAN
`--SEARCH TABLE t USING COVERING INDEX i (<expr>=?)
2020-07-26 16:04:02 +02:00
Gwendal Roué
c532b8709c
Refactor boolean tests ( fix #816 )
2020-07-26 14:19:31 +02:00
Gwendal Roué
f9bd457cbd
Cleanup
2020-07-11 18:33:43 +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é
cce8c832c7
[nil].contains(expr) now generates expr = NULL
2020-07-06 20:40:37 +02:00
Gwendal Roué
fc3e64989d
Cleanup _SQLExpressionContains
2020-07-06 20:18:21 +02:00
Gwendal Roué
90f2642ec6
Make good use of the visitor pattern
2020-07-05 15:07:52 +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é
146b06f27a
bugfix
2020-05-01 16:15:54 +02:00
Gwendal Roué
dfcc6f99a5
SQLCollection can be qualified, now
2020-04-30 18:49:20 +02:00
Gwendal Roué
e05b8b2b47
Unify SQLGenerationContext
2020-04-30 17:56:15 +02:00
Gwendal Roué
cac605749d
Cleanup SQLExpressionBinaryReduce.truthComponents
2020-04-30 14:21:25 +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é
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é
84ca69d27c
Value quoting can now require a database connection
2020-04-29 11:03:51 +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é
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é
694adcec64
Remove other deprecated methods
2020-03-08 18:03:11 +01:00
Gwendal Roué
b961962f93
Cleanup
2020-01-25 16:29:04 +01:00
Gwendal Roué
e999ab5ecb
Don't deprecate SQLLiteral.mapSQL, after all
2020-01-25 13:46:00 +01:00
Gwendal Roué
86e32cdc23
Cleanup SQLGenerationContext
2020-01-24 08:55:55 +01:00
Gwendal Roué
6a0cc838da
Deprecate SQLLiteral.mapSQL and SQLExpression.sqlLiteral
2020-01-24 08:55:55 +01:00
Gwendal Roué
5e67ca5566
Deprecate SQLExpressionLiteral, hide SQLSelectionLiteral, introduce SQLLiteral.sqlExpression and .sqlSelectable
2020-01-24 08:55:55 +01:00
Gwendal Roué
d7ef314a15
SQLLiteral is now a promise that needs an SQLGenerationContext
2020-01-24 08:55:55 +01:00
Gwendal Roué
4bfab90750
Restore and deprecate SQLLogicalBinaryOperator
2020-01-16 18:50:48 +01:00
Gwendal Roué
a398c6dc99
Flattten stricly associative operators
2020-01-16 08:17:11 +01:00
Gwendal Roué
32a40b18fd
Introduce associative binary operators
2020-01-16 08:01:48 +01:00
Gwendal Roué
35ceeebb3d
Style tweaks
2019-07-26 20:56:33 +02:00
Gwendal Roué
df6bb8761c
Swiftlint + whitespace
2019-07-01 08:57:53 +02:00
Gwendal Roué
6fa452b68c
Fix joined(operator:)
2019-05-26 20:46:11 +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