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é
dcc2d211b2
Database.primaryKey() fails for views
2021-12-12 16:14:25 +01:00
Gwendal Roué
340203686d
ValueObservation.removeDuplicates(by:)
2021-12-12 15:12:34 +01:00
Gwendal Roué
ae609cec3b
Support for the TOTAL SQL aggregate function
2021-12-12 14:46:43 +01:00
Gwendal Roué
8ba89a398a
Add ABS and LENGTH SQL functions on association aggregates
2021-12-12 14:27:41 +01:00
Gwendal Roué
95b3f447e4
Revert "Make sure Inflections.default is lazily loaded, even in optimized release builds"
...
This reverts commit c62ccf1de7 (aimed at fixing #755 ).
We can do this because https://github.com/apple/swift/pull/30445 is present in the Swift 5.3 release https://github.com/apple/swift/releases/tag/swift-5.3-RELEASE
2021-12-12 13:57:34 +01:00
Gwendal Roué
bc2a66e40f
Don't throw any error when checking if a table is WITHOUT ROWID
2021-12-12 13:29:02 +01:00
Gwendal Roué
cb32a0d0cc
CHANGELOG
2021-12-12 12:56:53 +01:00
Gwendal Roué
effc991de1
Deprecate DatabaseRegion.init(table:)
...
This commit reverts #510
2021-12-12 12:36:27 +01:00
Gwendal Roué
3049b88fea
Merge pull request #1110 from maxhumber/patch-1
...
Minor changes to a tip in the README
2021-12-12 10:27:13 +01:00
Max Humber
c39db96521
Minor changes to a tip in the README
2021-12-11 15:28:02 -05:00
Gwendal Roué
d7514f84f1
Disable concurrency check flags by default
2021-12-10 12:40:08 +01:00
Gwendal Roué
1b62e06c4a
Expose Sendable conformance to Swift 5.5
...
But async apis are still only exposed to Swift 5.5.2.
Sendable conformances are helpful for users of Xcode < 13.2.
2021-12-10 08:08:47 +01:00
Michael Allman
bedf2dbcd4
Revise and correct some names and backup code documentation
2021-12-08 10:23:11 -08:00
Michael Allman
13e195db40
Revise incremental backup API to report progress via a throwing callback
...
function
2021-12-08 09:37:10 -08:00
Michael Allman
087ad10086
Add an API to track progress of and cancel backups in progress, for both
...
the DatabaseReader/DatabaseWriter API and Database API
2021-12-08 09:37:10 -08:00
Michael Allman
f012c011b1
Import the Foundation framework in DatabaseReader.swift, which is required to get the Progress class
2021-12-08 09:37:10 -08:00
Michael Allman
f829d46b7f
Change default backup page step size from 5 to 100, which is the value used in the sqlite3 cli .backup command
2021-12-08 09:37:10 -08:00
Michael Allman
ab6f18e46d
Initial commit of code to implement progress-reporting database backups
2021-12-08 09:37:10 -08:00
Gwendal Roué
9579671c02
Remove a concurrency-related warning
2021-12-08 18:16:36 +01:00
Gwendal Roué
01f4c04c4d
DatabaseReader is Sendable
2021-12-08 18:12:28 +01:00
Gwendal Roué
7ac78a8ec1
Share concurrency check flags with tests
2021-12-08 18:11:44 +01:00
Gwendal Roué
97e00ab44f
Fix async test for SQLCipher VACUUM INTO
2021-12-08 13:18:12 +01:00
Gwendal Roué
33d9ca0e97
UIApplication notification names are isolated to @MainActor
...
I believe this is incorrect: FB9801372 (UIApplication.didReceiveMemoryWarningNotification should not be declared @MainActor)
Meanwhile, just use the string version.
A workaround based on a MainActor-isolated task can't work due to conflict between compiler version and minimum iOS target:
#if compiler(>=5.5) && canImport(_Concurrency)
if #available(...) { // Check for availability of concurrency runtime
Task { @MainActor [weak self] in
NotificationCenter.default.addObserver(..., name: UIApplication.didReceiveMemoryWarningNotification, object: nil)
}
} else {
// IMPOSSIBLE CASE: No access to Task, no access to notification names
}
#else
NotificationCenter.default.addObserver(..., name: UIApplication.didReceiveMemoryWarningNotification, object: nil)
#endif
2021-12-08 12:48:19 +01:00
Gwendal Roué
b2985b77c4
Concurrency check flags depend on Xcode version
...
Xcode 12 won't accept those flags. And we only need them starting Xcode 13.2
2021-12-08 12:00:32 +01:00
Gwendal Roué
ec882e8126
Enable concurrency check flags by default
2021-12-08 11:18:54 +01:00
Gwendal Roué
61b0df8017
Enable async APIs on Xcode 13.2+ only
...
Xcode 13.1 won't have access to async apis. This simplifies our availability checks.
The techniques were inspired from:
- https://github.com/swift-server/guides/blob/main/docs/concurrency-adoption-guidelines.md#api-design
- https://github.com/swift-server/guides/blob/main/docs/concurrency-adoption-guidelines.md#backwards-compatibility-of-declarations-and-checked-swift-concurrency
2021-12-08 11:17:40 +01:00
Gwendal Roué
103266d70c
Merge branch 'development' into dev/async
2021-12-08 08:00:49 +01:00
Gwendal Roué
3f02724e60
RowDecodingError is Sendable
...
Xcode 13.2 RC won't compile unless we make a Sendable copy of the row that could not be decoded.
2021-12-08 07:59:43 +01:00
Gwendal Roué
ca05a93c98
Merge pull request #1107 from tcwalther/tw-fix-db-create-index-docstring
...
Fix docstring for Database.create(index: ...)
2021-12-07 13:32:26 +01:00
Thomas Walther
48f6cee7a6
Fix docstring for Database.create(index: ...)
2021-12-07 13:20:14 +01:00
Gwendal Roué
8ed16f4440
Fix some compiler warnings with -Xfrontend -warn-concurrency
...
https://twitter.com/olebegemann/status/1467893554915782668
2021-12-07 09:23:37 +01:00
Gwendal Roué
6ec3ebc398
Merge branch 'development' into dev/async
2021-12-06 18:04:35 +01:00
Gwendal Roué
86d0fedfbb
Fix wording
2021-12-05 17:08:15 +01:00
Gwendal Roué
0330365d49
Merge branch 'development'
v5.16.0
2021-12-05 16:59:59 +01:00
Gwendal Roué
ca2f36781e
v5.16.0
2021-12-05 16:59:37 +01:00
Gwendal Roué
6c7f71f620
Fix typo
2021-12-05 16:47:32 +01:00
Gwendal Roué
60bf5d30b0
Merge pull request #1106 from groue/dev/annotated-with-association
...
Sugar for fetching only a few columns of associated records
2021-12-05 16:41:49 +01:00
Gwendal Roué
94caf4ba97
todo: find a way to prefix the selection with the association key
2021-12-05 15:53:59 +01:00
Gwendal Roué
a7002e1e09
Enhance "Columns Selected by an Association"
2021-12-05 15:22:07 +01:00
Gwendal Roué
54a991b3b9
Emphasize sections
2021-12-05 15:15:38 +01:00
Gwendal Roué
54ca12437a
CHANGELOG
2021-12-05 15:10:25 +01:00
Gwendal Roué
3298cca75f
Rewrite the Joining And Prefetching Associated Records chapter
2021-12-05 15:10:25 +01:00
Gwendal Roué
4fe0b687d2
Documentation for annotated(withOptional:), annotated(withRequired:)
2021-12-05 15:04:51 +01:00
Gwendal Roué
9df0f4cdbd
Inline documentation for annotated(withOptional:), annotated(withRequired:)
2021-12-05 15:04:44 +01:00
Gwendal Roué
e1dc24ac93
Update examples with Team/Player
2021-12-04 10:01:31 +01:00
Gwendal Roué
88e60ed0c6
Update FAQ: How do I select only one column of an associated record?
2021-12-04 09:50:16 +01:00
Gwendal Roué
b4ca103002
Tests for annotated(withOptional:), annotated(withRequired:)
2021-12-04 09:49:23 +01:00
Gwendal Roué
564c4cef5c
annotated(withOptional:), annotated(withRequired:)
2021-12-03 19:24:56 +01:00
Gwendal Roué
7a77a1fd06
Merge branch 'development'
v5.15.0
2021-12-02 19:43:04 +01:00