Gwendal Roué
aacc69f485
Fix typos
2022-01-21 13:43:44 +01:00
Gwendal Roué
948c7870bd
Merge pull request #1151 from freak4pc/fk-docs
...
Fix documentation for foreignKeysEnabled
2022-01-19 15:50:16 +01:00
Shai Mishali and Gwendal Roué
fa896eee23
Update GRDB/Core/Configuration.swift
...
Co-authored-by: Gwendal Roué <gr@pierlis.com >
2022-01-19 16:46:55 +02:00
Shai Mishali
c4023ccf0a
Fix documentation for foreignKeysEnabled
2022-01-19 15:48:11 +02:00
Gwendal Roué
28109a3947
Merge pull request #1144 from TimAEllis/feature/add-drop-column
...
Add drop column support
2022-01-19 08:06:24 +01:00
Gwendal Roué
124cba1b21
Work around missing SQLITE_ALTER_TABLE action
2022-01-19 07:29:16 +01:00
BB9z
6d3f309cad
Fix typos
2022-01-19 00:10:42 +08:00
Gwendal Roué
b53b43b1fc
Cleanup
2022-01-16 14:50:55 +01:00
Gwendal Roué
42d29b305e
Cleanup
2022-01-16 13:54:03 +01:00
Gwendal Roué
6d31190c3f
DatabaseCursor.forEach() honors the _isDone flag
2022-01-14 18:31:16 +01:00
Gwendal Roué
549f7ec66e
Cleanup and cursor profiling tests
2022-01-14 18:25:30 +01:00
Gwendal Roué
3eea2967b3
Improve error message
2022-01-14 17:49:17 +01:00
Gwendal Roué
8e6827070f
Improve documentation
2022-01-14 13:47:54 +01:00
Gwendal Roué
d105b35750
More #1124-related documentation
2022-01-14 13:29:34 +01:00
Gwendal Roué
ed6c5438b9
Move DatabaseCursor state to Statement
2022-01-14 13:13:34 +01:00
Gwendal Roué
bd67153095
Fix #1124 for more cursors
2022-01-13 14:28:04 +01:00
Gwendal Roué
8760033045
Update the list of extended result codes from SQLite 3.37.2
...
This updated list contains SQLITE_CONSTRAINT_DATATYPE, introduced with strict tables.
2022-01-09 17:01:37 +01:00
Gwendal Roué
b2fabf5fc3
Strict tables need REAL and ANY column types
2022-01-09 17:01:37 +01:00
Gwendal Roué
790c054a28
Fix Swiftlint warnings
2022-01-09 14:43:27 +01:00
Gwendal Roué
94ff9f3e45
The casing of ColumnInfo.type depends on the SQLite version
2022-01-09 14:28:00 +01:00
Gwendal Roué
fc0e1bede1
Methods that fully consume a cursor prefer forEach to next
...
This allows custom forEach implementations to wrap the full consumption of a cursor
2022-01-08 13:50:14 +01:00
Gwendal Roué
823af1944e
Cursor.forEach is a customization point
2022-01-08 13:47:54 +01:00
Gwendal Roué
4aa37f6169
Expert users need raw access to expert values
2022-01-06 13:52:09 +01:00
Gwendal Roué
37571525e6
Merge branch 'development' into dev/issue-1074-incremental_backup_api
2022-01-06 13:45:26 +01:00
Michael Allman
a71639159b
Add DatabaseBackupProgress and update the documentation
2021-12-15 01:52:25 -05:00
Gwendal Roué
0cf4c4efba
Merge branch 'development' into dev/async
2021-12-12 17:00:08 +01: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é
dcc2d211b2
Database.primaryKey() fails for views
2021-12-12 16:14:25 +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é
effc991de1
Deprecate DatabaseRegion.init(table:)
...
This commit reverts #510
2021-12-12 12:36:27 +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é
01f4c04c4d
DatabaseReader is Sendable
2021-12-08 18:12:28 +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é
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é
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é
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é
36fba9a79a
TODO: deprecate DatabaseRegion(table:)
...
We have `Table` now, wich is DatabaseRegionConvertible.
This deprecation will revert https://github.com/groue/GRDB.swift/pull/510
2021-12-02 17:21:58 +01:00
Gwendal Roué
6240585a03
Make sure ValueObservation fetches in an isolated transaction
...
Previously, ValueObservation could fetch in a non-isolated way. When an external connection would commit changes, we could fetch inconsistent values. Here we make sure ValueObservation always fetch in an isolated way.
2021-12-02 09:46:02 +01:00
Gwendal Roué
bb2ce74125
Add helper method Database.isolated(readOnly:)
2021-12-02 09:45:28 +01:00
Gwendal Roué
97d4a60148
Merge branch 'development' into dev/async
...
# Conflicts:
# Documentation/DemoApps/GRDBDemoiOS/README.md
# Documentation/DemoApps/README.md
2021-11-27 12:05:24 +01:00
Gwendal Roué
d8b83fba12
improve compilation time
2021-11-18 08:34:59 +01:00
Gwendal Roué
93c4249619
ForeignKeyViolation.databaseError(_:)
2021-11-16 08:51:33 +01:00
Gwendal Roué
ebc8524706
Add missing public qualifiers
2021-11-16 08:45:34 +01:00