Gwendal Roué
717c2836ec
Bitwise operators & | ~ << >>
2023-05-23 08:15:04 +02:00
Gwendal Roué
f6e695a21d
More explicit any/some
2023-04-08 12:01:59 +02: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é
a9fcf1b9c1
SE-0335, SE-0341, SE-0346, SE-0352, SE-0358: some, any, primary associated types
2022-08-21 21:22:34 +02:00
Gwendal Roué
23cbf13af0
Swift 5.7 required: Availability checks
2022-08-21 19:21:57 +02:00
Gwendal Roué
89421c92fb
More support for inclusion checks with explicit collation
...
This commit addresses https://github.com/groue/GRDB.swift/issues/1094
The position of the `collating` method is now irrelevant in all those cases:
// name COLLATE NOCASE IN ('foo', 'bar')
["foo", "bar"].contains(Column("name")).collating(.nocase)
["foo", "bar"].contains(Column("name").collating(.nocase))
// name BETWEEN 'foo' AND 'bar' COLLATE NOCASE
("foo"..."bar").contains(Column("name")).collating(.nocase)
("foo"..."bar").contains(Column("name").collating(.nocase))
// (name >= 'foo' COLLATE NOCASE) AND (name < 'bar' COLLATE NOCASE)
("foo"..<"bar").contains(Column("name")).collating(.nocase)
("foo"..<"bar").contains(Column("name").collating(.nocase))
2021-12-14 12:45:50 +01:00
Gwendal Roué
ae609cec3b
Support for the TOTAL SQL aggregate function
2021-12-12 14:46:43 +01:00
Gwendal Roué
c50f698eae
Add support for the ESCAPE clause of the LIKE operator
...
Address #962
2021-04-14 20:06:54 +02:00
Gwendal Roué
2625653532
Improve documentation of the EXISTS operator
2021-03-27 22:49:58 +01:00
Gwendal Roué
c4f9ddd688
Simplify handling of collated expressions
2021-03-27 16:34:37 +01:00
Gwendal Roué
989a0e82eb
Test for EXISTS expression
2021-03-20 15:46:46 +01:00
Gwendal Roué
72123494ca
Add test for NOT IN and collated expressions
2021-03-02 20:16:15 +01:00
Gwendal Roué
01d71d6f35
Failing tests for #929
2021-03-02 20:02:46 +01:00
Gwendal Roué
96df69b3fb
Add fundamental test for #929
2021-03-02 19:06:18 +01:00
Gwendal Roué
920417beb3
Replace protocols with enums
2021-02-14 18:28:15 +01:00
Gwendal Roué
6abbf82a89
So long, visitor pattern!
2020-12-23 09:02:17 +01:00
Gwendal Roué
c65b5b28b9
Update tests and replace filter(value) with filter { _ in value }
...
We just want to make sure that no nasty overload alters the meaning of expressions such as `2 + 2`
2020-11-01 09:43:37 +01:00
Gwendal Roué
8e2fb1fb22
Update tests
2020-09-06 13:57:16 +02: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é
454b9d5546
More tests for boolean tests
2020-07-26 14:19:46 +02:00
Gwendal Roué
bf1d6038e1
Failing tests for #816
2020-07-26 13:33:35 +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é
9ee3fd38b5
Remove mentions of unsupported iOS versions
2020-05-31 13:54:02 +02:00
Gwendal Roué
7f66f41026
TODO
2020-05-08 20:43:10 +02:00
Gwendal Roué
94b4131ce4
TODO
2020-05-08 15:07:18 +02:00
Gwendal Roué
a26901cb80
Allow subqueries to refer to table aliases from parent query
2020-05-08 15:06:16 +02:00
Gwendal Roué
72e4fc620b
Remove LIMIT 1 from aggregated requests
2020-04-30 15:16:00 +02:00
Gwendal Roué
359df39b7e
Make it easier to look for subquery tests
2020-04-30 08:36:04 +02:00
Gwendal Roué
21552d8838
SQLRequest & QueryInterfaceRequest are SQLExpression
2020-04-29 14:24:18 +02:00
Gwendal Roué
8cb75dd814
Subqueries wip
2020-04-28 21:03:58 +02:00
Gwendal Roué
d60fe3c22f
Replace import GRDBCustomSQLite with import GRDB
2020-04-04 16:44:01 +02:00
Gwendal Roué
8718d525d4
SE-0253: Callable values of user-defined nominal types
2020-03-08 20:36:49 +01:00
Gwendal Roué
95ddae7968
More tests for associative operators
2020-01-16 09:08:30 +01:00
Gwendal Roué
c9373929ca
Documentation for the || string concatenation operator
2020-01-16 08:50:40 +01: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é
e4498b2784
contains operator generates SQL equality test when collection contains a single element
2019-05-22 08:13:42 +02:00
Gwendal Roué
1c1ee4e92a
GRDBCipher is no longer. Long live GRDB.swift/SQLCipher.
2019-04-19 13:11:55 +02:00
Gwendal Roué
db67d3840b
Principle of least astonishment: rrename argument label rawSQL to sql
2019-02-17 13:28:41 +01:00
Gwendal Roué
59162d93de
Rename Database.execute(_:String) to Database.execute(rawSQL:String)
2019-02-17 13:27:54 +01:00
Gwendal Roué
5747d1cff0
No more #if swift(>=4.1)
2018-04-30 08:26:23 +02:00
Gwendal Roué
729f6bdc6c
Tests for joined(operator:)
2018-04-21 17:05:03 +02:00
Gwendal Roué
639de6ca11
Rename TableMapping to TableRecord
2018-02-27 13:28:29 +01:00
Gwendal Roué
d8c411ad52
Swift 4.1 compatibility (SE-0184 , SE-0187)
2018-02-25 09:24:23 +01:00
Gwendal Roué
823b094b60
SE-0168
2017-08-18 14:22:14 +02:00
Gwendal Roué
bc5eeb3b3a
expr == DatabaseValue.null is converted to expr IS NULL.
2017-07-17 20:19:19 +02:00
Gwendal Roué
604cf6b522
Remove QueryInterfaceRequest.contains(_:)
2017-06-20 07:54:19 +02:00
Gwendal Roué
b3d731b040
Remove QueryInterfaceRequest.exists()
2017-06-20 07:54:19 +02:00
Gwendal Roué
10e669423f
Use the dbValue identifier for variables of type DatabaseValue
2017-06-01 08:35:14 +02:00