Gwendal Roué
f878d99733
Use SQLITE_HAS_CODEC instead of GRDBCIPHER when testing for SQLCipher availability
...
GRDBCIPHER is now just a marker for importing SQLCipher with CocoaPods.
Also, enable all APIs that used to be disabled with SQLCipher, and skip tests that require a specific SQLite version.
2025-10-12 14:49:59 +02:00
Gwendal Roué
6ca38eda3b
Give TableAliasBase a location in DocC
2025-07-20 14:38:15 +02:00
Gwendal Roué
034b241e71
Rename ColumnsProvider to DatabaseComponents
2025-05-11 13:10:19 +02:00
Gwendal Roué
814146c40d
DocC
2025-05-11 11:56:21 +02:00
Gwendal Roué
d6ff3b14d4
DocC
2025-05-10 15:34:10 +02:00
Gwendal Roué
6cc3116ff4
TableAlias is generic
2025-05-10 14:52:48 +02:00
Gwendal Roué
55edcff97f
Extract TableAlias
2025-05-10 09:40:16 +02:00
Gwendal Roué
b01f6da3cf
Remove TODO
2025-05-10 09:36:14 +02:00
Gwendal Roué
ce238b6643
Build requests from ColumnsProvider
2025-05-10 09:36:13 +02:00
Gwendal Roué
a642ac51aa
AllColumnsExcluding
2025-01-19 16:26:59 +01:00
Gwendal Roué
073682c4f0
Remove the experimental flag on stabilized apis
2024-09-28 14:41:12 +02:00
Gwendal Roué
473b06eac5
Fix compiler warnings about SQLQualifiedRelation
2024-09-15 11:32:06 +02:00
Gwendal Roué
630daaf48a
Fix compiler warnings about StatementArgumentsSink for literal arguments
2024-09-15 11:17:01 +02:00
Gwendal Roué
0fdd910b08
⚠️ Make TableAlias Sendable even if it is not yet.
2024-08-25 18:06:29 +02:00
Gwendal Roué
546e8aa77c
JSONColumn and SQLJSONExpressible
2023-10-04 19:55:12 +02:00
Gwendal Roué
718102f743
Create indexes on expressions
2023-10-02 07:49:59 +02:00
Gwendal Roué
28c6ea96b4
Fix redundant_self_in_closure Swiftlint warning
2023-07-29 10:06:33 +02:00
Gwendal Roué
7a0a354d22
Implement ForeignKeyDefinition
2023-07-09 17:22:38 +02:00
Gwendal Roué
08fbd82ead
Rename StatementArgumentsSink.forRawSQL to literalValues
2023-07-09 17:13:22 +02:00
Gwendal Roué
ac214e6760
SE-0345: if let shorthand for shadowing an existing optional variable
2023-01-30 08:00:47 +01:00
Gwendal Roué
1818534513
DocC
2022-11-06 16:02:36 +01:00
Gwendal Roué
c6657b7063
ColumnAssignment that does nothing
...
A cool upsert feature is to overwrite an existing value in case of conflict, but another cool upsert feature is to NOT overwrite an existing value. This commit makes it possible to create a ColumnAssignement that does nothing.
2022-08-23 20:02:17 +02:00
Gwendal Roué
2789444acd
Enable UPSERT and RETURNING with SQLCipher
2022-08-21 21:22:34 +02:00
Gwendal Roué
a702fe6bc9
BREAKING: persistence callbacks, and support for RETURNING
...
- Replace performInsert, performUpdate, etc with callbacks: willInsert, aroundInsert, didInsert, etc.
- Always call didInsert, even with INSERT OR IGNORE
- Explicit conflict resolution in persistence methods
- Add ...AndFetch... methods
2022-08-21 21:22:34 +02:00
Gwendal Roué
5243db7fbc
Spelling
2022-08-21 21:22:34 +02:00
Gwendal Roué
c86581dedc
Make SQLQueryGenerator.swift easier to read
2022-08-21 21:22:34 +02:00
Gwendal Roué
4c73456f86
Make SQL.swift easier to read
2022-08-21 21:22:34 +02:00
Gwendal Roué
b2eafd4a13
SE-0361: Extensions on bound generic types
...
https://github.com/apple/swift-evolution/blob/main/proposals/0361-bound-generic-extensions.md
2022-08-21 21:22:34 +02:00
Gwendal Roué
895964de16
BREAKING: Throwing FetchableRecord.init(row:)
2022-08-21 21:22:34 +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
BB9z
6d3f309cad
Fix typos
2022-01-19 00:10:42 +08:00
Gwendal Roué
7001b60cf7
More support for association existence check
...
New: support for associated tables WITHOUT ROWID with a compound primary key
New: support for associated views
Checking for the existence of associated CTEs is still not implemented (it fails with "table does not exist" error).
2021-12-12 16:43:40 +01:00
Gwendal Roué
bf601e6810
Merge SelectStatement and UpdateStatement
...
Addresses #1015
2021-07-29 20:20:15 +02:00
Gwendal Roué
0098369e29
Simplify Refinable
2021-06-27 13:11:26 +02:00
Gwendal Roué
ed3397176a
Documentation
2021-05-01 17:28:49 +02:00
Gwendal Roué
5f4c64ceda
Fix failing tests for #965
2021-05-01 17:00:12 +02:00
Gwendal Roué
c0a3e61253
DatabaseRegion is now case-preserving and case-insensitive
2021-04-10 16:27:45 +02:00
Gwendal Roué
c4443eead8
SELECT * FROM cte is no longer a special case, because SQLGenerationContext knows about the available CTEs
2021-03-19 19:06:47 +01:00
Gwendal Roué
8ad096ae35
Refactor column counting for improved testability
2021-03-14 11:49:35 +01:00
Gwendal Roué
ed3d1e1ac4
selectOnly() clears the isDistinct flag
2021-03-08 21:36:09 +01:00
Gwendal Roué
4521e6b37d
Make filterPromise an optional promise instead of a promise of optional
...
This way, filterPromise and havingExpressionPromise have the same type
2021-03-08 21:25:27 +01:00
Gwendal Roué
a655974eb0
Let joined associations use CTEs
2021-03-08 14:10:38 +01:00
Gwendal Roué
f49fab0cff
Merge SQLQuery into SQLRelation
2021-03-07 14:37:53 +01:00
Gwendal Roué
10a16ac6f0
Rename .allNotPrefetched to .bridge
2021-02-18 08:42:01 +01:00
Gwendal Roué
15b892af6e
Implement filters with SQLExpression? instead of [SQLExpression]
...
Those arrays were introduced so that we can generate nicer sql: `a AND b AND c`, instead of `(a AND b) AND c`.
This flattening is provided by the && operator and `SQLExpression.associativeBinary`, so those arrays are no longer needed.
2021-02-17 08:45:57 +01:00
Gwendal Roué
920417beb3
Replace protocols with enums
2021-02-14 18:28:15 +01:00
Gwendal Roué
40389ee102
Decouple associations from their origin database table
...
This allows us to create an association without providing the origin table name, and thus to build association without TableRecord.
2021-02-07 16:01:34 +01:00
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é
e72007c1dd
Make SQLiteral.subquery a promise
...
This allows us to postpone CTEs definition until a db connection is available
2020-12-13 18:29:43 +01:00