Commit Graph
42 Commits
Author SHA1 Message Date
Gwendal Roué 8b19c3424c Test async read after async write 2023-11-11 13:38:03 +01:00
Gwendal Roué d3c289a320 Availability checks cleanup 2023-01-22 12:37:40 +01:00
baegteun a9feac1339 ♻️ :: OSX -> macOS in Availability Check 2023-01-17 13:58:37 +09:00
Gwendal Roué f5ebf0de4d Use primary key definitions with NOT NULL constraint by default 2022-11-27 12:35:47 +01: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é 458e1e2675 BREAKING: throwing DatabaseQueue() initializer
As a consequence, FTS3.tokenize(_:) is a throwing method as well.
2022-08-21 21:22:33 +02:00
Gwendal Roué 6da7d47394 Swift 5.7 required: Remove compiler checks 2022-08-21 19:21:57 +02:00
Gwendal Roué 209192d3a5 Require Swift 5.6 Compiler for Concurrency Support 2022-04-13 23:07:33 +02:00
Gwendal Roué ef4709d3f0 Fix async vaccum(info:) tests by using the same encryption level for the destination database 2021-12-14 14:21:16 +01:00
Gwendal Roué 97e00ab44f Fix async test for SQLCipher VACUUM INTO 2021-12-08 13:18:12 +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é c755dc70ef Restrict async/await to Xcode 13.1+ 2021-10-30 20:09:39 +02:00
Gwendal Roué 2ad6131d08 Require canImport(_Concurrency)
This fixes the build for macOS 11.5
2021-10-17 13:26:41 +02:00
Gwendal Roué 1f73c20ae2 DatabaseWriter async methods
write, writeWithoutTransaction, barrierWriteWithoutTransaction, erase, vacuum, vacuum(into:)
2021-10-17 13:24:10 +02:00
Gwendal Roué bf601e6810 Merge SelectStatement and UpdateStatement
Addresses #1015
2021-07-29 20:20:15 +02:00
Gwendal Roué 6cc45202a0 Enable vacuum(into:) with SQLCipher 2021-07-20 20:02:18 +02:00
Gwendal Roué 368594b051 Disable VACUUM INTO tests when not available 2021-07-20 19:42:40 +02:00
Thaddeus Ternes 7d0c8c6657 Refactor tests, fix inline documentation parameter value 2021-07-12 02:28:49 -05:00
Thaddeus Ternes b28f75c5a2 Add VACUUM INTO support to DatabaseWriter 2021-07-12 01:19:45 -05:00
Gwendal Roué bed1f28b30 Give more time to SQLCipher4 Travis tests 2020-07-14 16:41:05 +02:00
Gwendal Roué d60fe3c22f Replace import GRDBCustomSQLite with import GRDB 2020-04-04 16:44:01 +02:00
Gwendal Roué 9578f984ec Remove useless #if compiler/swift checks 2020-03-08 13:42:44 +01:00
Gwendal Roué d644f01557 Deprecate Configuration.passphrase, introduce Database.usePassphrase(_:) 2019-09-02 08:38:15 +02:00
Gwendal Roué f03fd276f1 asyncWrite's completion handler accepts a database connection
This guarantees that the asyncWrite method provides exclusive write access for the whole duration of (transaction + result handling).
2019-06-14 08:03:13 +02:00
Gwendal Roué f7946834f1 Fix compiler checks for async methods 2019-06-13 14:14:35 +02:00
Gwendal Roué 0ad819902d Tests for asyncRead, asyncWrite, asyncWriteWithoutTransaction 2019-06-13 13:42:31 +02:00
Gwendal Roué e55a5bd1d0 SQLCipher can't backup encrypted databases 2019-04-20 15:29:43 +02:00
Gwendal Roué 1c1ee4e92a GRDBCipher is no longer. Long live GRDB.swift/SQLCipher. 2019-04-19 13:11:55 +02:00
Gwendal Roué 36ce78bd37 Explicit sql argument label when building prepared statements 2019-02-17 13:28:41 +01:00
Gwendal Roué db67d3840b Principle of least astonishment: rrename argument label rawSQL to sql 2019-02-17 13:28:41 +01:00
Gwendal Roué c546c578ce fetchCursor/All/One(_:rawSQL:arguments:adapter:) 2019-02-17 13:28:40 +01:00
Gwendal Roué 59162d93de Rename Database.execute(_:String) to Database.execute(rawSQL:String) 2019-02-17 13:27:54 +01:00
Gwendal Roué 7a628bf23f Add minimal failing test for #424 2018-10-04 08:35:02 +02:00
Gwendal Roué 01c9e9e1e1 Failing test for #424 2018-10-03 13:55:55 +02:00
Gwendal Roué fc2c2658b7 DatabaseWriterTests.testEraseAndVacuum: use auto increment so we can test database erasure with internal SQLite objects 2018-07-07 17:53:36 +02:00
Gwendal Roué fdef88d150 DatabaseWriterTests.testEraseAndVacuum: add a virtual table 2018-07-07 17:51:55 +02:00
Gwendal Roué a73be9c010 Fix databaseWriter.erase() with SQLCipher 2018-07-07 12:32:40 +02:00
Gwendal Roué 3fce1e00c9 Introduce AnyDatabaseReader and AnyDatabaseWriter 2017-09-10 13:37:48 +02:00
Gwendal Roué cc33b12b0d DatabaseReader.unsafeReentrantRead 2017-07-13 09:11:21 +02:00
Gwendal Roué 55e4abd534 Rename USING_SQLCIPHER to GRDBCIPHER and USING_CUSTOMSQLITE to GRDBCUSTOMSQLITE 2017-05-22 19:15:10 +02:00
Gwendal Roué ce4c20b112 Replace DatabaseWriter.availableDatabaseConnection with unsafeReentrantWrite() 2017-05-22 18:10:19 +02:00
Gwendal Roué e54cec9123 Move tests to Swift Package Manager test target 2017-04-23 15:47:16 +02:00