Compare commits

..
3586 Commits
Author SHA1 Message Date
Gwendal Roué ba709ef3c4 v7.12.1 2026-11-30 11:07:40 +01:00
Gwendal Roué 3bcae88483 Fix demo app regression probably introduced with iOS 26 or 27 2026-11-30 11:07:40 +01:00
Gwendal Roué 0f8aa074e3 Merge pull request #1900 from uveshm003/fix/cancelled-read-leaves-query-only
Ignore interruptions when entering the read-only mode
2026-11-30 09:51:37 +01:00
Uvesh Menpur be7d06962a Ignore interruptions when entering the read-only mode
beginReadOnly() runs `PRAGMA query_only = 1` before it increases
readOnlyDepth. When a cancelled task interrupts the PRAGMA after it has
enabled query_only, the PRAGMA throws, the depth is not increased, and
endReadOnly() never runs. The connection then stays read-only, and every
later write fails with SQLITE_READONLY.

Run the PRAGMA with ignoringInterruption, as endReadOnly() already does
since #1839.

Fixes #1899
2026-11-26 21:39:18 +05:30
Gwendal Roué 8ba19bc982 Merge pull request #1897 from renchris/snapshot-pool-current-reader
Optimize DatabaseSnapshotPool.currentReader
2026-11-05 08:48:04 +01:00
Chris Ren 82d879e785 Optimize DatabaseSnapshotPool.currentReader
The same early-out as b43260a1 for DatabasePool, because currentReader
runs on every synchronous read.
2026-11-04 19:51:18 -06:00
Gwendal Roué b43260a17d Optimize DatabasePool.currentReader
Suggested in https://github.com/groue/GRDB.swift/issues/1896
2026-11-04 14:36:55 +01:00
Gwendal Roué 98c58f4eef Fix more typos in public documentation 2026-11-02 20:27:37 +01:00
Gwendal Roué bd7031ec9b Fix typos in the demo app 2026-11-01 21:04:16 +01:00
Gwendal Roué 909f7455e6 Fix more typos in public documentation 2026-11-01 21:01:03 +01:00
Gwendal Roué 5d9e853f24 Fix typos in code samples 2026-11-01 20:45:05 +01:00
Gwendal Roué 7a216d7d34 Fix typos in public documentation 2026-11-01 20:45:05 +01:00
Gwendal Roué 92a554cd0d Merge branch 'development' 2026-11-01 18:24:21 +01:00
Gwendal Roué 47c8497269 v7.12.0 2026-11-01 17:03:56 +01:00
Gwendal Roué d99e639c11 Merge pull request #1894 from groue/dev/issue-1888
Fix SharedValueObservation deadlock, ordering, and cancellation
2026-11-01 16:51:47 +01:00
Gwendal Roué 1d59d1656b Fix SharedValueObservation 2026-11-01 16:23:38 +01:00
Gwendal Roué 5fe300b733 More failing SharedValueObservation tests 2026-11-01 16:00:41 +01:00
Dylan Mace a8a5b431be Failing tests: SharedValueObservation deadlocks when a client is cancelled during a notification 2026-11-01 15:02:39 +01:00
Gwendal Roué b7b747c5bb Merge pull request #1889 from builtbysharath/open-error-message
Keep SQLite's error message when a database fails to open
2026-11-01 14:55:17 +01:00
Gwendal Roué 62f4bfe5f3 Merge pull request #1893 from groue/dev/support-statement-recompilation
Dev/support statement recompilation
2026-11-01 14:54:23 +01:00
Gwendal Roué 9601d6ac9b Row fetched from a statement do not cache statement column in order to support statement recompilation 2026-11-01 14:22:32 +01:00
Gwendal Roué dc101b2847 Failing test for the Row column cache of a recompiled statement 2026-11-01 14:21:42 +01:00
Gwendal Roué a0f184ec26 Invalidate Statement column cache after recompilation 2026-11-01 14:21:42 +01:00
Gwendal Roué b983df96e2 Failing test for SQLRequest on a recompiled statement 2026-11-01 14:21:42 +01:00
Gwendal Roué 94fa864eb7 Failing test for the column cache of a recompiled statement 2026-11-01 13:57:06 +01:00
Sharath Kumar e1a0c1afbe Skip the open error message test when URI filenames are off
sqlite_compileoption_used('USE_URI') reports whether the option is
defined, not its value, and is missing when compile-option diagnostics
are omitted. Check the error from the open instead: without URI
filenames, the path is in a missing "file:" directory and fails with
SQLITE_CANTOPEN.
2026-10-13 15:35:38 +05:30
Sharath Kumar 3f80cfccf4 Keep SQLite's error message when a database fails to open 2026-10-11 22:33:07 +05:30
Gwendal Roué 6f64c72209 Merge pull request #1879 from nesevis/fix/rowid-and-single-integer-primary-key
Fix upsert for WITHOUT ROWID tables with an INTEGER primary key
2026-09-27 09:12:49 +02:00
Gwendal Roué 8e24aec8f2 Merge pull request #1885 from groue/dev/string-with-nul-character
Add support for Strings that contain the NUL character
2026-09-26 22:22:30 +02:00
Gwendal Roué de0ce29d73 Encode strings with a NUL character
Inspired from #1880 by @nesevis
2026-09-26 16:34:14 +02:00
Gwendal Roué 9858de3249 Decode strings with a NUL character
Inspired from #1880 by @nesevis
2026-09-26 16:34:14 +02:00
Gwendal Roué fe774b3537 Performance tests for String as a statement argument 2026-09-26 13:03:16 +02:00
Gwendal Roué 550ef55c90 Fast path for String performance decoding test 2026-09-26 12:43:38 +02:00
Gwendal Roué e37c7cf306 Do not measure database access acquisition and Array building 2026-09-26 12:37:11 +02:00
Gwendal Roué 1ff66c8382 Test independance 2026-09-26 12:36:33 +02:00
Chris Kolbu 8957148d4d Performance tests for string fetching and function results 2026-09-26 12:34:37 +02:00
Gwendal Roué 23083c4668 Failing tests for strings with a NUL character used as statement argument
Inspired from #1880 by @nesevis
2026-09-26 12:06:49 +02:00
Gwendal Roué dfa942e9c0 Failing tests for decoding and encoding strings with a NUL character
Inspired from #1880 by @nesevis
2026-09-26 12:06:43 +02:00
Gwendal Roué 5d31cba4a0 Failing tests for database functions returning or accepting strings with a NUL character
Inspired from #1880 by @nesevis
2026-09-26 12:06:36 +02:00
Gwendal Roué 533286eab0 Merge pull request #1884 from groue/dev/fix-1883
Work around an SQLite bug in WAL snapshot ordering
2026-09-26 10:37:32 +02:00
Gwendal Roué ac1e5e66be Remove assertion about SQLite snapshot ordering
Fix #1883
2026-09-26 10:20:32 +02:00
Gwendal Roué 6bf7ba8f03 Merge pull request #1881 from groue/dev/fix-1873
Fix an accidentally quadratic behavior in SQLite statement compilation
2026-09-23 19:09:50 +02:00
Gwendal Roué 9f2e3b7d6b Optimize statement authorizer region accumulation
This commit is inspired by #1873 from @guidedways, who detected an unexpectedly quadratic behavior in the way we build database regions from the statement authorizer
2026-09-23 14:16:22 +02:00
Gwendal Roué c08767b500 Fix stale test
The test was checking for the presence of an SQLite bug. This bug is gone in macOS 27.0.
2026-09-15 14:36:27 +02:00
Chris Kolbu 8511cfd399 Document INTEGER PRIMARY KEY in WITHOUT ROWID tables 2026-08-18 19:55:41 +10:00
Chris Kolbu 4373b3a49b Fix failing tests for INTEGER PRIMARY KEY in WITHOUT ROWID tables 2026-08-18 19:55:41 +10:00
Chris Kolbu d4713c1fa8 Failing tests for INTEGER PRIMARY KEY in WITHOUT ROWID tables 2026-08-18 19:55:41 +10:00
Gwendal Roué 0d8cf958b4 Merge pull request #1876 from latent-9/docs/fix-doubled-word
Fix doubled word in doc comment
2026-08-08 10:56:30 +02:00
latent-9 0a9a55d15f Fix doubled word in doc comment 2026-08-08 15:07:24 +12:00
Gwendal Roué b83108d10f Merge branch 'development' 2026-06-18 14:07:07 +02:00
Gwendal Roué 468b8e81be v7.11.1 2026-06-18 14:06:56 +02:00
Gwendal Roué a3a29aa921 Merge pull request #1869 from MarkusSintonen/optimize-register-migration
Optimize migration registration to be O(n) instead of O(n^2)
2026-06-18 08:19:57 +02:00
Markus Sintonen f1d321139f Combine unappliedExecutions into a single loop 2026-06-17 21:06:52 +03:00
Markus Sintonen 7d489358e2 Compare migration identifier from OrderedDictionary key 2026-06-17 20:41:46 +03:00
Markus Sintonen 67530472a5 Use OrderedDictionary for O(1) migration registration 2026-06-17 20:35:58 +03:00
Gwendal Roué fe3b957e5f Add missing Foundation imports 2026-06-10 12:55:39 +02:00
Gwendal Roué f1eb48b0cf Fix a warning in Version 27.0 beta 2026-06-10 12:53:47 +02:00
Gwendal Roué 9ed8c8457e Merge branch 'development' 2026-06-01 08:06:44 +02:00
Gwendal Roué 656d1f4539 v7.11.0 2026-06-01 08:06:35 +02:00
Gwendal Roué cc85b3d82d Disable GRDBCustom on GitHub CI
The tests pass on my machine, but not on CI: https://github.com/groue/GRDB.swift/actions/runs/26725623508/job/78792729917
2026-06-01 07:51:40 +02:00
Gwendal Roué 97f517a660 Use Xcode folders
... except in projects that use CocoaPods, because well the new Xcode project format is not supporteed
2026-05-31 23:57:01 +02:00
Gwendal Roué b49e990bdd Merge pull request #1864 from simolus3/development
Add `observe(statement:)` to `TransactionObserver`
2026-05-31 14:38:10 +02:00
Gwendal Roué 27c7bda0e9 Refactor with DatabaseEventObservationStrategy
The issue with `observesAllDatabaseChanges` is that this was a misleading name: transaction observers are not notified of changes that are performed in a save point that is eventually rollbacked.

By exposing the DatabaseEventObservationStrategy type, we allow for a future extra flag that ignores save points, trading observation precision for a reduced memory footprint.
2026-05-31 14:04:10 +02:00
Simon Binder 253cdfec8c Review feedback 2026-05-11 20:47:20 +02:00
Simon Binder e934c428b4 Add observe(statement:) to TransactionObserver 2026-05-05 22:06:06 +02:00
Gwendal Roué cdc2fb4200 Merge pull request #1858 from groue/dev/issue-1855
Fix upsert for WITHOUT ROWID tables
2026-03-19 08:07:22 +01:00
Gwendal Roué 47cb0b877b Fix failing test for upsert in a table WITHOUT ROWID
Fixes #1855
2026-03-16 12:10:57 +01:00
Gwendal Roué c637e04133 Failing test for upsert in a table WITHOUT ROWID
Failing test for #1855
2026-03-16 12:10:57 +01:00
Gwendal Roué 36e30a6f1e Merge branch 'development' 2026-02-15 15:10:35 +01:00
Gwendal Roué 368514c33b v7.10.0 2026-02-15 15:09:40 +01:00
Gwendal Roué 21b1322e05 Fix Swiftlint warnings 2026-02-15 15:09:40 +01:00
Gwendal Roué 819f4572df Merge pull request #1852 from groue/dev/upsert-strategy
Configure whether UPSERT should update all columns, or no column.
2026-02-15 14:10:32 +01:00
Gwendal Roué 7b01c9b72b Let the user choose between the two possible update strategies for upsert 2026-02-15 13:40:05 +01:00
Gwendal Roué 7f9d1503a0 Merge pull request #1850 from swift-everywhere/platform-fixes
Android and Windows platform import/conditional accommodation
2026-02-04 08:38:48 +01:00
Marc Prud'hommeaux 14567635e4 Android and Windows platform import/conditional accommodation 2026-02-03 17:56:04 -05:00
Gwendal Roué 205387d2d2 Merge pull request #1849 from marcprux/patch-1
Add Sendable conformance to DispatchQueueExecutor for Android and Windows
2026-02-03 11:32:13 +01:00
Marc Prud'hommeaux c8f0328413 Add Sendable conformance to DispatchQueueExecutor for Android and Windows 2026-02-03 10:44:33 +01:00
Gwendal Roué e784b10314 Merge pull request #1845 from R4N/sqlcipher-spm-upstream
SQLCipher organizational/import adjustments
2026-02-03 08:19:11 +01:00
Gwendal Roué 34fa177a47 Merge pull request #1848 from groue/bellebethcooper-typo-fix
Minor typo in doc comments
2026-02-03 08:13:35 +01:00
bellebethcooper 67ebcb325c Minor typo in doc comments 2026-02-03 16:32:37 +11:00
Gwendal Roué a3036feb48 Merge branch 'development' into sqlcipher-spm-upstream 2026-02-01 15:11:22 +01:00
Gwendal Roué 14d4c842e4 Document how to enable SQLCipher with SPM 2026-02-01 14:48:50 +01:00
Gwendal Roué 79276d7f68 Prepare support for SPM+SQLCipher 2026-02-01 14:43:24 +01:00
Gwendal Roué 14fdba1ef3 Rename CipherXxx APIs to SQLCipherXxx when possible 2026-02-01 14:43:24 +01:00
Gwendal Roué 8b5017714f Support more SQLCipher log destinations 2026-02-01 14:43:24 +01:00
Gwendal Roué a1a9c3aefe Make links appear as links in DocC 2026-02-01 12:37:49 +01:00
Gwendal Roué d664db9610 Enhance documentation formatting 2026-02-01 12:37:49 +01:00
Gwendal Roué 2c4492a098 Do not define CipherLogLevel as a frozen enum 2026-02-01 12:37:49 +01:00
Gwendal Roué c0ef0e0f99 Use the same logic for importing SQLCipher as in other files 2026-02-01 11:19:30 +01:00
Gwendal Roué 81a699cae9 Merge branch 'grdb_linux_changes' into development 2026-02-01 11:00:35 +01:00
Micah Moore bd954c6791 Removes GRDBSQLCipher import from SQLCipher conditional import in Database.swift to allow SQLCipher forkers versatility for defining pass-throughs to GRDB required sqlite variadic functions. 2026-01-19 13:37:41 -05:00
Micah Moore 2f94eb307a Adds Foundation import to Database+SQLCipher 2026-01-16 14:59:25 -05:00
Gwendal Roué 51083da42d Merge pull request #1846 from leejungyeob/fix-usage-example-typo
Fix typo in usage examples
2026-01-16 13:18:54 +01:00
leejungyeob c229891b6d Fix typo in usage examples 2026-01-16 18:20:56 +09:00
Micah Moore c24bf5d118 SQLCipher adjustments to support forks which want to enable SQLCipher using traits/swiftSettings
- Adds Database+SQLCipher extension with SQLCipher operations, enabled by #if SQLITE_HAS_CODEC
- Adjusts Import Statements to import SQLCipher when SQLCipher trait is enabled (or SQLCipher swiftSetting is set)
2026-01-14 11:32:48 -05:00
Gwendal Roué ccfe3149d7 Merge pull request #1842 from Cykelero/fix-usage-example-typos
Fix typos in usage examples
2026-01-09 16:30:58 +01:00
Nathan Manceaux-Panot ce71d6c19f Fix typos in usage examples 2026-01-09 15:44:42 +01:00
Gwendal Roué 129e53d54e Remove obsolete TODOs 2025-12-30 13:00:56 +01:00
Gwendal Roué bc5dd31366 Fix Swiftlint warnings 2025-12-30 10:31:13 +01:00
Gwendal Roué aa0079aeb8 Merge branch 'development' 2025-12-13 12:11:32 +01:00
Gwendal Roué 74ef238376 v7.9.0 2025-12-13 12:05:31 +01:00
Gwendal Roué 9d7a487971 Merge pull request #1839 from groue/dev/issue-1838
Fix cancellation of async tasks that use the FTS5 full-text engine.
2025-12-10 16:11:32 +01:00
Gwendal Roué ac2f2e8643 Test that we recover from the FTS5 bug 2025-12-10 13:38:25 +01:00
Gwendal Roué e281149a2d Simplify Issue1838Tests
... and add it to test targets
2025-12-10 13:28:04 +01:00
Gwendal Roué 3ee256e7e8 Common API for statements that must ignore interruption errors 2025-12-09 21:39:20 +01:00
Gwendal Roué 361599aacd Task cancellation should turn all SQLITE_INTERRUPT errors into CancellationError, including errors thrown by statement compilation
I did not know statement compilation could fail when database is interrupted until #1838. A ROLLBACK statement would not even compile due to the FTS5 statement leak reported in https://sqlite.org/forum/forumpost/137c7662b389fa18
2025-12-09 21:38:15 +01:00
Gwendal Roué 64a024097d Fix failing test for #1838 by reseting all prepared statements before retrying 2025-12-08 21:40:48 +01:00
Gwendal Roué 60ea10948b Protect PRAGMA query_only = 0 against SQLITE_INTERRUPT
This should fix a race condition about cancellation that happens during a read-only access.
2025-12-08 21:22:43 +01:00
Gwendal Roué 5dba64d545 Retry a rollback in case of SQLITE_INTERRUPT error
This should fix a race condition about cancellation that happens during a rollback
2025-12-08 21:11:26 +01:00
Gwendal Roué 2212a17950 Failing test for #1838 2025-12-08 15:13:28 +01:00
Gwendal Roué 24fa06d646 Merge branch 'master' into development 2025-12-08 09:51:07 +01:00
Gwendal Roué fd788900b6 Revert "Add link to our beloved sponsor Base"
This reverts commit 827ab62bb6.
2025-12-08 09:50:02 +01:00
Gwendal Roué b31be05ee3 Do not use traits, since they are not supported by Xcode
This pull request fixes #1826, which broke `make test_GRDBDemo` with Xcode 26.0.1.

To reproduce the failure:

- Remove from ~/Library/Developer/Xcode/DerivedData all previous builds of GRDB and related stuff
- Run `make distclean test_GRDBDemo`

We expect a success, but it fails with error "Unable to find module dependency: 'GRDBSQLite'".
2025-10-27 13:37:21 +01:00
Tim De Jong 3dd3bbf0c5 vscode config 2025-10-12 18:03:57 +02:00
Tim De Jong d7cf0f9e59 NSError bridging is not available, or doesn't work the same on non-Darwin platforms. Skip testNSErrorBridging on these platforms. 2025-10-12 18:03:57 +02:00
Tim De Jong 389c3e0d4a Use #if !canImport(Combine) per test case (as done by @marcprux) and throw an XCTSkip for these test cases. This gives a better impression how many tests are skipped on Linux/non-Darwin platforms. 2025-10-12 18:03:57 +02:00
Tim De Jong a212bf9e89 It should be canImport(Darwin) not os(Darwin) 2025-10-12 18:03:57 +02:00
Tim De Jong 65186104cc Integrated upstream changes.
Some tests depend on Combine which is not available on non-Darwin platforms. Fix this.
2025-10-12 18:03:57 +02:00
Tim De Jong 2f108508fa Fixed DatabaseSnapshotTests on non-darwin platforms 2025-10-12 18:03:57 +02:00
Tim De Jong 5513eab099 Fixed the tests in DatabaseQueueTests.swift 2025-10-12 18:03:57 +02:00
Tim De Jong 2ad2d20a89 Fixed the unit tests in DatabasePoolConcurrencyTests. 2025-10-12 18:03:57 +02:00
Tim De Jong dd90fe6e62 Ignore ValueObservationRecorderTests.swift on non-Darwin platforms. 2025-10-12 18:03:57 +02:00
Tim De Jong 691207567a Ignore FailureTestCase.swift entirely on non-Darwin platforms for now. 2025-10-12 18:03:57 +02:00
Tim De Jong c7f1dd7470 Fixed import in CGFloatTests.swift to work under non-Darwin platforms. 2025-10-12 18:03:57 +02:00
Tim De Jong 8e5b9ca9bd Fixed UUID fromDatabaseValue for non-Darwin platforms 2025-10-12 18:03:56 +02:00
Tim De Jong dc7d47c066 Fixed databaseValue build for non-Darwin platforms. 2025-10-12 18:03:56 +02:00
Tim De Jong 14f60ad48f Fixed fromDatabaseValue build under non-Darwin platforms 2025-10-12 18:03:56 +02:00
Tim De Jong e758fde941 Removed #if !os(Linux) in NSString.swift, NSData.swift and Date.swift. 2025-10-12 17:43:25 +02:00
Tim De Jong 7477e1cff8 Removed the #if !os(Linux) compiler directive in the Decimal extension, as it compiles fine under swift 6 2025-10-12 17:43:15 +02:00
Tim De Jong 2d6fe172c3 Import Foundation for CGFloat on non-Darwin platforms 2025-10-12 17:43:02 +02:00
Tim De Jong 0526853dde Fixed some linker errors caused by WAL absence on Linux. 2025-10-12 17:42:49 +02:00
Gwendal Roué a60810f28e Merge pull request #1819 from groue/dev/SQLCipher-cleanup
Accept multiple SQLCipher libraries
2025-10-12 15:46:52 +02:00
Gwendal Roué c35095c6da Enable more tests 2025-10-12 14:58:06 +02:00
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é 48a17ce490 Merge pull request #1826 from groue/dev/snapshot-cleanup
Simplify the compiler checks for the availability of SQLite snapshots
2025-10-12 14:27:06 +02:00
Gwendal Roué 361a482b1e Enable SQLITE_ENABLE_SNAPSHOT by default and introduce SQLITE_DISABLE_SNAPSHOT 2025-10-12 14:03:09 +02:00
Gwendal Roué 8cba324d6e Refactor the SQLite import
We can not use `#if Trait` because Xcode does not enable those compiler flags. Always count on Apple for delivering the best quality software.

So now we import the default SPM SQLite last, after all other cases have been excluded.

The GRDB framework (GRDB.xcodeproj and GRDB via CocoaPods) is distinct from the default SPM trait, so we detect it with GRDBFRAMEWORK.
2025-10-04 17:56:06 +02:00
Gwendal Roué 17e1683b66 Bump CI to macOS 15 and Xcode 16.4 2025-10-04 17:56:06 +02:00
Gwendal Roué b1b83abd8b Simplify the compiler checks for the availability of SQLite snapshots 2025-10-04 14:15:13 +02:00
Gwendal Roué d06c9ed6b5 Enable SQLITE_ENABLE_SNAPSHOT in the Xcode GRDB framework 2025-10-04 14:15:13 +02:00
Gwendal Roué 9a98ed6292 Enable SQLITE_ENABLE_SNAPSHOT in the GRDBSQLite trait, on Darwin platforms 2025-10-04 14:15:13 +02:00
Gwendal Roué 5cc85a98f3 Only depend on GRDBSQLite when the default GRDBSQLite trait is active. 2025-10-04 13:53:38 +02:00
Gwendal Roué edc1d646f0 [BREAKING] Bump minimum Swift version to 6.1 2025-10-04 13:53:38 +02:00
Gwendal Roué ab09078842 Fix failing test for merged migration that merges itself 2025-10-03 09:36:22 +02:00
Gwendal Roué 267e1ea5a6 Add failing test for merged migration that merges itself 2025-10-03 09:34:26 +02:00
Gwendal Roué 18497b68fd Merge branch 'development' 2025-10-02 08:11:07 +02:00
Gwendal Roué 19e33e2e7d v7.8.0 2025-10-02 08:10:52 +02:00
Gwendal Roué 76e0815907 Merge pull request #1818 from groue/dev/obsolete-migrations
Merged Migrations
2025-10-02 08:06:24 +02:00
Gwendal Roué 85ad232b0b Support for migrations that merge previous migrations 2025-10-01 17:24:00 +02:00
Gwendal Roué db695cf7dc Merge branch 'development' 2025-09-29 21:14:01 +02:00
Gwendal Roué 76a7be8404 v7.7.1 2025-09-29 20:29:44 +02:00
Gwendal Roué 196c33ba63 Merge pull request #1822 from groue/dev/issue-1820
Fix the save() method for record types with attached triggers
2025-09-29 20:26:12 +02:00
Gwendal Roué 50a74f7b03 Cleanup 2025-09-29 19:43:41 +02:00
Gwendal Roué 3f27fb9289 Fix #1820
The regression was introduced by c7bbebc
2025-09-29 19:35:00 +02:00
Gwendal Roué 62fdd41d75 Failing regression test for #1820 2025-09-29 19:34:15 +02:00
Gwendal Roué c5d02eac32 Merge branch 'development' 2025-09-23 20:14:27 +02:00
Gwendal Roué d1bfce829b v7.7.0 2025-09-23 19:30:13 +02:00
Gwendal Roué edd292bcbd CHANGELOG 2025-09-23 17:44:05 +02:00
Gwendal Roué a0e101e683 Merge pull request #1810 from groue/dev/persistable-views
Persistable Database Views
2025-09-23 17:38:30 +02:00
Gwendal Roué 9ef5e2c8eb Simplify error messages 2025-09-23 17:12:27 +02:00
Gwendal Roué f5dc68fc6f Fix typos 2025-09-23 17:12:27 +02:00
Gwendal Roué b210ec7428 View Records guide 2025-09-23 17:12:27 +02:00
Gwendal Roué a7e3acf409 Remove TODO warnings 2025-09-23 17:12:27 +02:00
Gwendal Roué ca27f75760 Test the stable order of views with a primary key 2025-09-23 17:12:27 +02:00
Gwendal Roué 99ecf76a77 Support primary key when testing the existence of an association to a view 2025-09-23 17:12:27 +02:00
Gwendal Roué f4991273c2 DatabaseSchemaSource tests 2025-09-23 17:12:27 +02:00
Gwendal Roué 1b98a964d7 Documentation 2025-09-23 17:12:27 +02:00
Gwendal Roué 1095d21abd Default implementation for schema source chaining.
When GRDB eventually adds methods to the DatabaseSchemaSource protocol, our chained schema source will implement chaining on those new methods.

When users write their own custom chaining schema source, the compiler will not tell them that they have to chain the new methods when they upgrade GRDB. The built-in (and correct) implementation of chaining helps avoiding this scenario.
2025-09-23 17:12:27 +02:00
Gwendal Roué eb2378a741 DatabaseSchemaSource documentation 2025-09-23 17:12:27 +02:00
Gwendal Roué 37dde39557 Public Database.schemaSource and withSchemaSource(_:execute:) 2025-09-23 17:12:27 +02:00
Gwendal Roué 5786391dc9 RecordMappedOnMutableViewTests 2025-09-23 17:12:27 +02:00
Gwendal Roué e1abafaae3 Ignore schema source during migrations 2025-09-23 17:12:27 +02:00
Gwendal Roué 93d0baeade The stable order for views is provided by the schemaSource, if any 2025-09-23 17:12:27 +02:00
Gwendal Roué 26ebd7e147 Update outdated comments 2025-09-23 17:12:27 +02:00
Gwendal Roué 75e99861af Update TableRecordUpdateTests with record types based on database views 2025-09-23 17:12:27 +02:00
Gwendal Roué 2e433a3cb2 Update TableRecordDeleteTests with record types based on database views 2025-09-23 17:12:27 +02:00
Gwendal Roué 9518d74fa6 Improve error message 2025-09-23 17:12:27 +02:00
Gwendal Roué c7bbebc80f Change the way we count changes in order to support INSTEAD OF triggers
Database.changesCount calls sqlite3_changes(), whose documentation says:

> https://sqlite.org/c3ref/changes.html
> Changes to a view that are intercepted by INSTEAD OF triggers are not counted.

Since we want to support INSTEAD OF triggers well, so that record types can be based on views, we switch to sqlite3_total_changes().
2025-09-23 17:12:27 +02:00
Gwendal Roué 38f5226e95 Database.table(_:hasUniqueKey:) now accept views 2025-09-23 17:12:27 +02:00
Gwendal Roué 2b19803644 DatabaseSchemaSource tests 2025-09-23 17:12:27 +02:00
Gwendal Roué d7d61add23 DatabaseSchemaSource customizes the primary key of database views 2025-09-23 17:12:27 +02:00
Gwendal Roué d040588849 Database.fetchPrimitivePrimaryKey(forTable:)
This method is necessary for the customization of schema introspection: it must be possible to fallback on the primitive SQLite schema introspection when needed.
2025-09-23 17:12:27 +02:00
Gwendal Roué 30313623eb Make DatabaseSchemaID and DatabaseObjectID public
This is also a big cleanup opportunity.

We need public schema identifiers in order to support the customization of schema introspection.
2025-09-23 17:12:27 +02:00
alephao aab2664431 fix: DispatchQueueExecutor sendable conformance on Linux 2025-09-18 08:27:14 +02:00
Gwendal Roué f3acfecc16 DatabaseCollation no longer uses a deprecated String initializer 2025-09-13 12:21:36 +02:00
Gwendal Roué aa2cdb7ec3 Merge branch 'master' into development 2025-09-10 20:53:15 +02:00
Gwendal Roué d90ba851fe Merge pull request #1803 from groue/dependabot/github_actions/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-09-10 20:52:19 +02:00
Gwendal Roué 7eea8ccb91 Merge pull request #1813 from groue/dev/SendableMetaType
Support for Xcode 26
2025-09-10 18:05:39 +02:00
Gwendal Roué 6a25b3538e DocC for GRDBSendableMetatype 2025-09-10 07:41:42 +02:00
Gwendal Roué 7ec88b76e0 Start an immediate observation
In the iOS 26 simulator the demo app would show a flash of missing content.
2025-09-10 07:12:53 +02:00
Gwendal Roué 1a3842e4bc Combine and concurrency: lol 2025-09-10 07:12:53 +02:00
Gwendal Roué 32ed290a1b EncodableRecord is GRDBSendableMetatype
This allows us to apply the encoding strategies for Data, Date, UUID when we know we need it, i.e. when we know the primary key, and this happens when we access the database - in a nonisolated fashion.
2025-09-10 07:12:53 +02:00
Gwendal Roué f88c7202cd TableRecord is GRDBSendableMetatype
This is required because the value of databaseSelection is not required to be Sendable. This forces TableRecord.relationForAll to postpone the definition of the selection until we access the database - in a nonisolated fashion.
2025-09-10 07:12:53 +02:00
Gwendal Roué 79ce0ff5f3 Avoid a compiler warning 2025-09-10 07:12:53 +02:00
Gwendal Roué f435715f75 ValueReducer is SendableMetatype
ValueReducer does not support isolated conformances: it must be able to reduce observed values when needed. This can happen in a nonisolated fashion.
2025-09-10 07:12:52 +02:00
Gwendal Roué cf1702630f DatabaseAggregate is SendableMetatype
DatabaseAggregate does not support isolated conformances: it must be able to aggregate values whenever a database access is performed. This can happen in a nonisolated fashion.
2025-09-10 07:12:52 +02:00
Gwendal Roué fd7adf7fb3 SendableMetatype for compiler >= 6.2 2025-09-10 07:12:52 +02:00
Gwendal Roué be0f0c6f25 Fix a compiler error
The error was:

> use of ‘@import’ in framework header is discouraged, including this header requires -fmodules

This commit applies the fix recommended at https://developer.apple.com/documentation/xcode/identifying-and-addressing-framework-module-issues
2025-09-10 07:12:52 +02:00
Gwendal Roué cd84db3873 Xcode 26 upgrade 2025-09-10 07:12:52 +02:00
Gwendal Roué 4cfa692ddd Fix race condition regarding Task cancellation
This complements #1797 by making sure read-only transactions complete correctly, even if the task is cancelled.
2025-09-10 07:12:11 +02:00
Gwendal Roué 8dfbbb50f6 TODO 2025-09-10 06:51:14 +02:00
Gwendal Roué 3f69614405 DatabaseFunction with raw xFunc
No use right now, but I was really bugged that we could not use raw sqlite3_result_xxx methods from custom functions.
2025-09-02 08:09:16 +02:00
Gwendal Roué b4f3a83755 Remove SwiftLint warning
If we don't have warnings about explicit nil initialization, then we have a warning about the name of a disabled rule which is now deprecated. In all cases, we have a warning.

So let's just write 2025 Swift, ignore that rule, and call it a day.
2025-09-02 08:07:16 +02:00
Gwendal Roué 7cd2a4563c Merge pull request #1807 from emmanuel-ferdman/development
Update `GRDB7MigrationGuide.md` reference
2025-08-31 13:52:09 +02:00
Emmanuel Ferdman 2698c55654 Update GRDB7MigrationGuide.md reference
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-08-30 09:58:59 -07:00
Gwendal Roué 37065fb503 Regression test for #1797 2025-08-19 08:05:07 +02:00
Gwendal Roué 3801ab9ac6 Fix Base image link 2025-08-19 08:04:41 +02:00
Gwendal Roué 26abd8ad79 Merge branch 'dev/sponsor-base' 2025-08-18 17:52:58 +02:00
Gwendal Roué 827ab62bb6 Add link to our beloved sponsor Base 2025-08-18 17:39:03 +02:00
dependabot[bot] fdeb88a6bd Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-18 09:08:53 +00:00
Gwendal Roué 8ba1bc9a96 Merge branch 'development' 2025-07-23 13:27:07 +02:00
Gwendal Roué c4e39285a0 v7.6.1 2025-07-23 13:27:01 +02:00
Gwendal Roué 1622b72b62 Merge pull request #1797 from groue/dev/cancellation-fix
Fix race condition regarding Task cancellation
2025-07-23 13:24:52 +02:00
Gwendal Roué 215128390d Fix race condition: prevent cancellation from cancelling other database accesses after database accesses has completed
Before this change, cancelling a database access could cancel *another* database access 😱
2025-07-23 12:01:58 +02:00
Gwendal Roué c5283a0bd9 Warn against the incompatibility between custom SQLite builds and SPM
Addresses https://github.com/groue/GRDB.swift/issues/1709#issuecomment-3100503200
2025-07-22 07:47:41 +02:00
Gwendal Roué fb68849bfb Merge branch 'development' 2025-07-20 18:11:22 +02:00
Gwendal Roué c2bddde88a v7.6.0 2025-07-20 17:21:28 +02:00
Gwendal Roué b4a21d63b2 Merge pull request #1796 from groue/dev/public-RowDecodingError
Throwing row accessors
2025-07-20 17:13:49 +02:00
Gwendal Roué 6ca38eda3b Give TableAliasBase a location in DocC 2025-07-20 14:38:15 +02:00
Gwendal Roué d76922fe1a Document throwing accessors for records and record collections 2025-07-20 14:38:15 +02:00
Gwendal Roué a46f3b69e9 Document throwing row accessors 2025-07-20 14:38:15 +02:00
Gwendal Roué b572982e34 Document RowDecodingError 2025-07-20 13:11:42 +02:00
Gwendal Roué 5a8b025ee8 TODO: test throwing row accessors of record collections and sets 2025-07-20 13:00:12 +02:00
Gwendal Roué 9a1914a813 Test throwing record row accessors 2025-07-20 13:00:12 +02:00
Gwendal Roué 4a92263c5e Test throwing column row accessors 2025-07-20 13:00:12 +02:00
Gwendal Roué f72d0cecb2 Document throwing row accessors 2025-07-20 13:00:12 +02:00
Gwendal Roué 24e0f5ddeb Make throwing row accessors public 2025-07-20 13:00:12 +02:00
Gwendal Roué 2b1b56ea47 Make RowDecodingError public 2025-07-20 13:00:12 +02:00
Gwendal Roué ad704c58e5 Hide implementation of RowDecodingError
Turn the enum into a struct so that it can be made public without exposing internal details
2025-07-20 13:00:12 +02:00
Gwendal Roué 3f928bcf9c Merge pull request #1794 from groue/dev/actor-access
Access task locals from asynchronous database accesses
2025-07-19 17:15:25 +02:00
Gwendal Roué c91c183354 Async database accesses are no longer escaping and no longer need to capture self 2025-07-19 16:42:17 +02:00
Gwendal Roué c666393e63 AppDatabase can be a struct, so let it be a struct 2025-07-19 16:42:17 +02:00
Gwendal Roué d242421862 Async methods accept a non-escaping closure 2025-07-19 16:42:17 +02:00
Gwendal Roué 7a1e65b142 Remove late cancellation checks
I'm slowly changing my mind about this.
2025-07-19 15:27:08 +02:00
Gwendal Roué fb4578a7d6 Delete unused code 2025-07-19 15:26:46 +02:00
Gwendal Roué 6069e6d683 DatabasePool.barrierWriteWithoutTransaction can access task locals 2025-07-19 15:26:44 +02:00
Gwendal Roué a703da9b27 Async version of Pool.barrier { ... } 2025-07-19 14:25:50 +02:00
Gwendal Roué 684266b7b8 DispatchQueueActor supports barriers in concurrent DispatchQueue 2025-07-19 14:25:50 +02:00
Gwendal Roué b24fb76610 Failing test for task locals with DatabaseWriter (#1793) 2025-07-19 14:25:50 +02:00
Gwendal Roué cbbd0cb945 Add asserts about expected ends of transaction 2025-07-19 14:25:50 +02:00
Gwendal Roué dd4227303a DatabasePool unsafeRead can access task locals 2025-07-19 14:25:50 +02:00
Gwendal Roué 69b786dc9e Allow COMMIT from a cancelled read-only access. 2025-07-19 14:25:50 +02:00
Gwendal Roué 9dd8b2cef7 Add failing test for task locals access from unsafeRead (#1793) 2025-07-19 14:25:50 +02:00
Gwendal Roué c5ac6cdaa6 DatabaseSnapshotPool reads can access task locals 2025-07-19 14:25:50 +02:00
Gwendal Roué e154a652dc Don't check for reentrancy from async Pool.read
One can't call an async function from a database access anywau
2025-07-19 14:25:50 +02:00
Gwendal Roué 41d4f23a83 DatabasePool reads can access task locals 2025-07-19 14:25:50 +02:00
Gwendal Roué 27b7400979 Async version of Pool.get() 2025-07-19 14:25:50 +02:00
Gwendal Roué e6847886db Extract DispatchQueueActor
We'll probably need it in order to access pool elements with support for task locals
2025-07-19 14:25:50 +02:00
Gwendal Roué c064515247 DatabaseQueue and DatabaseSnapshot reads can access task locals 2025-07-19 14:25:50 +02:00
Gwendal Roué 96236a3d44 Turn Database.cancel into a sendable closure 2025-07-19 14:25:50 +02:00
Gwendal Roué 01cd49b4ec Failing test for task locals (#1793) 2025-07-19 14:25:50 +02:00
Gwendal Roué 9db14cb893 Merge pull request #1776 from Jason-Abbott/development
Add custom build instruction for hardened runtime
2025-06-11 09:22:36 +02:00
Jason Abbott b26f60eae0 Add custom build instruction for hardened runtime 2025-06-10 18:45:29 -06:00
Gwendal Roué 79a41dcbbb Merge pull request #1773 from Jason-Abbott/development 2025-06-01 10:24:09 +02:00
Jason Abbott c7d50486ad Merge branch 'groue:development' into development 2025-05-30 12:05:03 -06:00
Jason Abbott 93292d88f4 Make DatabasePreUpdateEvent.Kind Sendable, matching DatabaseEvent.Kind, and also duplicate comments from DatabaseEvent.Kind while here 2025-05-30 12:02:23 -06:00
Gwendal Roué be22e0a2d0 Merge pull request #1768 from groue/dev/throwing-closures
All closures that accept DatabaseComponents can throw
2025-05-12 20:58:47 +02:00
Gwendal Roué d1a2cb0948 All closures that accept DatabaseComponents can throw 2025-05-12 20:33:18 +02:00
Gwendal Roué a5a1be26b4 Merge branch 'development' 2025-05-11 14:25:02 +02:00
Gwendal Roué b84d1eaeef v7.5.0 2025-05-11 14:23:56 +02:00
Gwendal Roué e7a35dde06 Extend Usage section 2025-05-11 14:23:04 +02:00
Gwendal Roué c2e6c86934 Warn against the independent observation of each element in a list. 2025-05-11 13:32:50 +02:00
Gwendal Roué 7c2cbfe814 Merge pull request #1759 from groue/dev/expression-builder
Build request with closures
2025-05-11 13:28:01 +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é fedcdef65e Fix typo 2025-05-11 11:21:48 +02:00
Gwendal Roué 2316fb3831 Prefer key paths when possible 2025-05-11 11:12:19 +02:00
Gwendal Roué 98e2812089 Convenience api for updating a single column 2025-05-11 10:58:09 +02:00
Gwendal Roué 8f6f1aa264 TODO 2025-05-11 10:57:28 +02:00
Gwendal Roué 96d04716c2 Update more documentation with the closure syntax 2025-05-11 10:57:20 +02:00
Gwendal Roué 004968517e Update more documentation with the closure syntax 2025-05-10 17:43:22 +02:00
Gwendal Roué f635aea2f2 Update more documentation with the closure syntax 2025-05-10 16:38:02 +02:00
Gwendal Roué 5c9b772e65 Test CommonTableExpression aliases on Swift 6.1 2025-05-10 16:37:44 +02:00
Gwendal Roué d6ff3b14d4 DocC 2025-05-10 15:34:10 +02:00
Gwendal Roué fac0c22ecb Documentation for generic TableAlias 2025-05-10 14:52:48 +02:00
Gwendal Roué 5461caff04 Tests for generic TableAlias 2025-05-10 14:52:48 +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é 430141344d Update more documentation with the closure syntax 2025-05-10 09:36:14 +02:00
Gwendal Roué 0567f69e66 Update AssociationBasics.md with the closure syntax 2025-05-10 09:36:14 +02:00
Gwendal Roué be2fb76d77 DocC 2025-05-10 09:36:14 +02:00
Gwendal Roué 503fb09270 Test that aggregate can be expressed with key-paths in Swift 6.1 2025-05-10 09:36:14 +02:00
Gwendal Roué ec6042e9c7 Update Tour.playground with closure syntax 2025-05-10 09:36:14 +02:00
Gwendal Roué 190ccda727 Rename deleteAndFetchStatement(_:select:) for consistency 2025-05-10 09:36:14 +02:00
Gwendal Roué af1adff71d More closure syntax for requests in README 2025-05-10 09:36:14 +02:00
Gwendal Roué 43e103d5f8 Recommend GRDB7 for CocoaPods 2025-05-10 09:36:14 +02:00
Gwendal Roué 7b2e9d838a Swift 6.1 compiler: test key-path requests. 2025-05-10 09:36:14 +02:00
Gwendal Roué 6b0faede2a Use closure syntax for insertAndFetch 2025-05-10 09:36:14 +02:00
Gwendal Roué ed402d5de6 Use closure syntax for batch updates 2025-05-10 09:36:14 +02:00
Gwendal Roué db5c4cc458 Use closure syntax for requests in README 2025-05-10 09:36:14 +02:00
Gwendal Roué 352f77f225 Stop recommending String enums for Columns.
We now recommend:

    enum Columns {
        static let id = Column("id")
        static let title = Column("title")
        static let latitude = Column("latitude")
        static let longitude = Column("longitude")
    }

Instead of the previous recommendation:

    enum Columns: String, ColumnExpression {
        case id, title, latitude, longitude
    }

This is because SE-0438 does not support Metatype Keypaths for enums. A request like `Place.order(\.title)` does not compile with a String enum.
2025-05-10 09:36:14 +02:00
Gwendal Roué ed98ac30e0 DocC 2025-05-10 09:36:14 +02:00
Gwendal Roué 35fa28ab90 QueryInterfaceRequest.select(_:as:) with ColumnsProvider 2025-05-10 09:36:14 +02:00
Gwendal Roué a89bd88340 Prefer key paths over closures, except in tests
Don't use key paths in tests because they are Swift 6.1+ only
2025-05-10 09:36:14 +02:00
Gwendal Roué b01f6da3cf Remove TODO 2025-05-10 09:36:14 +02:00
Gwendal Roué e7fdd65072 deleteAndFetchStatement(_,selection:) with ColumnsProvider 2025-05-10 09:36:14 +02:00
Gwendal Roué ff15f30a3b select(_, as:) with ColumnsProvider 2025-05-10 09:36:14 +02:00
Gwendal Roué f69ca1a573 Build aggregates from ColumnsProvider 2025-05-10 09:36:14 +02:00
Gwendal Roué e8b143e2ee Demo app uses ColumnsProvider 2025-05-10 09:36:14 +02:00
Gwendal Roué 5e9b965bee Test requests built from ColumnsProvider 2025-05-10 09:36:13 +02:00
Gwendal Roué ce238b6643 Build requests from ColumnsProvider 2025-05-10 09:36:13 +02:00
Gwendal Roué 787393db18 Fix Swiftlint warning 2025-05-10 09:36:13 +02:00
Gwendal Roué 8774497f31 Modernize QueryInterfaceRequestTests with an inner Columns type
so that we can use the new SQLExpressionBuilder
2025-05-10 09:36:13 +02:00
Gwendal Roué 94e90e7e6c Columns and ColumnsProvider associated types of TableRecord 2025-05-10 09:36:13 +02:00
Gwendal Roué 9064717b8a Merge pull request #1764 from groue/dev/fts-pattern-initializers
Make it possible to create a raw FTS5Pattern without any database connection
2025-05-08 13:07:27 +02:00
Gwendal Roué 00f462292b Documentation 2025-05-08 12:50:19 +02:00
Gwendal Roué 5a0622e5b8 Tests for FTS5Pattern.init(rawPattern:allowedColumns:) 2025-05-08 12:48:24 +02:00
Gwendal Roué 596db46407 Make FTS5Pattern.init(rawPattern:allowedColumns:) public
Fix #1763
2025-05-08 12:47:21 +02:00
Gwendal Roué 0aaa2a4f37 Adjust wording about Linux 2025-04-26 17:31:40 +02:00
Gwendal Roué 04e73c26c4 v7.4.1 2025-03-28 08:17:58 +01:00
Gwendal Roué a71c1d6e80 Removed unnecessary TODO warning 2025-03-28 08:15:54 +01:00
Gwendal Roué 52b7b7bd26 Merge branch 'development' 2025-03-22 14:57:59 +01:00
Gwendal Roué 9a9d2e9993 v7.4.0 2025-03-22 14:16:44 +01:00
Gwendal Roué 1ce8e38bea Merge pull request #1747 from groue/dev/issue-1746
Transaction observers are not impacted by Task Cancellation
2025-03-22 13:43:07 +01:00
Gwendal Roué 67b34dc57c TransactionObserver can access the database, even if the transaction was completed in a cancelled task.
Fix https://github.com/groue/GRDB.swift/discussions/1746
2025-03-22 12:13:42 +01:00
Gwendal Roué 515bd78d28 Failing test for https://github.com/groue/GRDB.swift/discussions/1746 2025-03-22 12:12:12 +01:00
Gwendal Roué f2aa6b386f Improve the documentation for table recreation 2025-03-15 12:06:31 +01:00
Gwendal Roué 71e09a38d4 Document that migrations that rename foreign key columns should use immediate foreign key checks
Fix #1740
2025-03-15 12:06:14 +01:00
Gwendal Roué d800a79d5d Merge pull request #1745 from groue/dev/multi-argument-max
Add the MIN and MAX multi-argument SQL functions to the query interface
2025-03-15 11:32:20 +01:00
Gwendal Roué 4065ff58e8 Add the min and max multi-argument functions 2025-03-15 10:02:24 +01:00
Gwendal Roué 18eab53f74 Document aggregate functions 2025-03-15 09:51:32 +01:00
Gwendal Roué 6eba24d169 Merge branch 'development' 2025-02-23 19:53:59 +01:00
Gwendal Roué bd3ac9ef75 v7.3.0 2025-02-23 18:44:22 +01:00
Gwendal Roué 392137c357 XCTestExpectation is Sendable starting Xcode 16.3 beta 2025-02-23 18:43:45 +01:00
Gwendal Roué b48a56ae03 Revert "Merge pull request #1732 from groue/dev/sending-closures"
This reverts commit bbd1eab402, reversing
changes made to 9b09c5342e.
2025-02-23 18:43:45 +01:00
Gwendal Roué bbd1eab402 Merge pull request #1732 from groue/dev/sending-closures
Async database accesses no longer require Sendable closures.
2025-02-23 15:33:54 +01:00
Gwendal Roué 53c9d12d29 Async database access no longer require Sendable closures. 2025-02-23 15:16:36 +01:00
Gwendal Roué 9b09c5342e Merge pull request #1731 from groue/dev/virtual-table-options
Support for temporary virtual tables
2025-02-23 13:59:48 +01:00
Gwendal Roué aed22fe0bc Support for temporary virtual tables. 2025-02-23 13:45:46 +01:00
Gwendal Roué eec220b652 Merge pull request #1730 from groue/dev/issue-1728
Undeprecate Date coding strategies based on DateFormatter
2025-02-23 11:13:02 +01:00
Gwendal Roué 79a782038e Undeprecate Date coding strategies based on DateFormatter
https://github.com/swiftlang/swift/issues/78635#issuecomment-2676324549
> DateFormatter is indeed thread safe and its conformance to Sendable is correct
2025-02-23 11:12:24 +01:00
Gwendal Roué 618e72d153 Merge pull request #1729 from groue/dev/issue-1728
Deprecate Date coding strategies based on DateFormatter
2025-02-22 14:29:08 +01:00
Gwendal Roué 824100990f Deprecate Date coding strategies based on DateFormatter
Fix #1728
2025-02-22 13:45:42 +01:00
Gwendal Roué c7205b172f Merge branch 'development' 2025-02-12 08:49:02 +01:00
Gwendal Roué 49d14e6b66 v7.2.0 2025-02-12 08:48:52 +01:00
Gwendal Roué 54ed7ec611 Merge pull request #1719 from groue/dev/selectID
Select ids with selectID()
2025-02-12 08:46:40 +01:00
Gwendal Roué 68e17351ff CI: iPhone 15 Pro simulator is no longer available 2025-02-12 08:31:34 +01:00
Gwendal Roué 494e697e94 Warn against selectID() when the ID type is an optional. 2025-02-12 08:25:27 +01:00
Gwendal Roué 87b236dfe0 selectID
This reverts 7ffc332327

At the time, selectID was replaced with selectPrimaryKey(as:) because:

> Since Optional is a database value like others, selectID would be a request of optionals for records with an optional ID type:
>
>     struct Player: Identifiable, MutablePersistableRecord {
>         var id: Int64?
>     }
>
>     Player.selectID() // QueryInterface<Int64?>
>
> This is not good, because primary keys are not null. And those requests would fetch impractical types such as [Int64?], Set<Int64?>, Int64??.

This problem is reintroduced, but we now recommend against optional ids in https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/recordrecommendedpractices. And record with optional ids can use selectPrimaryKey(as:).
2025-02-11 20:47:49 +01:00
Gwendal Roué ea6d8e0123 Merge branch 'development' 2025-02-05 15:34:18 +01:00
Gwendal Roué 073209f1dc v7.1.0 2025-02-05 15:34:09 +01:00
Gwendal Roué 430530f5f1 CHANGELOG 2025-02-05 14:08:28 +01:00
Gwendal Roué a716915280 Merge pull request #1717 from groue/dev/RxGRDB
Allow RxGRDB to compile without warning
2025-02-05 13:58:25 +01:00
Gwendal Roué ef36727d9a 🎵 Whatever Lola wants, Lola gets
Address https://github.com/RxSwiftCommunity/RxGRDB/issues/72

Based on https://github.com/swiftlang/swift-evolution/blob/main/proposals/0337-support-incremental-migration-to-concurrency-checking.md#preconcurrency-attribute-on-nominal-declarations

See also https://www.massicotte.org/preconcurrency#working-with-swift-5

"Whatever Lola wants, Lola gets" because the Swift language is a blind and cruel mistress.
2025-02-05 13:38:19 +01:00
Gwendal Roué 78b2796f46 CHANGELOG 2025-02-05 08:00:29 +01:00
Gwendal Roué 3535a42c53 Merge pull request #1716 from groue/dev/issue-1715
Fix: DatabaseQueue restores its read/write abilities when an async read-only database access is cancelled.
2025-02-04 20:51:58 +01:00
Gwendal Roué 5a4d9b5cb9 Let PRAGMA QUERY_ONLY statements run from a cancelled database access
Fix #1715
2025-02-04 19:35:39 +01:00
Gwendal Roué a64b09d121 Failing test for #1715 2025-02-04 19:35:39 +01:00
Gwendal Roué 287c4be82d Merge pull request #1713 from groue/dev/sqliteLibVersionNumber
Expose `sqlite3_libversion_number` as `Database.sqliteLibVersionNumber`
2025-02-01 12:59:42 +01:00
Gwendal Roué 32c9ba24ba Replace sqlite3_libversion_number() with Database.sqliteLibVersionNumber
and remove SQLite imports that are no longer necessary.
2025-02-01 12:19:11 +01:00
Gwendal Roué 0401d449bb Database.sqliteLibVersionNumber 2025-02-01 12:01:41 +01:00
Gwendal Roué 4de97e6903 Merge branch 'development' 2025-01-26 16:30:56 +01:00
Gwendal Roué 676636bae4 7.0.0 2025-01-26 16:30:06 +01:00
Gwendal Roué 8e7cbf098f Fix Realm integration 2025-01-26 16:29:51 +01:00
Gwendal Roué 7250d759fe Fix generatePerformanceReport.rb script 2025-01-26 16:29:51 +01:00
Gwendal Roué fe7b9955b1 Upgrade performance tests dependencies 2025-01-26 16:29:51 +01:00
Gwendal Roué 6df8e2bd34 Fix casing of swiftpackageindex.com urls 2025-01-26 15:31:12 +01:00
Gwendal Roué 81cd33b71c CHANGELOG 2025-01-26 15:26:01 +01:00
Gwendal Roué 2e2c0eaec1 Merge pull request #1699 from groue/dev/jsonb
Support for JSONB expressions
2025-01-26 15:22:25 +01:00
Gwendal Roué ed17710694 Add tests of JSON_GROUP_ARRAY output, from both JSON and JSONB input 2025-01-26 14:44:27 +01:00
Gwendal Roué 0f68d8b684 JSON_VALID options 2025-01-26 14:21:35 +01:00
Gwendal Roué 367f8f7e37 Add missing imports for C SQLite functions 2025-01-26 14:21:35 +01:00
Gwendal Roué 831e79ee82 JSONB functions and tests 2025-01-26 14:21:35 +01:00
Gwendal Roué 8b3f9c0936 Prefer JSONB when building JSON 2025-01-26 14:21:35 +01:00
Gwendal Roué 950db13d46 Declare JSONB functions behavior 2025-01-26 14:21:35 +01:00
Gwendal Roué 0e664cf22e Not only pluralization can be a problem 2025-01-23 08:10:36 +01:00
Gwendal Roué 1e5602ca9d Merge pull request #1703 from groue/dev/inflections-fixes
Fix pluralization of Bias, Focus, Gas, and Lens
2025-01-22 21:29:31 +01:00
Gwendal Roué 8147811ab4 Mention Bias, Focus, Gas, and Lens in the GRDB 7 Migration Guide 2025-01-22 21:02:09 +01:00
Gwendal Roué 4c9b0eb90e Fix failing tests for inflections 2025-01-22 20:41:55 +01:00
Gwendal Roué b63d75da21 Failing tests for inflections
- bias/biases
- focus/focuses
- gas/gases
- lens/lenses
2025-01-22 20:41:39 +01:00
Gwendal Roué 5a3db29e21 Remove link to X account 2025-01-21 13:14:03 +01:00
Gwendal Roué fa0985eb01 Documentation: add @retroactive to Tagged extensions 2025-01-21 08:03:46 +01:00
Gwendal Roué 495e76bb1a Fix performance tests for SQLite.swift 2025-01-20 08:51:01 +01:00
Gwendal Roué bbf39353b5 Merge branch 'development' 2025-01-19 18:20:47 +01:00
Gwendal Roué 442b8b0589 7.0.0-beta.7 2025-01-19 17:30:17 +01:00
Gwendal Roué 2c85bc2cfc CHANGELOG 2025-01-19 16:57:34 +01:00
Gwendal Roué 3f56bc8199 Merge pull request #1700 from groue/dev/all-columns-excluding
Select all columns from a table, but a few ones
2025-01-19 16:50:48 +01:00
Gwendal Roué 37ea21eb96 Test AllColumnsExcluding and Table 2025-01-19 16:26:59 +01:00
Gwendal Roué 96c9eb5699 Enhance documentation of generated columns 2025-01-19 16:26:59 +01:00
Gwendal Roué 33103bb373 AllColumnsExcluding tests 2025-01-19 16:26:59 +01:00
Gwendal Roué 6b23181337 Use .allColumns and .rowID instead of AllColumns() and Column.rowID 2025-01-19 16:26:59 +01:00
Gwendal Roué c5366f4a01 AllColumnsExcluding documentation 2025-01-19 16:26:59 +01:00
Gwendal Roué a642ac51aa AllColumnsExcluding 2025-01-19 16:26:59 +01:00
Gwendal Roué d03208b33a Remove unused code 2025-01-19 16:26:59 +01:00
Gwendal Roué a4132a00db Clarify code that aims at fixing #1357 2025-01-19 16:26:59 +01:00
Gwendal Roué 61c7fdf81b Github CI: use tvOS 18.1 2025-01-19 16:26:29 +01:00
Gwendal Roué ec40855466 Merge pull request #1697 from kevinlg/fix-typo-in-docs
Fix typo in Readme.md
2025-01-09 07:23:43 +01:00
Kevin LE GOFF 1cca3686f5 Fix typo in Readme.md 2025-01-09 00:01:48 +02:00
Gwendal Roué 1e354ba79c Delete the rationale for Sendable records
... because the reality is that I just don't know how to relax this requirement.

See:

- https://www.youtube.com/watch?v=JmrnE7HUaDE
- https://forums.swift.org/t/swiftserverconf-feedback-on-leveraging-structured-concurrency-in-your-applications/75176
2025-01-02 17:07:55 +01:00
Gwendal Roué 0ea5471b56 Merge pull request #1696 from groue/dev/sqlite-3.47.2
Bump custom SQLite to 3.47.2
2025-01-02 12:57:50 +01:00
Gwendal Roué b2e808b9e4 Bump custom SQLite to 3.47.2 2025-01-02 12:28:14 +01:00
Gwendal Roué ac0c085a4a Merge pull request #1695 from JasonnnW3000/master
Update LICENSE, fix copyright license year
2025-01-01 12:25:30 +01:00
JasonnnW3000 9f9f0d37dd Update LICENSE, fix license year
Signed-off-by: JasonnnW3000 <sufssl04@gmail.com>
2024-12-31 23:58:47 -05:00
Gwendal Roué 898e7b6abe Merge pull request #1662 from compnerd/c
Core: import `ucrt` on Windows for `strcmp`
2024-11-13 16:11:39 +01:00
Gwendal Roué 0fb599812f Merge pull request #1661 from compnerd/extensions
Foundation: elide extensions on Windows to match Linux
2024-11-13 16:11:10 +01:00
Saleem Abdulrasool 77a4d17940 Core: import ucrt on Windows for strcmp
This uses the deprecated `strcmp` interface on Windows, which requires
the C library to be imported. Add the missing import to allow building
on Windows.
2024-11-12 11:12:27 -08:00
Saleem Abdulrasool c865a847fd Foundation: elide extensions on Windows to match Linux
Similar to Linux, elide some extensions on Windows. This is required to
build this module on Windows.
2024-11-12 11:10:07 -08:00
Gwendal Roué 832bc1aa74 Merge pull request #1660 from nylki/patch-1
docs: fixes typos "FST"->"FTS"
2024-11-11 11:50:35 +01:00
Tom Brewe 910ca2d0ce docs: fixes typos "FST"->"FTS" 2024-11-01 20:16:44 +01:00
Gwendal Roué 3ecb5c5455 Remove compiler warning in demo app 2024-10-22 08:18:38 +02:00
Gwendal Roué 84d25dfc9d Merge branch 'development' 2024-10-13 18:54:36 +02:00
Gwendal Roué 5664c5a829 7.0.0-beta.6 2024-10-13 18:54:10 +02:00
Gwendal Roué 334a63aa4a Update links to database schema documentation 2024-10-13 17:58:57 +02:00
Gwendal Roué 7e506f6488 Merge pull request #1654 from groue/dev/SQLite-3.46.1
Bump custom SQLite builds to 3.46.1
2024-10-13 17:52:53 +02:00
Gwendal Roué 5341f139e5 Update the Swift badge 2024-10-13 13:55:18 +02:00
Gwendal Roué 917b7ecc90 Bump custom SQLite to 3.46.1 2024-10-13 12:50:56 +02:00
Gwendal Roué c396fc20be Merge branch 'development' 2024-10-13 12:18:03 +02:00
Gwendal Roué 73083c4f1b 7.0.0-beta.5 2024-10-13 12:17:37 +02:00
Gwendal Roué 2c12f0a5e6 Merge pull request #1652 from groue/dev/schema-doc
Enhance the database schema documentation
2024-10-13 11:33:25 +02:00
Gwendal Roué c97f633022 More documentation of database schema methods 2024-10-13 11:28:14 +02:00
Gwendal Roué 4315030af5 More tests for object existence checks 2024-10-13 11:12:27 +02:00
Gwendal Roué 13b6c9d36b Split database schema documentation into several files, and restore the overview of database schema features
Fixes #1623
2024-10-13 10:54:13 +02:00
Gwendal Roué 8aaeb253d2 Merge pull request #1653 from Jnosh/schema-changes-readonly
Fix DatabaseMigrator.hasSchemaChanges failing for readonly connections
2024-10-13 10:49:53 +02:00
Janosch Hildebrand a741fb38f0 Fix DatabaseMigrator.hasSchemaChanges failing for readonly connections 2024-10-12 18:36:15 +02:00
Gwendal Roué 2c49a69f43 Raise a fatal error when the users filters a database view by primary key
Fixes #1648
2024-10-12 15:41:36 +02:00
Gwendal Roué d6b50b2c54 Merge branch 'development' 2024-10-12 14:04:05 +02:00
Gwendal Roué ad983f7971 7.0.0-beta.4 2024-10-12 14:03:56 +02:00
Gwendal Roué 7cd075bbdc Merge pull request #1651 from groue/dev/hasSchemaChanges
Allow applications to handle DatabaseMigrator schema changes.
2024-10-12 14:01:01 +02:00
Gwendal Roué 0aa8498620 DatabaseMigrator.hasSchemaChanges 2024-10-12 12:40:36 +02:00
Gwendal Roué bccf312af6 Merge branch 'development' 2024-10-06 18:49:34 +02:00
Gwendal Roué 5b4a86b5f7 7.0.0-beta.3 2024-10-06 18:42:03 +02:00
Gwendal Roué 68d12916e6 Fix Swiftlint warning 2024-10-06 18:36:43 +02:00
Gwendal Roué 6a4f454464 Merge pull request #1649 from bok-/master
Add `DatabaseValueConvertible` tip for JSON columns
2024-10-06 18:30:23 +02:00
Gwendal Roué a9fa2871aa Document the requirements 2024-10-06 18:19:11 +02:00
Rob Amos 8c5396898a Add DatabaseValueConvertible tip 2024-10-06 23:18:13 +11:00
Gwendal Roué dd14710c86 Fix typo 2024-10-06 13:55:29 +02:00
Gwendal Roué 97c0c72702 Merge pull request #1645 from philmitchell/coalesce
Add coalesce free function and Row method
2024-10-06 13:55:02 +02:00
Gwendal Roué a17d72e04c Make the top-level coalesce function work with collections of size zero and one. 2024-10-06 12:53:22 +02:00
Gwendal Roué 761b00f9bc Test Row.coalesce with collections of size zero and one. 2024-10-06 12:45:38 +02:00
Gwendal Roué ac3278a38b Test top-level function coalesce like other top-level functions 2024-10-06 12:42:33 +02:00
Gwendal Roué 06c3ab0d16 Test Row.coalesce on all variants of Row 2024-10-06 12:42:10 +02:00
Gwendal Roué f38619ada8 Restore alphabetical order of SQL functions 2024-10-06 12:42:10 +02:00
Gwendal Roué 8cac458efc Use "real" column names in examples.
Also, remove "essential".
2024-10-06 12:42:10 +02:00
Gwendal Roué a13c1bec29 Add coalesce in DocC 2024-10-06 12:19:49 +02:00
Gwendal Roué c6781f46d2 Prefer Collection over Array
This allows the user to call those methods with an Array, or any other collection at hand (including lazy ones)

This change makes `return coalesce(columns.lazy.map { $0.name })` iterate lazily. Before this commit, `map` was returning a non-lazy Array.
2024-10-06 12:19:49 +02:00
Gwendal Roué fd04831586 Merge pull request #1644 from tayloraswift/enable-linux-build
use #if directives to conditionally `@preconcurrency import `the `Dispatch` module to enable building the package on linux
2024-10-06 11:45:59 +02:00
Phil Mitchell d7754fa79c Add coalesce free function and Row method 2024-09-30 13:10:59 +10:00
Dianna 5f2185a118 use #if directives to conditionally @preconcurrency import the Dispatch module to enable building the package on linux 2024-09-29 21:44:34 +00:00
Gwendal Roué dc03b8a29e Update links to GRDB7 documentation 2024-09-29 20:29:51 +02:00
Gwendal Roué a0c1de55c4 Enhance PlayerListModelTests 2024-09-29 17:10:05 +02:00
Gwendal Roué d1f5a37520 Enhance the demo app tests
Based on https://forums.swift.org/t/testing-closure-based-asynchronous-apis/73705/36
2024-09-29 15:46:18 +02:00
Gwendal Roué ed5f8c11ab 7.0.0-beta.2 2024-09-29 15:17:41 +02:00
Gwendal Roué afda0d1e7c Merge pull request #1643 from finestructure/patch-1
Update .spi.yml
2024-09-29 15:12:38 +02:00
Sven A. Schmidt 18c7f51a4e Update .spi.yml 2024-09-29 15:10:03 +02:00
Gwendal Roué a6b15684c3 Improve migration notes for ValueObservation 2024-09-29 13:27:07 +02:00
Gwendal Roué 9bdde6bc6f More links in GRDBDemo README 2024-09-29 13:04:36 +02:00
Gwendal Roué db9ef1bb27 Emphasize Swift concurrency recommendations in the migration guide 2024-09-29 12:12:57 +02:00
Gwendal Roué 2958020c69 De-emphasize the Record class in the migration guide 2024-09-29 12:10:26 +02:00
Gwendal Roué 895436a2a1 Mention companion libraries in the GRDB 7 migration guide 2024-09-29 12:07:34 +02:00
Gwendal Roué 47a7ddf08a Merge branch 'development' 2024-09-29 10:24:10 +02:00
Gwendal Roué ecd4658a88 Update the release process 2024-09-29 10:23:39 +02:00
Gwendal Roué ec031dcf4f v7.0.0-beta 2024-09-29 10:19:57 +02:00
Gwendal Roué 006252cf14 Swift 6 version in podsepc 2024-09-29 10:19:45 +02:00
Gwendal Roué 5a9b592c38 Merge pull request #1642 from groue/GRDB7
GRDB 7
2024-09-29 09:27:13 +02:00
Gwendal Roué e0eca340e4 Demo app cleanup 2024-09-29 08:36:56 +02:00
Gwendal Roué 4132d02d14 Merge pull request #1641 from groue/dev/GRDB7-Swift-6-language-mode
GRDB7: Enable the Swift 6 language mode
2024-09-29 08:06:28 +02:00
Gwendal Roué 625c52913b Remove the documentation paragraph about the Xcode bug with CSQLite
It is not informative enough. Maybe Xcode has fixed the bug. And maybe #1600 helps.
2024-09-29 07:19:52 +02:00
Gwendal Roué c8ec149224 CHANGELOG 2024-09-29 07:16:01 +02:00
Gwendal Roué 9302925081 Fix Swiftlint warnings 2024-09-28 18:02:05 +02:00
Gwendal Roué 030121e45f Swift 6 language mode on GRDB targets 2024-09-28 17:59:45 +02:00
Gwendal Roué 47fa6ef77a Extract GRDBTests.xcconfig 2024-09-28 17:59:45 +02:00
Gwendal Roué f675489243 CHANGELOG 2024-09-28 17:48:14 +02:00
Gwendal Roué bb712a612e Rewrite the "Choosing between Synchronous and Asynchronous Database Accesses" section 2024-09-28 17:45:59 +02:00
Gwendal Roué 3c586cb2fc Update link to the migration guide 2024-09-28 17:16:13 +02:00
Gwendal Roué d68e55c184 Cleanup demo app, and add tests for the view model 2024-09-28 15:54:23 +02:00
Gwendal Roué 073682c4f0 Remove the experimental flag on stabilized apis 2024-09-28 14:41:12 +02:00
Gwendal Roué 88500570a8 TODO 2024-09-28 14:35:41 +02:00
Gwendal Roué dc2070981d Merge pull request #1639 from groue/dev/GRDB7-sendable-async-sequence
GRDB 7: ValueObservation async sequence is Sendable
2024-09-28 14:29:28 +02:00
Gwendal Roué 6b2ccebad3 AsyncValueObservation is Sendable
A Sendable async sequences plays well with apple/swift-async-algorithms
2024-09-28 13:36:40 +02:00
Gwendal Roué c404e2d012 Merge pull request #1640 from groue/dev/GRDB7-hide-record-class
GRDB 7: Stop mentioning the Record base class in the documentation
2024-09-28 13:36:11 +02:00
Gwendal Roué 20818ee819 Remove the Record class from the documentation 2024-09-28 13:35:11 +02:00
Gwendal Roué 1cd78064c9 Merge pull request #1638 from groue/dev/GRDB7-migration-guide
GRDB 7: Migration Guide
2024-09-28 11:18:06 +02:00
Gwendal Roué ebdd1f1fdf Fix SPM CI tests 2024-09-28 09:50:34 +02:00
Gwendal Roué b389547713 Code dump for Swift6Migration test app 2024-09-27 18:02:59 +02:00
Gwendal Roué d003601d15 TODO 2024-09-27 18:00:07 +02:00
Gwendal Roué 8dbce53ec5 SwiftConcurrency.md 2024-09-27 17:34:32 +02:00
Gwendal Roué 9b6a3b9ec6 SwiftConcurrency.md
ChatGPT remarks:

# Overview Section:

The phrase "GRDB optimally schedules those database access closures, in the best interest of the application" is vague and could benefit from more detail on how the scheduling optimizes for concurrency.

# Concurrency Warnings in Swift 6:

"We will address these issues, and provide general guidance in the following sections." This sentence suggests that detailed solutions will be discussed, but it is unclear how each error is related to the following section titles. A more specific reference to which section will cover what would help orient the reader.

# Non-Sendable Record Types Section:

The FAQ format is useful, but it could overwhelm the reader. Breaking up the FAQ into subsections with more concise answers or reordering it based on common issues could improve readability.

# Shorthand Closure Notation Section:

The explanation of why shorthand notation leads to warnings is somewhat technical. It may be helpful to clarify what "may introduce data races" means in practical terms for less experienced developers.

# Choosing Between Synchronous and Asynchronous Database Access:

The section recommends using asynchronous access but leaves open-ended guidance like "this may slow down other tasks". Adding a more concrete explanation of how to balance performance between synchronous and asynchronous approaches would benefit developers.

# General Clarification on Sendable:

Throughout the document, Sendable is mentioned frequently, but less-experienced developers might not fully understand why it matters. A short section or footnote on what Sendable is and why it’s important in Swift 6 concurrency might help provide context for readers unfamiliar with the concept.
2024-09-26 13:27:13 +02:00
Gwendal Roué cb001cbaa3 SwiftConcurrency.md 2024-09-26 09:43:19 +02:00
Gwendal Roué 521d7847a4 More GRDB 7 migration and Swift concurrency documentation 2024-09-25 20:05:57 +02:00
Gwendal Roué bc98fdb359 SwiftConcurrency.md 2024-09-24 08:58:07 +02:00
Gwendal Roué ebe313c3b1 GRDB7MigrationGuide.md 2024-09-23 18:43:33 +02:00
Gwendal Roué e7e5956698 SwiftConcurrency.md 2024-09-23 18:42:45 +02:00
Gwendal Roué 5d44fc7e52 TODO 2024-09-23 18:42:08 +02:00
Gwendal Roué aa7c528ef3 Swift Concurrency Guide: GlobalActorIsolatedTypesUsability 2024-09-22 13:50:10 +02:00
Gwendal Roué 7f1a3fd813 Swift Concurrency Guide WIP 2024-09-22 13:50:10 +02:00
Gwendal Roué 48cb4cfb16 GRDB 7 migration guide 2024-09-22 13:50:10 +02:00
Gwendal Roué 2800530b12 Improve documentation of PersistenceContainer subscript getter 2024-09-22 12:51:40 +02:00
Gwendal Roué ef2251e57c Test access to SQLite C functions 2024-09-22 12:51:23 +02:00
Gwendal Roué f7d85b00d1 Fixits 2024-09-22 12:50:58 +02:00
Gwendal Roué 972aa33f68 Avoid optionals in JSON Data to String conversions 2024-09-22 10:10:01 +02:00
Gwendal Roué 89aa353974 StrictConcurrency: databaseDecodingUserInfo and databaseEncodingUserInfo must be declared as a computed property 2024-09-22 10:10:01 +02:00
Gwendal Roué cc0b401f0a StrictConcurrency: FetchableRecord.databaseDecodingUserInfo must be declared as a computed property 2024-09-22 10:10:01 +02:00
Gwendal Roué 1be676280f TODO 2024-09-22 10:10:01 +02:00
Gwendal Roué 938ad7a086 Prefer Data over NSData 2024-09-22 09:29:59 +02:00
Gwendal Roué 0af8415a22 GRDBDemo cleanup 2024-09-22 00:19:05 +02:00
Gwendal Roué 4463374ff3 Merge pull request #1636 from groue/dev/GRDB7-demo
GRDB 7: New demo app
2024-09-21 23:58:13 +02:00
Gwendal Roué be3bce9acc Fix GRDBTests target 2024-09-21 23:15:01 +02:00
Gwendal Roué d985314267 Replace the demo apps 2024-09-21 22:04:29 +02:00
Gwendal Roué 9ca2f6e6cc New manual install test app 2024-09-21 22:04:01 +02:00
Gwendal Roué 6c83b1c52b README 2024-09-21 21:29:54 +02:00
Gwendal Roué 22d43b67ba New demo app 2024-09-21 21:18:47 +02:00
Gwendal Roué e4e3da3a8e TODO 2024-09-21 17:22:33 +02:00
Gwendal Roué 173f363bdc TableRecord.databaseSelection should be declared as a computed property 2024-09-21 17:21:59 +02:00
Gwendal Roué c149d11703 Merge pull request #1635 from groue/dev/GRDB7-any-database
GRDB 7: prefer any DatabaseReader and DatabaseWriter
2024-09-21 17:14:49 +02:00
Gwendal Roué 900180dafd [BREAKING] Prefer any DatabaseReader and DatabaseWriter 2024-09-21 16:50:03 +02:00
Gwendal Roué 23842d8a97 Merge pull request #1634 from groue/dev/GRDB7-bump-requirements
GRDB 7: Bump requirements (again)
2024-09-21 15:19:48 +02:00
Gwendal Roué 46e15616a7 [BREAKING] macOS 10.15+ 2024-09-21 14:28:24 +02:00
Gwendal Roué e4a4735494 [BREAKING] tvOS 13+ 2024-09-21 13:57:35 +02:00
Gwendal Roué 8c40592955 [BREAKING] iOS 13+ 2024-09-21 13:57:23 +02:00
Gwendal Roué f794d98e49 Merge pull request #1633 from groue/dev/GRDB7-ValueObservation-async-sequence
GRDB 7: MainActor ValueObservation scheduling
2024-09-21 13:12:08 +02:00
Gwendal Roué 1649636695 TODO 2024-09-21 12:31:38 +02:00
Gwendal Roué 58a2e04736 Mark ValueObservation starting methods as @preconcurrency
I guess the compiler will learn to stop emitting warnings eventually.

https://mjtsai.com/blog/2024/09/20/unwanted-swift-concurrency-checking/
2024-09-21 12:30:38 +02:00
Gwendal Roué bdb7d84086 [BREAKING] ValueObservation MainActor scheduling
Breaking because before iOS 13, macOS 10.15, tvOS 13, there is no longer any default scheduler
2024-09-21 12:30:38 +02:00
Gwendal Roué e1a384009a [BREAKING] Async sequences built from ValueObservation schedule values and errors on the cooperative thread pool by default. 2024-09-21 12:19:39 +02:00
Gwendal Roué dd28d9734b Fix GlobalActorIsolatedTypesUsability 2024-09-21 12:15:47 +02:00
Gwendal Roué e7a95cf0f7 Enable GlobalActorIsolatedTypesUsability 2024-09-21 10:39:44 +02:00
Gwendal Roué 7707bbd1e9 Fix Swiftlint warning 2024-09-21 10:39:36 +02:00
Gwendal Roué 2845570929 Fix DocC warnings 2024-09-15 14:27:19 +02:00
Gwendal Roué 9e9bee8d3a TODO 2024-09-15 14:01:19 +02:00
Gwendal Roué e307e9c1da Improve CaseInsensitiveIdentifier documentation 2024-09-15 12:19:19 +02:00
Gwendal Roué 157dbefdc3 TODO 2024-09-15 12:18:56 +02:00
Gwendal Roué d11f5099b4 Record is not Sendable 2024-09-15 12:18:02 +02:00
Gwendal Roué 3728628e5f Association is Sendable 2024-09-15 12:10:13 +02:00
Gwendal Roué 29f8aa38fb Fix compiler warnings in ValueObservation observers 2024-09-15 12:10:10 +02:00
Gwendal Roué d489178d04 Improve ValueObservation tests debuggability 2024-09-15 11:33:25 +02:00
Gwendal Roué 473b06eac5 Fix compiler warnings about SQLQualifiedRelation 2024-09-15 11:32:06 +02:00
Gwendal Roué e68a2075fa Fix compiler warnings when building the request for an association 2024-09-15 11:25:23 +02:00
Gwendal Roué 630daaf48a Fix compiler warnings about StatementArgumentsSink for literal arguments 2024-09-15 11:17:01 +02:00
Gwendal Roué 461db6c4ac Feed database promises with Sendable values 2024-09-15 11:12:39 +02:00
Gwendal Roué d3e62dc5c9 Fix compiler warnings about default Inflections 2024-09-14 17:24:47 +02:00
Gwendal Roué 01308c6044 Fix compiler warnings about NSCache concurrency 2024-09-14 17:24:30 +02:00
Gwendal Roué b079136cd5 Fix compiler warnings about ISO8601DateFormatter concurrency 2024-09-14 17:24:16 +02:00
Gwendal Roué 9501d1f936 Fix compiler warnings about SchedulingWatchdog concurrency 2024-09-14 17:24:00 +02:00
Gwendal Roué c2219075cf TODO 2024-09-14 13:49:30 +02:00
Gwendal Roué 4f1587a307 Merge pull request #1618 from groue/dev/GRDB7-Sendable-database-access
GRDB 7: Sendable database accesses
2024-09-14 13:47:53 +02:00
Gwendal Roué 945f398c92 Fix Sendable warnings in tests 2024-09-08 18:00:37 +02:00
Gwendal Roué 4b5ec4f6ca Enable InferSendableFromCaptures upcoming feature 2024-09-08 17:48:50 +02:00
Gwendal Roué 2f240fd764 [SENDING REGRET] Async database access methods return Sendable results
We can not tell the compiler that we can safely return `sending` results, because fetched values are in the same region as the `db` argument, according to SE-0414 (https://github.com/swiftlang/swift-evolution/blob/main/proposals/0414-region-based-isolation.md#rules-for-merging-isolation-regions).

```
class NotSendable { init() { } }
func fetchNotSendable(_ db: Database) -> NotSendable { fatalError() }

func notOK<T>(_ make: (Database) -> sending T) { }
func ok<T>(_ make: () -> sending T) { }

func usage() {
    ok { NotSendable() }

    // Returning a task-isolated 'NotSendable' value as a 'sending' result
    // risks causing data races.
    notOK { db in fetchNotSendable(db) }
}
```

Various attempts at modifying all fetching methods so that they have a `sending` return value have failed.
2024-09-08 16:55:25 +02:00
Gwendal Roué ec5b7d96e2 SharedValueObservation is Sendable 2024-09-08 16:17:51 +02:00
Gwendal Roué 5f384a4b22 ValueObservation is Sendable 2024-09-08 16:17:51 +02:00
Gwendal Roué 28faa97a37 Database.afterNextTransaction callbacks are Sendable 2024-09-08 16:17:45 +02:00
Gwendal Roué 5585e47c33 Database publishers require Sendable closures 2024-09-08 16:17:17 +02:00
Gwendal Roué 62d96ec544 [SENDING REGRET] Async database accesses require Sendable closures
We should be able to use sending closures instead, but DispatchQueue.async does not accept sending closures yet.
2024-09-08 16:16:40 +02:00
Gwendal Roué e35fb79308 DatabaseRegionObservation callbacks are Sendable 2024-09-08 16:12:33 +02:00
Gwendal Roué b3ac63b0cd [SENDING REGRET] DatabaseMigrator.asyncMigrate requires a Sendable closure
We should be able to use a sending closure instead, but DispatchQueue.async does not accept sending closures yet.
2024-09-08 16:09:40 +02:00
Gwendal Roué c122872734 [SENDING REGRET] SerializedDatabase.async requires a Sendable closure
We should be able to use a sending closure instead, but DispatchQueue.async does not accept sending closures yet.
2024-09-08 16:09:31 +02:00
Gwendal Roué 6371dc05d5 OnDemandFuture closure is Sendable
It can be called at any time, when the publisher is subscribed.
2024-09-08 16:09:19 +02:00
Gwendal Roué 55560ccd90 [SENDING REGRET] Pool async methods require Sendable closures
We should be able to use sending closures instead, but DispatchQueue.async does not accept sending closures yet.
2024-09-08 16:09:19 +02:00
Gwendal Roué 0b6ac870e2 [SENDING REGRET] ValueObservationScheduler requires Sendable closures
We should be able to use sending closures instead, but DispatchQueue.async does not accept sending closures yet.
2024-09-08 16:09:10 +02:00
Gwendal Roué a7a9c75185 Place @escaping before @Sendable 2024-09-08 13:41:13 +02:00
Gwendal Roué 7084c95cbd TODO 2024-09-08 13:39:38 +02:00
Gwendal Roué ea4d208037 Rename ReadWriteBox to ReadWriteLock 2024-09-08 13:33:07 +02:00
Gwendal Roué 8409768676 TODO 2024-09-08 13:15:06 +02:00
Gwendal Roué 24576c944e Merge pull request #1617 from groue/dev/GRDB7-collection-over-sequence
GRDB 7: Prefer Collection over Sequence for `filter(keys:)` and related APIs
2024-09-08 13:11:42 +02:00
Gwendal Roué 6a29d6c081 [BREAKING] Prefer Collection over Sequence for filter(keys:) and derived APIs
We were frequently turning those sequences into an Array in order to check their emptiness, and generally were not sure we'd iterate a sequence only once.

Also use `some Sequence` and `some Collection` whenever possible.
2024-09-08 12:52:27 +02:00
Gwendal Roué 110d9312db Exclude products folder from GRDBTests target
Otherwise, we eventually have an error "multiple resources named 'PrivacyInfo.xcprivacy' in target 'GRDBTests'"
2024-09-08 11:41:05 +02:00
Gwendal Roué 0e6ffeb2d5 Merge branch 'master' into GRDB7 2024-09-08 11:37:48 +02:00
Gwendal Roué 2cf6c756e1 Merge branch 'development' 2024-09-07 14:20:48 +02:00
Gwendal Roué d56223cba1 v6.29.3 2024-09-07 12:59:25 +02:00
Gwendal Roué bc4fd8ff58 Merge pull request #1613 from groue/dev/fix-1612
Avoid SQLite misuse when releasing memory on a closed database connection
2024-09-07 12:56:16 +02:00
Gwendal Roué 9357198e1b TODO 2024-09-05 18:42:11 +02:00
Gwendal Roué cdb181d9ca Don't invoke sqlite3_db_release_memory on closed database connections 2024-09-04 09:21:30 +02:00
Gwendal Roué a02601ceae Merge pull request #1610 from groue/dev/GRDB7-cancellable-database-access
GRDB 7: Async database accesses honor Task cancellation
2024-09-01 16:30:04 +02:00
Gwendal Roué 71f5554962 Test cancellation handling from AnyDatabaseReader and AnyDatabaseWriter 2024-09-01 15:35:37 +02:00
Gwendal Roué 5b4b8a9065 Async database accesses check for cancellation before returning 2024-09-01 15:35:37 +02:00
Gwendal Roué cb1bd83777 Document that async methods can throw CancellationError 2024-09-01 15:35:37 +02:00
Gwendal Roué d6b91eec85 [BREAKING] DatabaseReader async methods support Task cancellation 2024-09-01 15:35:37 +02:00
Gwendal Roué fa54b74eba [BREAKING] DatabaseWriter async methods support Task cancellation 2024-09-01 15:35:37 +02:00
Gwendal Roué 5ecf9f67fb Vendor AsyncSemaphore
Semaphores allow tests to precisely schedule ordering of async jobs
2024-09-01 15:24:39 +02:00
Gwendal Roué 40140afb8c SerializedDatabase support for async db access with support for Task cancellation 2024-09-01 15:24:39 +02:00
Gwendal Roué b85121d456 Database support for cancellation 2024-08-31 12:24:19 +02:00
Gwendal Roué e9d0d381f6 Fix concurrency warning with DispatchQueue.mainKey 2024-08-31 10:48:51 +02:00
Gwendal Roué bdccd110a7 Merge pull request #1607 from groue/dev/GRDB7-Sendable
GRDB 7: Add missing Sendable conformances
2024-08-31 10:45:19 +02:00
Gwendal Roué b1424d16d5 [BREAKING] PersistenceContainer is Sendable 2024-08-31 10:08:44 +02:00
Gwendal Roué c08b1fa7d5 ValueObservationScheduler is Sendable 2024-08-31 09:58:15 +02:00
Gwendal Roué 849bba2820 Refactor ValueReducer for Swift concurrency
The fetching facet of a ValueReducer is Sendable.
2024-08-27 08:31:28 +02:00
Gwendal Roué aac8720bc7 DatabaseRegionObservation is Sendable 2024-08-27 08:05:26 +02:00
Gwendal Roué c56b52980a DatabaseCancellable is Sendable 2024-08-27 08:05:26 +02:00
Gwendal Roué 4222854f8b DatabaseRegionConvertible is Sendable 2024-08-27 08:05:26 +02:00
Gwendal Roué 47aa1f58a7 TODO 2024-08-26 08:36:46 +02:00
Gwendal Roué cc5798cf1e WALSnapshotTransaction is Sendable 2024-08-26 08:27:34 +02:00
Gwendal Roué aff662c101 SQL is Sendable 2024-08-25 18:06:29 +02:00
Gwendal Roué 30569aba27 OrderedDictionary is conditionally Sendable 2024-08-25 18:06:29 +02:00
Gwendal Roué 56e2ab85b7 SQLAssociationCondition is Sendable 2024-08-25 18:06:29 +02:00
Gwendal Roué 0fdd910b08 ⚠️ Make TableAlias Sendable even if it is not yet. 2024-08-25 18:06:29 +02:00
Gwendal Roué 1036371dff DatabasePromise is Sendable 2024-08-25 18:06:29 +02:00
Gwendal Roué b0c5725075 OnDemandFuture fulfill is Sendable 2024-08-25 17:34:54 +02:00
Gwendal Roué b587afba0e Pool is Sendable 2024-08-25 17:28:02 +02:00
Gwendal Roué e93e4c5a31 ReadWriteBox is Sendable 2024-08-25 17:21:19 +02:00
Gwendal Roué 5333dbeff1 LogErrorFunction is Sendable 2024-08-25 16:26:38 +02:00
Gwendal Roué 7aff0b97c7 RowAdapter is Sendable 2024-08-25 16:26:38 +02:00
Gwendal Roué 961f6c4176 FilterCursor can't be made Sendable 2024-08-25 16:26:38 +02:00
Gwendal Roué 55cdb4e9a9 DatabaseMigrator is Sendable 2024-08-25 16:26:38 +02:00
Gwendal Roué c1f59dfa2a [BREAKING] DatabaseCollation is no longer Hashable 2024-08-25 15:42:06 +02:00
Gwendal Roué eedd165e5b DatabaseCollation is Identifiable 2024-08-25 15:42:06 +02:00
Gwendal Roué 405312f52e DatabaseCollation is Sendable 2024-08-25 15:42:06 +02:00
Gwendal Roué a5806a0020 [BREAKING] DatabaseFunction is no longer Hashable 2024-08-25 15:42:06 +02:00
Gwendal Roué 300e5fec6b DatabaseFunction is Identifiable 2024-08-25 15:42:06 +02:00
Gwendal Roué b752229c37 DatabaseFunction is Sendable 2024-08-25 15:42:06 +02:00
Gwendal Roué 876a0870ee Coding strategies are Sendable 2024-08-25 15:14:43 +02:00
Gwendal Roué 8e860e671b Configuration is Sendable 2024-08-25 15:07:53 +02:00
Gwendal Roué 0457a6262e TransactionClock is Sendable 2024-08-25 14:56:40 +02:00
Gwendal Roué ad74526f6a BusyCallback and BusyMode are Sendable 2024-08-25 14:50:42 +02:00
Gwendal Roué a7fe896272 Merge pull request #1606 from groue/dev/GRDB7-strategies
GRDB 7: coding strategies depend on the column
2024-08-25 14:47:05 +02:00
Gwendal Roué 7747211691 [BREAKING] databaseDateDecodingStrategy depends on the column 2024-08-25 14:06:57 +02:00
Gwendal Roué 95ca9f5bf3 [BREAKING] databaseDataDecodingStrategy depends on the column 2024-08-25 14:06:50 +02:00
Gwendal Roué bcd6e03d7a [BREAKING] databaseUUIDEncodingStrategy depends on the column 2024-08-25 14:06:44 +02:00
Gwendal Roué 7a8a9a9363 [BREAKING] databaseDateEncodingStrategy depends on the column 2024-08-25 14:06:35 +02:00
Gwendal Roué 1fe4df9438 [BREAKING] databaseDataEncodingStrategy depends on the column 2024-08-25 14:00:53 +02:00
Gwendal Roué c4507c5a00 .editorconfig 2024-08-25 13:51:11 +02:00
Gwendal Roué 5025ecc314 Merge pull request #1605 from groue/dev/GRDB7-DatabaseCursor-primary-associated-type
GRDB 7: DatabaseCursor has a primary associated type
2024-08-25 13:40:41 +02:00
Gwendal Roué b2286aaaab DatabaseCursor has a primary associated type 2024-08-25 13:08:46 +02:00
Gwendal Roué 490b4e5bfe Merge pull request #1604 from groue/dev/GRDB7-Mutex
GRDB 7: Move closer to SE-0433 Mutex
2024-08-25 12:59:08 +02:00
Gwendal Roué e72a37d7d5 Rename LockedBox to Mutex 2024-08-25 12:40:28 +02:00
Gwendal Roué 5af0bc69e4 Merge pull request #1603 from groue/dev/GRDB7-remove-DatabaseFuture
GRDB 7: Remove DatabasePool.concurrentRead
2024-08-25 11:59:29 +02:00
Gwendal Roué 1de32c267b [BREAKING] Remove DatabaseFuture and concurrentRead
That's one less DispatchSemaphore. We don't need this method anymore.
2024-08-25 11:07:05 +02:00
Gwendal Roué 1a0403af6d Merge pull request #1602 from groue/dev/GRDB7-remove-default-transaction-kind
GRDB 7: Perform all writes with immediate transactions by default
2024-08-25 11:03:25 +02:00
Gwendal Roué 1c368ed18d Skip flaky test with SQLCipher 3 2024-08-25 10:39:38 +02:00
Gwendal Roué d96dc2d328 Aim at debugging failing CI test 2024-08-25 08:47:58 +02:00
Gwendal Roué 451a9eb493 [BREAKING] Remove Configuration.defaultTransactionKind
GRDB now defaults read-only transactions to DEFERRED, and write transactions to IMMEDIATE. See https://github.com/groue/GRDB.swift/issues/1483 for some context.
2024-08-25 08:22:07 +02:00
Gwendal Roué ad10d881e8 Fix deprecation warning in Package.swift 2024-08-24 19:32:54 +02:00
Gwendal Roué 3245eb85b3 Merge pull request #1600 from groue/dev/GRDB7-stop-exporting-SQLite
GRDB 7: Rename the CSQLite module to GRDBSQLite, and stop exporting the C SQLite functions.
2024-08-24 19:31:41 +02:00
Gwendal Roué 9e1ff42249 [BREAKING] Rename CSQLite to GRDBSQLite
Fix #1528
2024-08-24 18:15:57 +02:00
Gwendal Roué 9cd1d849cc [BREAKING] Stop exporting SQLite 2024-08-24 17:25:35 +02:00
Gwendal Roué be708ee6f7 TODO 2024-08-24 17:21:20 +02:00
Gwendal Roué 867f824a69 Merge pull request #1599 from groue/dev/GRDB7-non-optional-fetch
GRDB 7: enhance ergonomics of record methods that insert/save/upsert and fetch
2024-08-24 17:20:48 +02:00
Gwendal Roué cd4e853b74 [BREAKING] insertAndFetch, saveAndFetch, and updateAndFetch no longer return optionals.
Those optionals were just an annoyance. Now, nil results are replaced with `RecordError.recordNotFound`. Such an error is only expected with the IGNORE conflict policy.
2024-08-24 17:02:49 +02:00
Gwendal Roué 81cf93f02a Bump iOS version on GitHub CI 2024-08-24 17:01:53 +02:00
Gwendal Roué 38e867c405 Bump minimum targets in Package.swift 2024-08-24 16:55:14 +02:00
Gwendal Roué 6157a40dad Fix DocC warnings 2024-08-24 16:34:35 +02:00
Gwendal Roué e2106167cc GRDB7 TODO 2024-08-24 16:22:57 +02:00
Gwendal Roué 31be1782c5 Makefile: document TOOLCHAIN 2024-08-24 16:22:45 +02:00
Gwendal Roué 4ecc1ec80d Merge pull request #1598 from groue/dev/GRDB7-requirements
GRDB 7: Bump requirements
2024-08-24 15:54:14 +02:00
Gwendal Roué 0240ab552c Fix compiler warnings 2024-08-24 15:45:38 +02:00
Gwendal Roué 6895164a20 CI: use Xcode 16.1 2024-08-24 15:45:38 +02:00
Gwendal Roué 79cb862478 [BREAKING] watchOS 7+
Rationale: https://github.com/groue/GRDB.swift/issues/1472#issuecomment-1960696836
2024-08-24 15:45:38 +02:00
Gwendal Roué 509cbb9881 [BREAKING] tvOS 12+ 2024-08-24 15:45:38 +02:00
Gwendal Roué 29eb04c39a [BREAKING] iOS 12+ 2024-08-24 15:45:38 +02:00
Gwendal Roué 8caf31296f [BREAKING] Xcode 16+, Swift 6+ 2024-08-24 15:43:09 +02:00
Gwendal Roué f4b4035704 Fix Swiftlint warnings 2024-08-24 14:39:44 +02:00
Gwendal Roué 57a4587b5b Merge branch 'development' 2024-08-24 14:30:20 +02:00
Gwendal Roué ae837a3a44 v6.29.2 2024-08-24 11:46:45 +02:00
Gwendal Roué c64bc11627 Remove ill-advised TODO
This would force users to force-unwrap their custom `ColumnType(rawValue: "WHATEVER")!`
2024-08-24 11:38:37 +02:00
Gwendal Roué de96d5f6f0 Merge pull request #1595 from groue/dev/string_h
Enhance imports for strcmp
2024-08-24 11:33:39 +02:00
Gwendal Roué d3d2a9c4f7 Stop testing error messages that depend on the SQLite version 2024-08-24 10:26:34 +02:00
Gwendal Roué f10c74c374 Merge pull request #1593 from mingchen/development
README.md: Fix sample code
2024-08-22 09:13:28 +02:00
Gwendal Roué fcfdab2f11 Import string_h for strcmp
Thanks to @karianneberg in https://github.com/groue/GRDB.swift/commit/344878cdb2e3af07f46954e3bc2b93541489bd82
2024-08-22 08:17:04 +02:00
Ming C. f441341543 README.md: Fix sample code 2024-08-17 11:43:05 -07:00
Gwendal Roué dd6b98ce04 Merge branch 'development' 2024-08-07 12:18:34 +02:00
Gwendal Roué 5b73581126 v6.29.1 2024-08-07 12:16:57 +02:00
Gwendal Roué 9a896650ff Merge pull request #1589 from noremac/development
Fix compilation issue with Xcode 16 beta 5 due to a missing import.
2024-08-07 12:11:38 +02:00
Cameron Pulsford 344878cdb2 Fix compilation issue with Xcode 16 beta 5 due to a missing import. 2024-08-06 19:46:09 -04:00
Gwendal Roué 20ffddd572 Update TODO.md 2024-07-31 12:51:26 +02:00
Gwendal Roué 4ddb6b89ce Merge pull request #1584 from SagarSDagdu/update-cocoapods-instructions
Update README to highlight deployment issue with CocoaPods
2024-07-30 17:34:26 +02:00
Sagar DagduandGwendal Roué 9da1a83cca Fix indentation for code blocks
Co-authored-by: Gwendal Roué <gr@pierlis.com>
2024-07-30 21:00:14 +05:30
Sagar Dagdu 8205f02672 Address code review comments 2024-07-30 20:54:24 +05:30
Sagar Dagdu 78377d5cc0 Update README to highlight deployment issue with CocoaPods 2024-07-30 20:21:26 +05:30
Gwendal Roué 04543755d8 Merge pull request #1579 from groue/dev/modernize-demo-apps
Modernise the demo apps
2024-07-21 11:25:36 +02:00
Gwendal Roué cdc0131369 Modernize demo apps:
iOS 17+
GRDBQuery 0.9.0
#Preview macro
2024-07-20 14:38:14 +02:00
Gwendal Roué 1cd6c7cbff Merge branch 'development' 2024-07-20 11:22:16 +02:00
Gwendal Roué bbbe0d899d v6.29.0 2024-07-20 11:17:13 +02:00
Gwendal Roué 9f16865ff1 Merge pull request #1575 from Jason-Abbott/development
Show trigger comments for expanded statement tracing
2024-07-17 18:21:56 +02:00
Jason Abbott 14d2b931a4 Also return untrimmed comments when tracing without visible values 2024-07-17 09:17:03 -06:00
Jason Abbott 802b4ca78a Correct suffix/prefix test 2024-07-16 16:57:57 -06:00
Jason Abbott 1c60e5ef42 Show trigger comments for expanded statement tracing 2024-07-16 16:51:50 -06:00
Gwendal Roué 9f41e56c32 Merge pull request #1574 from sroebert/feature/single-value-container-decoding
Support for single value decoding
2024-07-13 17:07:15 +02:00
Steven RoebertandGwendal Roué 0ae3f32f7f Added compiler checks for Swift 6 specific code
Co-authored-by: Gwendal Roué <gr@pierlis.com>
2024-07-13 12:53:00 +02:00
Steven Roebert c977cb8226 Implemented support for single value decoding in _RowDecoder 2024-07-13 11:48:02 +02:00
Gwendal Roué 78448cf8f4 Merge branch 'development' 2024-07-11 07:49:09 +02:00
Gwendal Roué 30de9853d6 v6.28.0 2024-07-11 07:48:54 +02:00
Gwendal Roué 7a1196263d CHANGELOG 2024-07-11 07:46:32 +02:00
Gwendal Roué 3043d7dca5 DatabaseUUIDEncodingStrategy is Sendable
Fix #1567
2024-07-11 07:46:23 +02:00
Gwendal Roué d2dd757d0c CHANGELOG 2024-07-11 07:44:30 +02:00
Gwendal Roué 764ad4bf72 Merge pull request #1570 from groue/dev/single-value-encoding
Support single-value encoding
2024-07-11 07:42:41 +02:00
Gwendal Roué e6d4223b14 EncodableRecord takes precedence over Encodable when a record is encoded with a SingleValueEncodingContainer. 2024-07-10 08:47:49 +02:00
Gwendal Roué ba3c938eb9 Fix failing test for #1565 2024-07-09 13:42:52 +02:00
Gwendal Roué 5999227c01 Failing test for #1565 2024-07-09 13:31:54 +02:00
Gwendal Roué 78545f2c8c Tests for #1541 2024-06-09 13:02:27 +02:00
Gwendal Roué 263a549c21 Test that a cancelled ValueObservation does not notify of changes that were enqueued before cancellation.
This is a test for #1550
2024-06-08 13:47:21 +02:00
Gwendal Roué 6689470457 Remove Double infinities from database dump tests
Some SQLite versions store or read +inf and -inf as 9.0e+999 and -9.0e+999, and this makes some tests fail.

Known failure: SQLCipher4, test_quote_value_formatting(), https://github.com/groue/GRDB.swift/actions/runs/9388768610/job/25854709627

I could not reproduce.
2024-06-06 07:50:02 +02:00
Gwendal Roué bbbd6bba90 Add Set methods union, formUnion, intersection and formIntersection that accept a cursor. 2024-06-05 19:38:16 +02:00
Gwendal Roué bb789e3dee QueryInterfaceRequest.deleteAndFetchIds 2024-06-05 18:42:36 +02:00
Gwendal Roué b312d4cf5a Add missing DocC links to cast(_:as:) 2024-06-05 18:36:24 +02:00
Gwendal Roué f335123c2b Update link to SQLite RETURNING caveats 2024-06-05 18:23:56 +02:00
Gwendal Roué 34d87c0e85 Merge pull request #1544 from JoeParker/fix-cte-doc-example
Fix error in CTE association documentation
2024-06-02 12:09:59 +02:00
Joe Parker 0f2e993790 Update example snippet in CommonTableExpressions.md 2024-05-10 17:19:01 +01:00
Gwendal Roué 1831017d64 TODO
Related issue: https://github.com/groue/GRDB.swift/issues/1539
2024-05-01 13:38:14 +02:00
Gwendal Roué 4b934fda75 Fix link 2024-04-21 17:47:03 +02:00
Gwendal Roué 53c40fd80f Fix Swiftlint warning 2024-04-21 17:45:58 +02:00
Gwendal Roué 639fa9168d Merge branch 'development' 2024-04-21 16:00:34 +02:00
Gwendal Roué 1c5017a108 v6.27.0 2024-04-21 15:18:13 +02:00
Gwendal Roué 9ca1f6644c CHANGELOG 2024-04-21 15:15:54 +02:00
Gwendal Roué 3f3cfa5381 Merge pull request #1534 from groue/dev/singleton-rewrite
Update the "Single-Row Tables" guide, with support for default values
2024-04-21 15:10:46 +02:00
Gwendal Roué bde61b26ab Rewrite SingleRowTables, accounting for nullable columns
This addresses https://github.com/groue/GRDB.swift/discussions/1526
2024-04-21 15:02:52 +02:00
Gwendal Roué 0a5bef4c0e SingletonUserDefaultsTest 2024-04-21 14:56:47 +02:00
Gwendal Roué 218774d39a CHANGELOG 2024-04-21 14:56:09 +02:00
Gwendal Roué a0a9cfca65 Merge pull request #1535 from groue/dev/doc-ValueObservation-scheduling
Improve the documentation about the scheduling of ValueObservation fetches
2024-04-21 14:53:09 +02:00
Gwendal Roué c8bb0a4799 Improve the documentation about the scheduling of ValueObservation fetches 2024-04-21 14:42:47 +02:00
Gwendal Roué f1ff7f2a2a Fix compiler warnings 2024-04-21 12:20:37 +02:00
Gwendal Roué 725cccccab CHANGELOG 2024-04-21 12:16:41 +02:00
Gwendal Roué 1525075cce Merge pull request #1533 from groue/dev/fix-1531
Fix a bug in Decodable support
2024-04-21 12:14:35 +02:00
Gwendal Roué 7110a1fab3 Fix failing tests for decodeNil()
Fix https://github.com/groue/GRDB.swift/issues/1531
2024-04-21 12:13:24 +02:00
Gwendal Roué de382d30b8 Test decodeNil
Two failing tests related to https://github.com/groue/GRDB.swift/issues/1531
2024-04-21 12:13:24 +02:00
Gwendal Roué 3521030e13 Test _RowDecoder.KeyedContainer.allKeys, contains(_:), and support some nested keyed containers 2024-04-21 12:13:24 +02:00
Gwendal Roué eeacf93772 Don't mention async sequences in the GRDBAsyncDemo introduction
Been there, done that: when one feeds a SwiftUI view from an async sequence, the view MUST display an initial empty state, until the Swift Concurrency runtime provides the initial value of the sequence. That's why the demo app uses a Combine publisher for feeding views with database value. This commit removes a misleading reference to async sequences.

Fix #1532
2024-04-20 12:40:38 +02:00
Gwendal Roué 000aaa8698 Add test that specifically addresses #1517 2024-03-29 13:21:12 +01:00
Gwendal Roué 77b85bed25 Merge branch 'development' 2024-03-23 14:06:22 +01:00
Gwendal Roué bb8323b91d v6.26.0 2024-03-23 14:06:05 +01:00
Gwendal Roué d804b5ed9c Bump performance dependencies 2024-03-23 14:06:05 +01:00
Gwendal Roué 2af60cb324 CHANGELOG 2024-03-23 11:46:44 +01:00
Gwendal Roué 0434567f30 Merge pull request #1515 from groue/dev/cast
Support for the CAST SQLite function
2024-03-23 11:42:56 +01:00
Gwendal Roué 155a16bef8 CHANGELOG 2024-03-23 10:52:28 +01:00
Gwendal Roué 2ad1f37d2b Documentation for cast function 2024-03-23 10:48:20 +01:00
Gwendal Roué 32642d566b Test cast function 2024-03-23 10:47:57 +01:00
Gwendal Roué 1f4d5ac61a Fix test ambiguity 2024-03-23 10:47:49 +01:00
Gwendal Roué 87fdd9a66f cast function 2024-03-23 10:47:19 +01:00
Gwendal Roué 79d82337b2 CAST expression 2024-03-23 10:47:13 +01:00
Gwendal Roué fab4638fc9 Database.StorageClass 2024-03-23 10:46:52 +01:00
Gwendal Roué a49fd85627 Regression tests for #1512 2024-03-21 14:25:12 +01:00
Gwendal Roué ac8c4aea63 Report correct error when decoding NULL into Date or Data
Fixes #1512
2024-03-21 14:25:12 +01:00
Gwendal Roué 5413dcfeeb Remove jsonErrorPosition unless GRDBCUSTOMSQLITE || GRDBCIPHER
For some reason, if #available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *) has stopped being able to skip the test (WTF?)
2024-03-19 12:15:47 +01:00
Gwendal Roué 4e0ab25106 Fix flaky tests due to Recorder incorrect critical section 2024-03-17 22:40:38 +01:00
Gwendal Roué c52db6095a Stop testing test_CocoaPodsLint
Because it does no longer work due to https://github.com/CocoaPods/CocoaPods/issues/11839
2024-03-17 22:15:08 +01:00
Gwendal Roué 1464940eeb Merge pull request #1511 from groue/dev/schema-dump
Database schema dump
2024-03-17 22:11:55 +01:00
Gwendal Roué f274e464cd CHANGELOG 2024-03-17 20:45:48 +01:00
Gwendal Roué c3e7736534 Dump schema 2024-03-17 20:45:31 +01:00
Gwendal Roué 9b95dd5be1 Merge pull request #1510 from groue/dev/trivial-sendable-conformances
Add Sendable conformances and unavailabilities
2024-03-17 20:45:01 +01:00
Gwendal Roué 77da5f4a30 CHANGELOG 2024-03-17 19:18:30 +01:00
Gwendal Roué 43ced9b2f0 Trivial Sendable conformances
Either added, either made explicitly unavailable.
2024-03-17 18:25:04 +01:00
Gwendal Roué 4ffad63f1b Fix Swift 5.10 warning on WALSnapshot 2024-03-17 17:55:25 +01:00
Gwendal Roué 62e7ea1ef2 CHANGELOG 2024-03-17 17:55:15 +01:00
Gwendal Roué 91492b849d Merge pull request #1508 from groue/dev/issue-1500
Fix ValueObservation mishandling of database schema modification
2024-03-17 17:53:28 +01:00
Gwendal Roué d54d0abc07 Fix WALSnapshotTransaction so that it clears its schema cache if needed 2024-03-17 16:13:35 +01:00
Gwendal Roué 3b096b38e7 Failing test for #1500 2024-03-17 16:13:35 +01:00
Gwendal Roué 9593297cf0 CHANGELOG 2024-03-17 14:54:07 +01:00
Gwendal Roué 8ac5591189 Merge pull request #1503 from simba909/master
Conform Database.ColumnType to Sendable
2024-03-17 14:51:44 +01:00
Simon Jarbrant 4232fa687d Conform Database.ColumnType to Sendable 2024-03-08 14:28:36 +01:00
Gwendal Roué bd9aea303d Merge branch 'development' 2024-02-25 16:32:30 +01:00
Gwendal Roué 5abc737bf0 v6.25.0 2024-02-25 16:31:11 +01:00
Gwendal Roué d4d14e3dd7 CHANGELOG 2024-02-25 16:28:06 +01:00
Gwendal Roué 660d2b1fe7 Merge pull request #1496 from danielepantaleone/development
Added privacy manifest file
2024-02-25 16:23:15 +01:00
Gwendal Roué bb44f48414 Add the PrivacyInfo.xcprivacy file to the GRDB target 2024-02-25 15:08:53 +01:00
Gwendal Roué bbe7d2f1ca Remove PrivacyInfo.xcprivacy from podspec
This technique has CocoaPods overwrite the app and other pods's manifest file and is not correct.

Currently, there's no CocoaPods support for privacy manifest unless I'm mistaken: https://github.com/CocoaPods/CocoaPods/issues/11990

And we can't publish new GRDB version on CocoaPods anyway: https://github.com/CocoaPods/CocoaPods/issues/11839
2024-02-25 15:07:35 +01:00
Daniele Pantaleone 45e0de9960 Added privacy manifest to GRDBCustom project 2024-02-18 17:03:43 +01:00
Daniele Pantaleone 1920482158 Added privacy manifest file 2024-02-15 16:57:46 +01:00
Gwendal Roué 0437c0fed6 Merge pull request #1490 from danielinoa/patch-2
Update LICENSE to 2024
2024-02-07 08:53:45 +01:00
Daniel Inoa d08d2f52fb Update LICENSE 2024-02-06 18:30:52 -08:00
Gwendal Roué d1ff0912f1 Fix release date 2024-01-21 12:27:30 +01:00
Gwendal Roué e069e2732e Merge branch 'development' 2024-01-21 11:14:33 +01:00
Gwendal Roué c791e376e8 v6.24.2 2024-01-21 11:14:20 +01:00
Gwendal Roué acf1eb935b Merge pull request #1485 from groue/dev/immediate_transactions
Recommend IMMEDIATE transactions when a database is shared between multiple processes
2024-01-17 21:10:45 +01:00
Gwendal Roué 87c4b1cfa8 CHANGELOG 2024-01-17 20:06:38 +01:00
Gwendal Roué d0fc34b199 Recommend IMMEDIATE transactions in the Sharing a Database guide
Fix #1483
2024-01-17 20:04:39 +01:00
Gwendal Roué 9cee1e218d Tests for SQLITE_BUSY prevention with IMMEDIATE transactions
Those tests support the recommendation of IMMEDIATE transactions for shared databasesS.

See #1483
2024-01-17 19:39:40 +01:00
Gwendal Roué f5d55cb1a1 TODO 2024-01-17 10:51:42 +01:00
Gwendal Roué 345a3dae28 CHANGELOG 2024-01-14 17:31:17 +01:00
Gwendal Roué 1239178bee Improve diagnostic when an association to/from view are lacking an explicit ForeignKey
Related discussion: https://github.com/groue/GRDB.swift/discussions/1481
2024-01-14 17:31:17 +01:00
Gwendal Roué e5a7c73dc9 Tests for associations to or from views 2024-01-14 14:33:17 +01:00
Gwendal Roué 11e914db12 Fix code signing issues with GRDBDemoiOS 2024-01-13 13:09:53 +01:00
Gwendal Roué 181ccd8d7d Merge branch 'development' 2024-01-06 19:56:07 +01:00
Gwendal Roué 2800e9a81e v6.24.1 2024-01-06 19:55:52 +01:00
Gwendal Roué 18d2d512f0 Merge pull request #1477 from groue/dev/dump-virtual-tables
Remove shadow tables from database dump
2024-01-06 19:52:33 +01:00
Gwendal Roué c06552fbd4 Document that shadow tables are not recorded by dumpContent() 2024-01-06 18:36:58 +01:00
Gwendal Roué a00a3f7c80 Fix failing test that dumpContent ignores shadow tables 2024-01-06 18:14:37 +01:00
Gwendal Roué b9ac9b1ca8 Failing test that dumpContent ignores shadow tables 2024-01-06 18:12:45 +01:00
Gwendal Roué 07f1ddac04 Test that dumpContent ignores GRDB internal tables 2024-01-06 18:12:21 +01:00
Gwendal Roué 12829e5bfb Merge branch 'development' 2024-01-06 14:53:16 +01:00
Gwendal Roué 09fa46a0d9 v6.24.0 2024-01-06 13:27:00 +01:00
Gwendal Roué e359529503 When releasing, run the full test suite from a pristine repository 2024-01-06 13:27:00 +01:00
Gwendal Roué ac8d1b77b9 Merge pull request #1466 from barnettben/1463-schema-names
Add schema name option to table introspection methods
2024-01-06 13:18:50 +01:00
Gwendal Roué 002c5ec2f1 Revert "Report test results from Github actions"
This reverts commit aadb887b34.
2024-01-06 12:27:26 +01:00
Gwendal Roué b42f618a01 Disable tests for attached schemas when databases are encrypted 2024-01-06 12:08:54 +01:00
Ben Barnett 27a4215424 Add schemaName parameter to foreign key checking functions 2023-12-08 18:22:49 +00:00
Ben Barnett 65167ec7da Add schemaName parameter to table/view/triggerExists() 2023-12-08 18:22:49 +00:00
Ben Barnett 73489fc0e7 Add schemaName parameter to indexes(on:) 2023-12-08 18:22:49 +00:00
Ben Barnett 1aca8efa65 Add schemaName parameter to foreignKeys(on:) 2023-12-08 18:22:49 +00:00
Ben Barnett a22bf83ae8 Split duplicate nested conditions into separate function 2023-12-07 18:32:34 +00:00
Ben Barnett f00a974211 Add schemaName parameter to columns(in:) 2023-12-06 20:49:48 +00:00
Ben Barnett ac475cc158 Add schemaName parameter to primaryKey(_:) 2023-12-06 20:32:17 +00:00
Gwendal Roué eacbdf23af Merge branch 'development' 2023-12-01 08:21:27 +01:00
Gwendal Roué e31a80e3c4 v6.23.0 2023-12-01 08:06:55 +01:00
Gwendal Roué e3cf966c81 Documentation organization 2023-12-01 08:02:32 +01:00
Gwendal Roué eeb71039d4 Merge pull request #1462 from groue/dev/read-only
Temporary read-only access
2023-11-30 13:48:52 +01:00
Gwendal Roué c5203f078d Make Database.readOnly public 2023-11-30 07:56:21 +01:00
Gwendal Roué e29c52d7e5 Update obsolete documentation of stopObservingDatabaseChangesUntilNextTransaction 2023-11-27 10:00:41 +01:00
Gwendal Roué 06ac26a213 Merge branch 'development' 2023-11-26 12:02:16 +01:00
Gwendal Roué fae845a986 v6.22.0 2023-11-26 10:48:42 +01:00
Gwendal Roué b671bb0faa CHANGELOG 2023-11-26 10:37:27 +01:00
Gwendal Roué 93462cfd2c Documentation 2023-11-26 10:33:00 +01:00
Gwendal Roué 54357e4fec Merge pull request #1460 from groue/dev/notify-changes
Explicit change notifications
2023-11-26 08:34:23 +01:00
Gwendal Roué d8760253ff Add missing DocC reference 2023-11-25 17:10:40 +01:00
Gwendal Roué dc281cee25 Cleanup tests for unspecified changes to a column 2023-11-25 17:01:11 +01:00
Gwendal Roué a8ed98e414 Mention undetected changes in the Database Sharing Guide 2023-11-25 16:50:01 +01:00
Gwendal Roué f1a8c5ac92 Wording 2023-11-25 16:49:37 +01:00
Gwendal Roué 079c0c7f26 The unit of change notification is the event kind, not the region 2023-11-25 16:44:18 +01:00
Gwendal Roué bced461c4f Fix failing test for DatabaseRegionObservation and Database.notifyChanges(in:) 2023-11-25 15:32:35 +01:00
Gwendal Roué 9d6e127822 Failing test for DatabaseRegionObservation and Database.notifyChanges(in:) 2023-11-25 15:32:35 +01:00
Gwendal Roué dff7971cd7 Fix failing test for ValueObservation and Database.notifyChanges(in:) 2023-11-25 15:32:35 +01:00
Gwendal Roué 3df718c1a6 Failing test for ValueObservation and Database.notifyChanges(in:) 2023-11-25 15:32:35 +01:00
Gwendal Roué 3e52e265ce Fix failing test for stopObservingDatabaseChangesUntilNextTransaction() from databaseDidChange() 2023-11-25 15:32:35 +01:00
Gwendal Roué abf48eb86f Failing test for stopObservingDatabaseChangesUntilNextTransaction() from databaseDidChange() 2023-11-25 15:32:35 +01:00
Gwendal Roué 56ad833ab7 New Dealing with Undetected Changes documentation chapter 2023-11-25 15:32:35 +01:00
Gwendal Roué 8afd986790 Fix failing tests for Database.notifyChanges(in:) and master tables 2023-11-25 15:32:35 +01:00
Gwendal Roué 918afbd33e Fix failing tests for Database.notifyChanges(in:) and regular tables 2023-11-25 14:39:13 +01:00
Gwendal Roué b5cb8fadf0 Failing tests for Database.notifyChanges(in:) 2023-11-25 14:39:13 +01:00
Gwendal Roué 1a16bdeac8 TransactionObserver.databaseDidChange() 2023-11-25 13:30:23 +01:00
Gwendal Roué 5e749eb50b Document that changes performed by SQLite statements that are not compiled and executed by GRDB are not detected. 2023-11-24 14:10:57 +01:00
Gwendal Roué 836e7733da Prepare TransactionObserverTests for unspecified change notifications 2023-11-24 13:40:02 +01:00
Gwendal Roué 8b19c3424c Test async read after async write 2023-11-11 13:38:03 +01:00
Gwendal Roué 7eaf67fb6a CHANGELOG 2023-11-02 15:04:45 +01:00
Gwendal Roué 753d7db65f Merge pull request #1452 from groue/dev/SQLite-3.44.0
SQLite 3.44.0, FILTER and ORDER BY clauses in aggregate functions
2023-11-02 15:03:30 +01:00
Gwendal Roué f0fe5ff017 TODO GRDB7 2023-11-02 14:08:15 +01:00
Gwendal Roué 225d7a8c2d Fix test for SQLCipher 2023-11-02 14:03:52 +01:00
Gwendal Roué 46ad19d2e3 Documentation 2023-11-02 14:03:52 +01:00
Gwendal Roué 2603b6ea03 Support for ORDER BY and FILTER in aggregate functions 2023-11-02 14:03:52 +01:00
Gwendal Roué f7156b9490 Custom SQLite 3.44.0 2023-11-02 14:03:52 +01:00
Gwendal Roué f1f8e8438a Merge branch 'development' 2023-10-29 10:00:25 +01:00
Gwendal Roué 6bd1e6b8fb v6.21.0 2023-10-29 08:46:10 +01:00
Gwendal Roué ae21996947 CHANGELOG 2023-10-29 08:43:30 +01:00
Gwendal Roué 8479c4c874 Merge pull request #1449 from groue/dev/temp-copies
Backport temporary copies from GRDBSnapshotTesting
2023-10-29 08:42:20 +01:00
Gwendal Roué 4c8fc93fec Fix tests for encrypted databases 2023-10-29 07:34:23 +01:00
Gwendal Roué 38bb8d3505 Backport temporary copies from GRDBSnapshotTesting 2023-10-28 18:38:15 +02:00
Gwendal Roué 850542dd25 CHANGELOG 2023-10-28 18:37:38 +02:00
Gwendal Roué aaad020b0b Merge pull request #1448 from groue/dev/dump-views
Add support for stable ordering and dump of views.
2023-10-28 18:36:15 +02:00
Gwendal Roué ba320a08e3 Make dumpTables able to print views 2023-10-28 15:46:31 +02:00
Gwendal Roué 42fd32731a Make withStableOrder able to deal with views 2023-10-28 15:46:10 +02:00
Gwendal Roué 8fa434272e Make all read closures explicit in the documentation
The short form dbQueue.read(fetch) can confuse the reader.
2023-10-22 07:59:08 +02:00
Gwendal Roué fd2e552cfb Merge branch 'development' 2023-10-15 11:20:12 +02:00
Gwendal Roué 13bf0686ef v6.20.2 2023-10-15 11:10:02 +02:00
Gwendal Roué 1a9e306c78 Merge pull request #1442 from groue/dev/fix-macos-json-availability
Extend the macOS availability of JSON functions
2023-10-15 11:02:49 +02:00
Gwendal Roué 565335ea0d Update documentation 2023-10-15 09:06:28 +02:00
Gwendal Roué aabdffabc2 All JSON functions are available on macOS 10.15, but -> and ->>
Thank you @martindufort for the detailed report: https://gist.github.com/groue/046ebddb4a410304094c022d756081c8
2023-10-15 09:06:28 +02:00
Gwendal Roué 85792b8293 One availability per JSON function 2023-10-15 08:18:36 +02:00
Gwendal Roué c4c13b6f53 Doc updates for GRDBSnapshotTesting 2023-10-14 11:22:48 +02:00
Gwendal Roué d597fd56e9 v6.20.1 2023-10-13 07:42:44 +02:00
Gwendal Roué 94a7a59cc9 Remove debug print 2023-10-13 07:40:02 +02:00
Gwendal Roué f6f93469fb Merge branch 'development' 2023-10-13 07:18:32 +02:00
Gwendal Roué 120241b069 v6.20.0 2023-10-12 22:37:01 +02:00
Gwendal Roué 856d9cbe53 Merge pull request #1439 from groue/dev/dump
Dump requests
2023-10-12 22:34:20 +02:00
Gwendal Roué a8331d7335 CHANGELOG 2023-10-12 09:17:50 +02:00
Gwendal Roué dc1f9450c0 Expose DatabaseValue.init(sqliteStatement:index:)
This helps users implement custom dump formats
2023-10-12 09:17:50 +02:00
Gwendal Roué 7a7ee554c7 OrderedRequest.withStableOrder() 2023-10-12 09:17:50 +02:00
Gwendal Roué aadb887b34 Report test results from Github actions
https://github.com/kishikawakatsumi/xcresulttool/discussions/630
2023-10-12 09:17:50 +02:00
Gwendal Roué 69ae4c4e96 Dump 2023-10-12 09:17:50 +02:00
Gwendal Roué f4ac0ab119 Make it possible to observe the supplementary fetches 2023-10-08 20:41:05 +02:00
Gwendal Roué 8d4cc05021 Add missing tests for GRDB+SQLCipher 2023-10-08 20:20:07 +02:00
Gwendal Roué 16d6c92722 Add missing test file to GRDBCustom 2023-10-08 20:14:21 +02:00
Gwendal Roué c7047c4b33 Trim SQL in DatabaseError descriptoin 2023-10-08 20:07:59 +02:00
Gwendal Roué e22bf8fe0a DocC organization 2023-10-08 20:05:22 +02:00
Gwendal Roué e994fca2b5 Fix documentation typo 2023-10-07 11:36:31 +02:00
Gwendal Roué c599f6423e Fix link 2023-10-04 23:00:02 +02:00
Gwendal Roué 458b7211df Merge branch 'development' 2023-10-04 22:06:37 +02:00
Gwendal Roué 703e3c2b68 v6.19.0 2023-10-04 22:06:27 +02:00
Gwendal Roué 0eb973b6db Record types with an auto-incremented id should avoid the Identifiable protocol. 2023-10-04 22:02:18 +02:00
Gwendal Roué cbcc057222 Merge pull request #1436 from groue/experimental/JSONColumn
JSON functions
2023-10-04 21:22:43 +02:00
Gwendal Roué d64de2bbdb CHANGELOG 2023-10-04 19:57:45 +02:00
Gwendal Roué 1f0b52a012 JSON documentation 2023-10-04 19:57:45 +02:00
Gwendal Roué 908f8b242a Prepare documentation for JSON 2023-10-04 19:55:12 +02:00
Gwendal Roué 9faea276d8 JSON tests 2023-10-04 19:55:12 +02:00
Gwendal Roué 5a42d78e06 Data decoding and encoding strategies
Users must be able to store JSON data as text in the database.
2023-10-04 19:55:12 +02:00
Gwendal Roué 546e8aa77c JSONColumn and SQLJSONExpressible 2023-10-04 19:55:12 +02:00
Gwendal Roué ed01d40ba9 JSON functions 2023-10-04 19:55:12 +02:00
Gwendal Roué 97e6f88b31 Add new .jsonText column type 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é 8cc52983b7 Introduce SQLFunctionFlags 2023-10-01 15:39:47 +02:00
Gwendal Roué b896923fd4 TODO GRDB7: remove painful optionals due to IGNORE 2023-10-01 15:37:27 +02:00
Gwendal Roué 4abcbdf452 CHANGELOG 2023-09-16 17:53:50 +02:00
Gwendal Roué 6706de0103 Workaround for https://github.com/CocoaPods/CocoaPods/issues/12012 2023-09-16 17:52:40 +02:00
Gwendal Roué cc534fd19c Merge pull request #1429 from JhonnyBillM/dev/1428-EXTEND-VALUE-CONVERTIBLE-JSON-FORMAT-CUSTOMIZATION
Extend `DatabaseValueConvertible` JSON parsing format customization
2023-09-16 17:51:12 +02:00
Gwendal Roué 65dd5f1da8 Merge pull request #1430 from groue/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2023-09-16 15:25:52 +02:00
Gwendal Roué 76dbcfe700 Fix documentation wording 2023-09-16 14:14:30 +02:00
Gwendal Roué 7944979d56 Add new methods to DocC 2023-09-16 14:14:20 +02:00
Gwendal Roué 7f6ab59250 Markdown files are soft-wrapped 2023-09-16 14:10:17 +02:00
Gwendal Roué 746f65a979 JSON encoder is always user-provided
Now all created JSONEncoder or JSONDecoder are user-controlled.
2023-09-16 14:07:37 +02:00
Gwendal Roué 9188251780 Add missing import required by SPM 2023-09-16 14:03:38 +02:00
Gwendal Roué 1e995b659d Hard-wrap documentation comments 2023-09-16 14:03:26 +02:00
dependabot[bot] e560993b44 Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 06:25:17 +00:00
Jhonny Bill Mena eec476b9ba ADD - unit tests for custom JSON Encoder and Decoder in DatabaseValueConvertible 2023-09-10 23:54:50 -04:00
Jhonny Bill Mena 3f96a965b9 ADD - databaseJSONDecoder and databaseJSONEncoder methods
ADD - optional jsonEncoder parameter to DatabaseValueEncoder

ADD - docs around new JSON customization methods
2023-09-10 23:54:50 -04:00
Gwendal Roué ce63f697ed Merge branch 'development' 2023-09-01 12:36:14 +02:00
Gwendal Roué 92f5b2a9dd v6.18.0 2023-09-01 11:39:48 +02:00
Gwendal Roué 5f103df04d Update CONTRIBUTING.md for DocC 2023-08-31 09:45:37 +02:00
Gwendal Roué 7cbcbe12f0 Expose path on DatabaseReader 2023-08-31 09:42:13 +02:00
Gwendal Roué c12fff16d3 CHANGELOG 2023-08-28 15:06:23 +01:00
Gwendal Roué e40569844f Merge branch 'development' 2023-08-26 10:41:10 +01:00
Gwendal Roué 3ac7598e9b v6.17.0 2023-08-26 09:47:38 +01:00
Gwendal Roué fd847d5a25 CHANGELOG 2023-08-26 09:41:39 +01:00
Gwendal Roué 6fec245d2f Merge pull request #1421 from groue/dev/journalModeSetup
Make it possible to open a DatabaseQueue in the WAL mode
2023-08-26 09:40:18 +01:00
Gwendal Roué 9e5cb95e1f Documentation for Configuration.journalMode 2023-08-25 10:11:41 +01:00
Gwendal Roué 13bc9ae56c Tests for Configuration.journalMode 2023-08-25 09:10:43 +01:00
Gwendal Roué e79b4e25db Apply Configuration.journalMode 2023-08-25 09:10:33 +01:00
Gwendal Roué f76093a0c7 Database.setUpWALMode() 2023-08-25 09:10:26 +01:00
Gwendal Roué 45b248b4ed Configuration.journalMode 2023-08-25 09:10:26 +01:00
Gwendal Roué 97c04a7f26 Shorten line length 2023-07-29 11:42:02 +02:00
Gwendal Roué 9ff58c32e7 Use CChar instead of Int8 when we deal with C strings 2023-07-29 11:13:41 +02:00
Gwendal Roué 0b2b26fd11 A statement can delete even if it's not a DELETE statement (through triggers) 2023-07-29 11:08:55 +02:00
Gwendal Roué 6f18de6a94 Fix typo 2023-07-29 11:08:02 +02:00
Gwendal Roué 28c6ea96b4 Fix redundant_self_in_closure Swiftlint warning 2023-07-29 10:06:33 +02:00
Gwendal Roué 206bf209af Fix unneeded_synthesized_initializer Swiftlint warning 2023-07-29 10:00:42 +02:00
Gwendal Roué e83f3eb25e Merge branch 'development' 2023-07-09 18:32:52 +02:00
Gwendal Roué e16d4accb3 v6.16.0 2023-07-09 18:08:27 +02:00
Gwendal Roué 9ff4060b10 Merge pull request #1405 from groue/dev/belongsToColumn
Simplify the declaration of BelongsTo associations in the database schema
2023-07-09 17:30:57 +02:00
Gwendal Roué 4ac434c83c CHANGELOG 2023-07-09 17:22:41 +02:00
Gwendal Roué 913168df2d Upgrade tests with belongsTo 2023-07-09 17:22:38 +02:00
Gwendal Roué f8c99f96bc Upgrade playgrounds with belongsTo 2023-07-09 17:22:38 +02:00
Gwendal Roué 466ecd5ba5 Documentation 2023-07-09 17:22:38 +02:00
Gwendal Roué 7a0a354d22 Implement ForeignKeyDefinition 2023-07-09 17:22:38 +02:00
Gwendal Roué 349253e196 Failing tests for ForeignKeyDefinition 2023-07-09 17:16:08 +02:00
Gwendal Roué dd85e699e2 Help handling of columns with no declared type 2023-07-09 17:16:08 +02:00
Gwendal Roué c647840485 PrimaryKeyInfo exposes column types 2023-07-09 17:16:08 +02:00
Gwendal Roué 3375282252 Update outdated documentation about views 2023-07-09 17:13:22 +02:00
Gwendal Roué 82d3af48c3 CHANGELOG 2023-07-09 17:13:22 +02:00
Gwendal Roué bebb751b3c Create and drop view 2023-07-09 17:13:22 +02:00
Gwendal Roué 08fbd82ead Rename StatementArgumentsSink.forRawSQL to literalValues 2023-07-09 17:13:22 +02:00
Gwendal Roué 89dd426403 CHANGELOG 2023-07-09 15:16:06 +02:00
Gwendal Roué 3206d04f0e Merge pull request #1401 from kustra/dev/linux-compile-fixes
Linux compilation fixes
2023-07-09 15:12:41 +02:00
Gwendal Roué ee0d3e43e0 iOS 17: Update date formatter tests so that it does not depend on the space before AM/PM
iOS 17 has changed that space
2023-07-09 14:37:45 +02:00
László Kustra f113963d31 Remove obsolete SQLite trace logic, as min SQLite version is 3.19.3 2023-07-07 11:05:17 +02:00
Gwendal Roué 7d48703986 CHANGELOG 2023-07-02 15:43:50 +02:00
Gwendal Roué f06e117d66 Merge pull request #1403 from groue/dev/ci-macOS13
GitHub CI: test Xcode 14.3.1, macOS 13
2023-07-02 15:43:29 +02:00
Gwendal Roué 5fca5fdabf Force MACOSX_DEPLOYMENT_TARGET on SQLCipher CocoaPods tests
Workaround for https://github.com/CocoaPods/CocoaPods/issues/11839
2023-07-02 14:18:07 +02:00
Gwendal Roué 2bd080799f Test universal xcframework 2023-07-02 14:18:07 +02:00
Gwendal Roué 1577825585 GitHub CI: test Xcode 14.3.1, macOS 13 2023-07-02 14:18:07 +02:00
Gwendal Roué 9b7ba606d8 Merge pull request #1402 from groue/dev/sqlite-3.42.0
Upgrade custom SQLite builds to 3.42.0
2023-07-02 14:17:18 +02:00
Gwendal Roué c9d8ce57a7 Trigger CI on custom SQLite upgrade 2023-07-02 12:44:18 +02:00
Gwendal Roué 2bb904775f CHANGELOG 2023-07-02 12:38:41 +02:00
Gwendal Roué 66826288d6 Upgrade custom SQLite builds to 3.42.0 2023-07-02 12:32:56 +02:00
Gwendal Roué 59c41c97af Clarify the prevention of database access from TransactionObserver callbacks 2023-07-02 10:58:09 +02:00
László Kustra 47d8ef4358 Fix the Linux version of sqlite3_trace for SQLite 3.19.3 2023-06-29 16:23:36 +02:00
László Kustra 25b49cba01 Add autoreleasepool shim for Linux 2023-06-29 16:23:36 +02:00
László Kustra 788887a2b8 Remove selector-based NotificationCenter calls on Linux 2023-06-29 16:23:36 +02:00
László Kustra 4057e3be07 Use cross-platform ProcessInfo instance property 2023-06-29 16:23:36 +02:00
Gwendal Roué 284a4ee1ac Merge branch 'development' 2023-06-17 12:59:06 +02:00
Gwendal Roué b27e378cfa v6.15.1 2023-06-17 12:04:26 +02:00
Gwendal Roué 459726f9af Improve documentation of erase() 2023-06-15 14:17:48 +02:00
Gwendal Roué 4f00e405c3 CHANGELOG 2023-06-11 15:40:02 +02:00
Gwendal Roué 87f4d816e6 Merge pull request #1391 from groue/dev/issue-1390
Fix upsert in FTS5-synchronized tables
2023-06-11 15:36:52 +02:00
Gwendal Roué ea7ebe1ff5 Fix failing test for #1390 2023-06-11 13:15:55 +02:00
Gwendal Roué 89899432ba Failing test for #1390 2023-06-11 13:15:55 +02:00
Gwendal Roué 3a1c211746 Address #1389 by forcing the user to specify a tracked region
This is technically a breaking change, but nobody will notice it.
2023-06-08 12:17:27 +02:00
Gwendal Roué c3664e2b16 Fix Xcode 15 DocC warnings 2023-06-06 08:15:02 +02:00
Gwendal Roué ea1353bd6c Remove invalid documentation link 2023-06-06 08:13:43 +02:00
Gwendal Roué 4a5d4d6e49 Fix Xcode 15 warnings 2023-06-06 08:06:06 +02:00
Gwendal Roué c85abdba86 Fix typo 2023-06-02 16:13:51 +02:00
Gwendal Roué 57aa4c30bf Merge branch 'development' 2023-06-02 16:07:14 +02:00
Gwendal Roué 67b7941129 v6.15.0 2023-06-02 15:39:29 +02:00
Gwendal Roué db01b0063c Fix a test that relied on observation of every single changes 2023-06-02 15:39:26 +02:00
Gwendal Roué e1ddc8154f Merge pull request #1382 from groue/dev/request-all
Add `DerivableRequest.all()`
2023-06-02 13:34:43 +02:00
Gwendal Roué e637c156a2 CHANGELOG 2023-06-02 13:31:19 +02:00
Gwendal Roué 60ad8a809a Tests for FilteredRequest.all() and none() 2023-06-02 13:31:02 +02:00
Gwendal Roué 84ac401886 Add FilteredRequest.all()
This method does nothing: it returns `self`. It exists in order to match `none()`.
2023-06-02 13:31:02 +02:00
Gwendal Roué 26b875f64c Merge pull request #1384 from groue/dev/issue-1383
Allow ValueObservation to start from a truncated wal file
2023-06-02 13:29:27 +02:00
Gwendal Roué fdc8abfdbe CHANGELOG 2023-06-02 12:07:35 +02:00
Gwendal Roué fc641092f7 Document how truncating wal checkpoints impact ValueObservation 2023-06-02 12:04:28 +02:00
Gwendal Roué 63d360053b Fix typo and obsolete comments 2023-06-02 10:20:42 +02:00
Gwendal Roué dc440d5a8f Fix failing tests for non-empty wal files on DatabasePool creation 2023-06-02 09:44:18 +02:00
Gwendal Roué 5ab0d18055 Failing tests for non-empty wal files on DatabasePool creation 2023-06-02 09:35:51 +02:00
Gwendal Roué 437b800d8c Add test for the SQLite file provided by @kustra
https://github.com/groue/GRDB.swift/issues/1383#issuecomment-1572897011
2023-06-02 08:34:14 +02:00
Gwendal Roué b840babb55 Document the intent of #1383 regression tests 2023-06-01 20:15:05 +02:00
Gwendal Roué 725d4a3fba When a wal snapshot can't be created, ValueConcurrentObserver fallbacks to plain reads
This commit fixes #1383
2023-06-01 20:00:04 +02:00
Gwendal Roué 4ab8ac8d3f Failing test for #1383 (async version) 2023-06-01 19:53:34 +02:00
Gwendal Roué 73b279b5c1 Document methods that fail if the wal file is missing or truncated 2023-06-01 19:15:21 +02:00
Gwendal Roué fa681fb8c6 Enhance error message when WALSnapshot initializer fails 2023-06-01 19:07:28 +02:00
Gwendal Roué cedcfbe330 Mark opportunities for snapshot creation failure (including #1383) 2023-06-01 17:26:04 +02:00
Gwendal Roué abd3ba39b1 Explicit tests that a DatabasePool can read from a new instance, and from a truncated wal file 2023-06-01 17:20:25 +02:00
Gwendal Roué d66d2118b5 Failing test for #1383 2023-06-01 17:05:06 +02:00
Gwendal Roué 0a92a99223 Merge branch 'development' 2023-05-25 18:29:47 +02:00
Gwendal Roué 19e5e62098 v6.14.0 2023-05-25 18:29:15 +02:00
Gwendal Roué d948e37388 CHANGELOG 2023-05-25 18:25:04 +02:00
Gwendal Roué 60de81633e Merge pull request #1379 from groue/dev/default-index-name
Create indexes with a default name
2023-05-25 18:24:06 +02:00
Gwendal Roué c02139c045 Default name for newly created indexes 2023-05-25 09:03:09 +02:00
Gwendal Roué 93bd527984 Merge pull request #1376 from groue/dev/bitwise-operations
Bitwise operations
2023-05-23 14:03:01 +02:00
Gwendal Roué 157d02b55c CHANGELOG 2023-05-23 08:21:35 +02:00
Gwendal Roué 82d28b3167 Bitwise assignment operators &= |= <<= >>= 2023-05-23 08:16:14 +02:00
Gwendal Roué 717c2836ec Bitwise operators & | ~ << >> 2023-05-23 08:15:04 +02:00
Gwendal Roué cf8fa0e5f8 Merge branch 'development' 2023-05-15 20:06:01 +02:00
Gwendal Roué 84ef0a92da v6.13.0 2023-05-15 20:05:30 +02:00
Gwendal Roué 2ae000df43 CHANGELOG 2023-05-15 19:05:30 +02:00
Gwendal Roué 738a187f68 Merge pull request #1373 from groue/dev/issue-1371
Disallow string literals in check()
2023-05-15 18:57:29 +02:00
Gwendal Roué 4ff057ac3b Deprecate table constraints built from SQLExpressible - prefer SQLSpecificExpressible instead
Fixes #1371
2023-05-15 12:45:33 +02:00
Gwendal Roué 0d49d7612f Enhance wording 2023-05-01 12:16:48 +02:00
Gwendal Roué 342b81f65e Update dark logo 2023-04-30 12:55:56 +02:00
Gwendal Roué a651f34f67 Upgrade performance test dependencies 2023-04-30 12:20:21 +02:00
Gwendal Roué 5475dc98dc Merge branch 'development' 2023-04-29 18:29:02 +02:00
Gwendal Roué 3692ba2293 v6.12.0 2023-04-29 17:37:22 +02:00
Gwendal Roué 266efa041c Expose FetchableRecordDecoder 2023-04-29 17:15:54 +02:00
Gwendal Roué ebb2f7346d Cleanup FTS5 documentation 2023-04-29 16:50:15 +02:00
Gwendal Roué f955e5fabc Merge pull request #1364 from groue/issue1362-test
Fix ValueObservation deadlock
2023-04-29 16:34:58 +02:00
Gwendal Roué 65c803a110 Fix #1362 2023-04-29 13:24:46 +02:00
Gwendal Roué 8b1b3b0396 Fix tests that relied on observation of every single changes 2023-04-29 12:47:25 +02:00
Gwendal Roué bf28d1bd85 Disable xcpretty on $CI 2023-04-29 12:47:15 +02:00
Gwendal Roué 45edf58f9e Refactor ValueObservationRecorder matching test 2023-04-29 12:47:00 +02:00
Gwendal Roué d07e8bd3a0 The scenario that leads to the #1362 deadlock 2023-04-18 18:22:47 +02:00
Matt Gallagher 7feaa748a4 Removed some unneeded configuration from the test. 2023-04-18 13:06:05 +10:00
Matt Gallagher c159638498 A test demonstrating deadlock when observer count exceeds size of DatabasePool. 2023-04-18 12:48:06 +10:00
Gwendal Roué 5aa385094b Merge branch 'development' 2023-04-17 20:20:50 +02:00
Gwendal Roué 1cd20176c6 v6.11.0 2023-04-17 20:20:30 +02:00
Gwendal Roué 06891e99e1 Prepare for release 2023-04-17 20:20:30 +02:00
Gwendal Roué d5f38a6a24 Fix Swiftlint warning 2023-04-17 19:17:50 +02:00
Gwendal Roué 68d23a5f33 README layout 2023-04-17 08:36:32 +02:00
Gwendal Roué 75f92f6f14 Dark logo 2023-04-17 08:35:31 +02:00
Gwendal Roué 6c70ee6b77 Remove the Swift language versions 2023-04-16 16:51:33 +02:00
Gwendal Roué c8ae3cb61c Update usage sample code 2023-04-16 14:07:43 +02:00
Gwendal Roué dd4d3e35f3 Concurrency Guide layout 2023-04-16 13:27:11 +02:00
Gwendal Roué 7b2619e757 Refactor README introduction 2023-04-16 13:25:24 +02:00
Gwendal Roué a7b9a27c51 DocC home page layout 2023-04-16 13:09:31 +02:00
Gwendal Roué fcfd6e9028 ValueConcurrentObserver releases its initial WAL transaction earlier 2023-04-15 11:59:19 +02:00
Gwendal Roué 9011f71247 Fix tests for unavailable wal snapshots 2023-04-15 09:50:46 +02:00
Gwendal Roué 069bce217d Attempts at finding regression tests for #1362 2023-04-14 08:28:34 +02:00
Gwendal Roué 5a91340671 CHANGELOG 2023-04-13 08:02:41 +02:00
Gwendal Roué ba2e3cb468 Merge pull request #1361 from groue/dev/issue-1360
DatabaseMigrator.eraseDatabaseOnSchemaChange ignores internal schema objects
2023-04-13 08:00:05 +02:00
Gwendal Roué f633be4ba1 Fix test for #1360 2023-04-12 08:02:38 +02:00
Gwendal Roué 4074fcfcc7 Failing test for #1360 2023-04-12 08:00:19 +02:00
Gwendal Roué 18cdf4956e Fix typos 2023-04-10 16:52:03 +02:00
Gwendal Roué 18e06a78a3 Merge branch 'development' 2023-04-10 15:06:33 +02:00
Gwendal Roué 065ca71876 v6.10.2 2023-04-10 14:16:41 +02:00
Gwendal Roué 859a1d6184 Enhance Recommended Practices for Designing Record Types 2023-04-10 14:11:39 +02:00
Gwendal Roué f2ea4e91db CHANGELOG 2023-04-10 11:32:12 +02:00
Gwendal Roué 1add9a9752 Fix incorrect test 2023-04-10 11:31:19 +02:00
Gwendal Roué 17c3f82f50 Remove weird Xcode error regarding the Scripts "project" 2023-04-10 11:31:19 +02:00
Gwendal Roué 52a3d6ba23 Move the "Recommended Practices for Designing Record Types" to DocC 2023-04-10 09:51:38 +02:00
Gwendal Roué 54007a9ce1 Refactor demo apps for enhanced configuration management 2023-04-09 11:40:40 +02:00
Gwendal Roué 77d8a46039 Remove obsolete TODOs 2023-04-08 12:30:55 +02:00
Gwendal Roué f6e695a21d More explicit any/some 2023-04-08 12:01:59 +02:00
Gwendal Roué 3184334535 Merge branch 'development' 2023-04-01 17:22:35 +02:00
Gwendal Roué 12e3923af1 v6.10.1 2023-04-01 16:01:43 +02:00
Gwendal Roué b81e858ca0 Better fix for #1357
Previous fix would not correctly address #1357 when invalid double-quoted identifiers are interpreted as string literals (Configuration.acceptsDoubleQuotedStringLiterals = true, or SQLCipher 3)
2023-04-01 14:59:42 +02:00
Gwendal Roué 82f300e534 GitHub actions: Xcode 14.2 2023-04-01 14:30:57 +02:00
Gwendal Roué 9df1cfd110 CHANGELOG 2023-04-01 14:12:50 +02:00
Gwendal Roué 373fe467d6 Fix failing test for #1357 2023-04-01 14:09:50 +02:00
Gwendal Roué 81eb6b128f Failing test for #1357 2023-04-01 14:09:50 +02:00
Gwendal Roué c7ee12eff7 Remove deprecated swiftlint rule 2023-04-01 13:14:45 +02:00
Gwendal Roué 89330daa52 Use xcbeautify when available 2023-04-01 13:05:43 +02:00
Gwendal Roué e408bd17d8 Fix Swiftlint warning 2023-04-01 13:04:52 +02:00
Gwendal Roué 99ddc5e13c Makefile: add explicit macOS destinations 2023-04-01 12:56:44 +02:00
Gwendal Roué 4c0cc84c2d Improve DatabaseEventPredicate usage with SQLITE_ENABLE_PREUPDATE_HOOK 2023-03-31 08:02:04 +02:00
Gwendal Roué 4762f8bb36 Fix spawnConcurrentRead documentation 2023-03-29 13:02:49 +02:00
Gwendal Roué 7e6f71912c Enhance DatabaseQueue read-only transactions 2023-03-29 13:02:31 +02:00
Gwendal Roué 6b311941b1 Remove WWDCCompanion from the release process 2023-03-22 18:40:48 +01:00
Gwendal Roué 5facc24ebb Fix compiler warnings for Swift 5.8 2023-03-22 18:40:37 +01:00
Gwendal Roué 018ae03f8e Improve DatabaseEventPredicate usage 2023-03-22 08:30:21 +01:00
Gwendal Roué 52aef76b63 Fix Swiftlint warning 2023-03-22 08:25:37 +01:00
Gwendal Roué 2fa5ca767f WALSnapshot is only available when the SQLite feature is
Since #1350 we no longer need to expose it and check for failures at runtime.
2023-03-20 15:05:17 +01:00
Gwendal Roué a1b76f9e06 Fix typo 2023-03-20 09:21:50 +01:00
Gwendal Roué 2d19cab2b5 Merge branch 'development' 2023-03-20 07:53:38 +01:00
Gwendal Roué a551fbf443 v6.10.0 2023-03-20 07:53:28 +01:00
Gwendal Roué c6e220a531 Merge pull request #1350 from groue/dev/long-lived-read-only-transaction
DatabasePool won't close read-only connections if requested, and ValueObservation no longer opens a new database connection when it starts
2023-03-20 07:50:30 +01:00
Gwendal RouéandRogerio de Paula Assis 600d1b84b6 Update GRDB/Core/SerializedDatabase.swift
Co-authored-by: Rogerio de Paula Assis <rog@anz.com>
2023-03-20 07:02:00 +01:00
Gwendal Roué 5629cfe6ff Fix documentation 2023-03-19 13:56:56 +01:00
Gwendal Roué 5d9b9edfe1 Fix asyncWALSnapshotTransaction usage.
We must use its result asynchronously.
2023-03-19 12:39:48 +01:00
Gwendal Roué 449c243a36 Rename persistentReaderConnections to dbConfiguration.persistentReadOnlyConnections 2023-03-18 11:08:56 +01:00
Gwendal Roué 6ca4986bc2 CHANGELOG 2023-03-17 13:52:29 +01:00
Gwendal Roué 063877d49c Configuration.persistentReaderConnections 2023-03-17 13:52:29 +01:00
Gwendal Roué 2f4d0c4588 CHANGELOG 2023-03-17 13:52:29 +01:00
Gwendal Roué 0a544dc0d2 Cleanup relationships between SerializedDatabase, WALSnapshotTransaction, and DatabasePool
SerializedDatabase hides its allowsUnsafeTransactions property, and makes it thread-safe by protecting it inside its serialized dispatch queue.

WALSnapshotTransaction always notifies when the reader connection is no longer used, and reuses the "isInsideTransaction" wording.
2023-03-17 13:52:29 +01:00
Gwendal Roué d64274474b ValueObservation: stop creating a new connection on start
Since #1248, ValueObservation on DatabasePool creates a new database connection when it starts. #1256 has revealed that opening a connection can take too much time, which unfortunate consequences: the first value is notified too late, and we block the main thread when the observation is started in the `.immediate` scheduling :-/

In this commit, ValueObservation on DatabasePool just uses one of the available readers, thus avoiding creating a new connection.

When WAL snapshots are available, a long-running read-only transaction is kept opened on this reader, until we can start observing the write transactions, compare database versions, and perform a fetch+notification if and only if the database was modified.

When WAL snapshots are not available (Xcode 14.0 and macOS, or specific SQLCipher or SQLite builds), a double notification of the initial value is always performed, since we can't prove that the database was not changed between the initial fetch and the write access.
2023-03-17 13:52:29 +01:00
Gwendal Roué e66dfacab8 WALSnapshotTransaction 2023-03-17 13:52:29 +01:00
Gwendal Roué 0d4c6e592e SerializedDatabase.allowsUnsafeTransactions 2023-03-17 13:52:29 +01:00
Gwendal Roué 5d7fdeae5a Fix compiler warnings in tests 2023-03-17 13:52:01 +01:00
Gwendal Roué 378c6785ea Clarification on the truncate optimization 2023-03-16 18:44:46 +01:00
Gwendal Roué 6d392f0a87 Use DatabaseError.connectionIsClosed() where appropriate 2023-03-16 13:44:08 +01:00
Gwendal Roué 7c81c37e1f Move DatabaseRegionObservation documentation in an extension file 2023-03-15 16:51:46 +01:00
Gwendal Roué 3f876978a1 Move TransactionObserver documentation in an extension file 2023-03-15 16:51:46 +01:00
Gwendal Roué a0ed1bfd33 Move ValueObservation documentation in an extension file 2023-03-15 16:51:46 +01:00
Gwendal Roué be41d2dd03 Merge branch 'development' 2023-03-14 08:33:07 +01:00
Gwendal Roué e6c3a8d07a v6.9.2 2023-03-14 08:32:58 +01:00
Gwendal Roué 5e41ca7e4e CHANGELOG 2023-03-14 08:12:38 +01:00
Gwendal Roué 0f942c014c Cleanup 2023-03-14 08:10:56 +01:00
Gwendal Roué 40bebda712 Merge pull request #1349 from JonLz/fix-migrations-docs
Fix Migrations.md example so it compiles
2023-03-13 20:35:21 +01:00
Jon Lazar 37fd4c18b0 Update Migrations.md
Fix closure parameter syntax so that the example compiles.
2023-03-13 15:26:07 -04:00
Gwendal Roué d5a41bd11b Disable SQLITE_STATIC optimization when there are too many arguments 2023-03-13 19:33:52 +01:00
Gwendal Roué c22fc202a9 Fix typo 2023-03-13 08:06:07 +01:00
Gwendal Roué a0f14d816a Merge branch 'development' 2023-03-12 18:18:06 +01:00
Gwendal Roué ad33dfcfbf v6.9.1 2023-03-12 18:17:48 +01:00
Gwendal Roué 840fa3b5da RecordError DocC 2023-03-12 18:14:38 +01:00
Gwendal Roué 397a008237 More links to DocC reference 2023-03-12 18:01:24 +01:00
Gwendal Roué f7559d4c76 Moved row adapters doc into DocC 2023-03-12 17:25:16 +01:00
Gwendal Roué 8cd71ac832 Fix TableRecord.databaseSelection sample code 2023-03-12 17:18:28 +01:00
Gwendal Roué 0ffd25bc74 Fix documentation typo 2023-03-12 16:33:10 +01:00
Gwendal Roué ff7f9073fc Add links to DocC reference 2023-03-12 16:32:54 +01:00
Gwendal Roué 93616775f6 Merge branch 'development' 2023-03-12 12:48:30 +01:00
Gwendal Roué 81751625e0 v6.9.0 2023-03-12 12:48:19 +01:00
Gwendal Roué 9798f9f9fa Update Package.resolved for demo apps 2023-03-12 12:40:38 +01:00
Gwendal Roué db165581ea Merge pull request #1348 from groue/dev/argument-optimization
SQLite argument binding optimization
2023-03-12 11:56:57 +01:00
Gwendal Roué b4e851aa49 More statement arguments documentation 2023-03-12 10:59:38 +01:00
Gwendal Roué 0169e340dc CHANGELOG 2023-03-11 16:40:47 +01:00
Gwendal Roué 1d5d1aea68 Upgrade performance tests dependencies 2023-03-11 12:10:25 +01:00
Gwendal Roué 0c333b6e22 Performance improvements 2023-03-11 12:10:25 +01:00
Gwendal Roué 6a24d835d3 Performance tests for various statement arguments strategies 2023-03-11 12:10:25 +01:00
Gwendal Roué 3382280cc3 Statement.execute(arguments:) uses temporary bindings
Inspired by @helje5 in https://hachyderm.io/@helge@mastodon.social/109978514220902036

Thank you!!

Now, onto cursors!
2023-03-11 12:10:25 +01:00
Gwendal Roué 60fa8a630f Improve Statement.databaseRegion documentation 2023-03-11 12:08:17 +01:00
Gwendal Roué 9ba64c2426 Statement argument validation: fix wrong documentation and strenghten tests 2023-03-11 09:12:37 +01:00
Gwendal Roué 29b5b99b89 Fix typos 2023-03-11 08:00:23 +01:00
Gwendal Roué 725d38ea06 Fix typo 2023-03-07 11:08:00 +01:00
Gwendal Roué 6509f7ed40 Improve DatabaseValueConvertible documentation 2023-03-06 08:22:29 +01:00
Gwendal Roué 67bdc740bd DatabaseValueConvertible and collections: move the rationale out of the user-facing documentation. 2023-03-06 08:03:08 +01:00
Gwendal Roué 1e2b454c4c Enhance wording 2023-03-05 17:14:06 +01:00
Gwendal Roué a77f9d3f6a CHANGELOG 2023-03-05 13:52:26 +01:00
Gwendal Roué 229bd98b9c Enhance Database Connection DocC overview 2023-03-05 13:51:14 +01:00
Gwendal Roué 692eac43a9 Fix typos 2023-03-05 07:44:12 +01:00
Gwendal Roué 4f398a3457 Prepared statements documentation is now hosted in the Statement DocC 2023-03-04 17:08:12 +01:00
Gwendal Roué 44c13e5bff Make sure Statement.reset(withArguments:) resets 2023-03-04 16:28:45 +01:00
Gwendal Roué 7b2393f2cd Cleanup 2023-03-04 15:23:19 +01:00
Gwendal Roué 67dfdc1bbb Move DatabaseValueConvertible.swift DocC in an extension file 2023-03-04 15:19:55 +01:00
Gwendal Roué cc8ed5ccb5 Enhanced DocC for DatabaseValueConvertible
Also:
- Redirect the "Custom Value Types" README chapter to DatabaseValueConvertible documentation.
- Document how to support Tagged https://github.com/pointfreeco/swift-tagged
2023-03-04 14:51:46 +01:00
Gwendal Roué 441823d5f4 Enhance discoverability of the Database Sharing guide
https://github.com/groue/GRDB.swift/discussions/1343
2023-03-04 12:19:21 +01:00
Gwendal Roué 1e5ee4b292 Fix Xcode 14.3 beta 2 warnings 2023-03-04 11:53:41 +01:00
Gwendal Roué 159a34bdf2 Demo apps: bump GRDBQuery to 0.6.0 2023-03-04 10:03:51 +01:00
Gwendal Roué e936d6b42d Fix DatabaseError documentation 2023-03-02 06:58:33 +01:00
Gwendal Roué cc567f2555 Expose the fts5_api structure 2023-03-01 08:23:36 +01:00
Gwendal Roué b3763ad08e RecordCursor: same documation as all cursors 2023-02-26 10:26:03 +01:00
Gwendal Roué c824b42757 Restore busy timeout tests
In the context of #1339
2023-02-25 10:56:56 +01:00
Gwendal Roué d3862c0424 Merge branch 'development' 2023-02-24 13:22:53 +01:00
Gwendal Roué f6cb77a489 v6.8.0 2023-02-24 13:11:18 +01:00
Gwendal Roué a1faa88579 Merge pull request #1338 from groue/dev/TimestampedRecord
TimestampedRecord sample code
2023-02-24 13:03:48 +01:00
Gwendal Roué 43ff278748 Improve transactionDate and transactionClock documentation 2023-02-23 08:34:09 +01:00
Gwendal Roué 5ed44b94bc More improvements to RecordTimestamps.md 2023-02-23 07:59:08 +01:00
Gwendal Roué e683df3494 Tweak wording and explore more timestamp handling scenarios 2023-02-22 14:10:28 +01:00
Gwendal Roué 9f0bd4944b Cleanup 2023-02-22 08:10:28 +01:00
Gwendal Roué 3fab2db88d RecordTimestamps.md organization 2023-02-22 08:07:27 +01:00
Gwendal Roué 5f013b6ee7 Layout for Xcode doc reader 2023-02-22 07:17:53 +01:00
Gwendal Roué 734d911416 Fix typo 2023-02-22 06:18:13 +01:00
Gwendal Roué 86bde428bf Make TimestampedRecord a subprotocol of MutablePersistableRecord 2023-02-22 06:13:32 +01:00
Gwendal Roué c5045dbe7a TimestampedRecord.updateChangesWithTimestamp 2023-02-21 22:48:37 +01:00
Gwendal Roué b0d73f3126 EncodableRecord.databaseChanges(modify:) 2023-02-21 22:48:37 +01:00
Gwendal Roué 9e2eb6c599 Enhance TimestampedRecord
In particular, `touch` performs an update on disk, just like the unix command.
2023-02-21 21:42:36 +01:00
Gwendal Roué 3bf73e9f66 TimestampedRecord demo 2023-02-21 08:51:03 +01:00
Gwendal Roué 9bd26a5a1b Improve Modification Timestamp documentation 2023-02-20 13:30:29 +01:00
Gwendal Roué 84f5a91f7b Improve Modification Timestamp documentation 2023-02-20 13:23:36 +01:00
Gwendal Roué c9ae697a44 Remove obsolete documentation about FTS5 2023-02-19 21:30:41 +01:00
Gwendal Roué e76cda27dc Merge branch 'development' 2023-02-19 20:00:51 +01:00
Gwendal Roué 2618c9fa1e v6.7.0 2023-02-19 19:58:05 +01:00
Gwendal Roué 522e4be817 Merge pull request #1336 from groue/dev/FTS5
Enable FTS5 by default
2023-02-19 19:53:37 +01:00
Gwendal Roué ff8b9e5cb8 CHANGELOG 2023-02-19 18:42:08 +01:00
Gwendal Roué 38c9ec29f5 Enable FTS5 by default in CocoaPods 2023-02-19 18:25:16 +01:00
Gwendal Roué 3b0cf1fb0b FTS5 DocC 2023-02-19 17:38:19 +01:00
Gwendal Roué dc4f10ecb0 Remove Xcode warning 2023-02-19 12:10:17 +01:00
Gwendal Roué 012ed8133f Enable FTS5 by default in SPM 2023-02-19 12:10:09 +01:00
Gwendal Roué d0314e0db8 Enable FTS5 by default in GRDB.xcodeproj 2023-02-19 12:03:49 +01:00
Gwendal Roué 850db8f2e9 Fix #1327 2023-02-18 15:11:34 +01:00
Gwendal Roué 44ec63dbe2 Merge pull request #1331 from groue/dev/transactionDate
Transaction Date
2023-02-18 14:42:51 +01:00
Gwendal Roué e9afb04b1e Test that transaction date is reset after a rollback error 2023-02-18 12:19:56 +01:00
Gwendal Roué 72216beacb Enhance wording 2023-02-18 12:06:11 +01:00
Gwendal Roué 6500a97f88 Documentation 2023-02-18 11:58:46 +01:00
Gwendal Roué 3c71a6deea "Record Timestamps and Transaction Date" documentation chapter 2023-02-18 11:52:21 +01:00
Gwendal Roué e4421c509c Improve transactionDate documentation 2023-02-18 10:18:10 +01:00
Gwendal Roué c8339db68b CHANGELOG 2023-02-18 10:17:10 +01:00
Gwendal Roué 961b3a9cad Database.transactionDate must be called from a valid DispatchQueue 2023-02-18 08:31:05 +01:00
Gwendal Roué efa8f0e69d Configuration.transactionClock is experimental as well 2023-02-18 08:31:05 +01:00
Gwendal Roué 93928a791a Tests for Transaction Date 2023-02-18 08:31:05 +01:00
Gwendal Roué f649d9e19e Transaction Date 2023-02-18 08:31:05 +01:00
Gwendal Roué 31350672c7 CHANGELOG 2023-02-17 12:37:28 +01:00
Gwendal Roué 17906dc505 Table SQL interpolation
Addresses https://github.com/groue/GRDB.swift/issues/1332
2023-02-14 08:58:26 +01:00
Gwendal Roué f8f586a98c More BRAG 2023-02-10 10:07:35 +01:00
Gwendal Roué 302fc69f3a TableDefinition.primaryKey(["a", "b"]) is no longer sunsetted
People need it to define the primary key on non-consecutive columns: https://github.com/groue/GRDB.swift/discussions/1326
2023-02-10 08:11:02 +01:00
Gwendal Roué 0045592891 Merge pull request #1328 from ytti/master
Update README.md
2023-02-10 07:58:25 +01:00
ytti 69105e6f80 Update README.md
In SQLCipher passphrase as Data example, fix the use of Data instance
2023-02-09 09:36:03 +02:00
Gwendal Roué aff924a72b Upgrade Swiftlint and fix warnings 2023-02-04 11:23:14 +01:00
Gwendal Roué abaa14db83 Fix typo 2023-01-30 08:41:32 +01:00
Gwendal Roué 9b113fb548 Fix documentation 2023-01-30 08:00:47 +01: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é d3c289a320 Availability checks cleanup 2023-01-22 12:37:40 +01:00
Gwendal Roué c64e9f947b Merge pull request #1320 from baekteun/refactor/availabilityMacOS
UPDATE :: OSX -> macOS in Availability Check
2023-01-22 12:16:20 +01:00
Gwendal Roué 7a790c1f23 Enhance test for StatementArguments initializer from [Any]
Also, this removes a Swift 5.8 warning.
2023-01-20 17:05:58 +01:00
Gwendal Roué bc9190a1dc Document expected deprecation warnings
This addresses #1321
2023-01-17 07:44:49 +01:00
baegteun a9feac1339 ♻️ :: OSX -> macOS in Availability Check 2023-01-17 13:58:37 +09:00
Gwendal Roué 846939d632 Merge pull request #1316 from baekteun/master
✏️ :: replace OSX -> macOS in document
2023-01-16 07:56:52 +01:00
Gwendal Roué ba68e3b02d Merge branch 'development' 2023-01-15 15:30:52 +01:00
Gwendal Roué 59f98ae1fd v6.6.1 2023-01-15 15:30:40 +01:00
Gwendal Roué 590158ca3e Update license for 2023 2023-01-15 15:24:30 +01:00
Gwendal Roué 7d7724c3aa Link to Mastodon account 2023-01-15 15:21:37 +01:00
Gwendal Roué 76a065af6d Merge pull request #1317 from groue/dev/fix-1315
Fix removal of prefetched associations
2023-01-15 15:12:17 +01:00
Gwendal Roué 2976e81a95 Fix failing test for #1315 2023-01-15 13:39:05 +01:00
Gwendal Roué fb547c1a15 Failing test for #1315 2023-01-15 13:27:04 +01:00
Gwendal Roué 38ce06d263 OrderedDictionary.description 2023-01-14 12:33:41 +01:00
Gwendal Roué 3794e7e801 DatabasePromise.description 2023-01-14 12:21:08 +01:00
baegteun 557ad3d3d3 OS X -> macOS in Remake or CHANGELOG.md 2023-01-14 11:43:27 +09:00
baegteun 70a35afad8 OSX -> macOS in CHANGELOG.md 2023-01-14 11:39:13 +09:00
baegteun 4a5713502f OSX.gitignore -> macOS.gitignore 2023-01-14 11:38:02 +09:00
Gwendal Roué c3cc998fc1 Merge branch 'development' 2022-12-29 14:12:13 +01:00
Gwendal Roué 0f0f33d0d1 v6.6.0 2022-12-29 14:06:18 +01:00
Gwendal Roué 0b92c856ae Upgrade demo apps 2022-12-29 14:06:18 +01:00
Gwendal Roué 6e2e1f4889 Update documentation links 2022-12-29 14:06:18 +01:00
Gwendal Roué 0dd17a9a16 Turn ValueObservationScheduler into a protocol 2022-12-29 12:38:06 +01:00
Gwendal Roué 4100b0627f DatabaseCursor DocC 2022-12-18 11:58:03 +01:00
Gwendal Roué c50cfd937e DocC: DatabaseQueue and DatabasePool 2022-12-18 11:45:28 +01:00
Gwendal Roué 3d7170f1bc DocC: Configuration 2022-12-17 10:11:36 +01:00
Gwendal Roué 2c5a86479a DocC: Transactions and Savepoints 2022-12-17 10:11:36 +01:00
Gwendal Roué 119f226610 DocC: GeneratedColumnQualification 2022-12-12 08:42:18 +01:00
Gwendal Roué d2db26d570 Merge pull request #1301 from groue/dev/xcode-14.2
CI Cleanup
2022-12-10 16:50:44 +01:00
Gwendal Roué 82ed41b700 Remove junk from Makefile 2022-12-10 15:17:44 +01:00
Gwendal Roué 639eadbad2 CI: more Xcode 14.1 2022-12-10 14:20:42 +01:00
Gwendal Roué 4ff3221feb CI: explicit iOS and tvOS tests 2022-12-10 14:04:00 +01:00
Gwendal Roué a61a769da9 CI: explicit macOS tests 2022-12-10 13:26:53 +01:00
Gwendal Roué 04bdafd448 Makefile change triggers Github workflow 2022-12-10 13:19:10 +01:00
Gwendal Roué 5fa5e62d0e CHANGELOG 2022-12-10 13:06:39 +01:00
Gwendal Roué 1d5f05351a Merge pull request #1304 from groue/dev/generated-columns
Expose generated columns with availability checks
2022-12-10 13:04:09 +01:00
Gwendal Roué 05da03ab1a Expose generated columns with availability checks 2022-12-10 11:32:23 +01:00
Gwendal Roué 7b63ddf542 Merge branch 'development' 2022-12-05 11:19:16 +01:00
Gwendal Roué 13860219be v6.5.0 2022-12-05 11:18:59 +01:00
Gwendal Roué 4cbf442cc8 Merge pull request #1299 from groue/dev/find
Record.find() convenience methods
2022-11-30 22:48:58 +01:00
Gwendal Roué 2bde3e11bc Tests for find(_🔑) and find(_🆔) 2022-11-30 21:39:44 +01:00
Gwendal Roué 5ab7bfb229 recordNotFound returns an error instead of Never
https://forums.swift.org/t/methods-that-throw-and-return-never/61715
2022-11-30 21:33:15 +01:00
Gwendal Roué 520766a74e CHANGELOG 2022-11-30 20:07:42 +01:00
Gwendal Roué 6c16a9a4e5 Document the find method 2022-11-30 20:02:24 +01:00
Gwendal Roué 726022d5a5 Support for legacy urls 2022-11-30 19:52:55 +01:00
Gwendal Roué 4a4ff9950c FetchableRecord.find() methods 2022-11-30 19:36:25 +01:00
Gwendal Roué afc578db7f TableRecord.recordNotFound() methods 2022-11-30 19:36:08 +01:00
Gwendal Roué df3bd46346 Rename PersistenceError to RecordError 2022-11-30 19:11:07 +01:00
Gwendal Roué 08ec50f44b Enhance documentation for explicit rowid support 2022-11-28 21:09:48 +01:00
Gwendal Roué 156ed53588 Remove obsolete documentation comment 2022-11-28 21:05:30 +01:00
Gwendal Roué f9cfadce78 CHANGELOG 2022-11-28 20:57:48 +01:00
Gwendal Roué 2269a82479 CHANGELOG 2022-11-28 18:43:26 +01:00
Gwendal Roué 8330469ac3 Merge branch 'development' 2022-11-28 17:14:48 +01:00
Gwendal Roué 72f56a1b03 v6.4.0 2022-11-28 13:29:23 +01:00
Gwendal Roué cbd05c9037 Fix documentation link 2022-11-28 13:28:35 +01:00
Gwendal Roué a27c34e635 CHANGELOG 2022-11-28 13:19:56 +01:00
Gwendal Roué 35019f7a36 Merge pull request #1297 from groue/experimental/expose-CSQLite
SPM: expose the CSQLite product
2022-11-28 11:40:28 +01:00
Gwendal Roué 69e4706549 Expose CSQLite as a SPM product 2022-11-28 10:37:39 +01:00
Gwendal Roué 65bd4d90c2 Enhance DatabaseRegionObservation documentation 2022-11-28 08:36:30 +01:00
Gwendal Roué 7343912ac3 Fix broken links 2022-11-28 08:31:45 +01:00
Gwendal Roué 409bd3bb26 Move Database Observation documentation to DocC 2022-11-28 08:27:12 +01:00
Gwendal Roué fed4833764 Move DatabaseRegionObservation documentation to DocC 2022-11-27 18:45:48 +01:00
Gwendal Roué e3cc15707a Move ValueObservation documentation to DocC 2022-11-27 18:27:26 +01:00
Gwendal Roué 5302b98a15 http -> https 2022-11-27 15:12:57 +01:00
Gwendal Roué ef019bb9da CHANGELOG 2022-11-27 15:05:45 +01:00
Gwendal Roué 35e60f2b97 Precision 2022-11-27 14:48:43 +01:00
Gwendal Roué 2e2b79a3a9 The technique for exposing rowids to record types has moved to DocC 2022-11-27 14:29:14 +01:00
Gwendal Roué 7bd1992e61 Fix ergonomics issue with the definition of compound primary key
If the user would forget the PrimaryKeyDefinition, the primary was not defined:

try db.create(table: "membership") { t in
    // WRONG: pk is unused
    t.primaryKey { pk in
        t.column("playerId", .integer)
        t.column("teamId", .text)
    }
}

The fix is to remove the PrimaryKeyDefinition:

try db.create(table: "membership") { t in
    t.primaryKey {
        t.column("playerId", .integer)
        t.column("teamId", .text)
    }
}
2022-11-27 14:09:25 +01:00
Gwendal Roué f8728bbed8 Enhance documentation 2022-11-27 13:01:42 +01:00
Gwendal Roué f774aa7c07 Fix tests for named in-memory database 2022-11-27 12:46:59 +01:00
Gwendal Roué 7a9b8093ed Fix Swiftlint warnings 2022-11-27 12:46:23 +01:00
Gwendal Roué c7df15faf5 CHANGELOG 2022-11-27 12:41:00 +01:00
Gwendal Roué f5ebf0de4d Use primary key definitions with NOT NULL constraint by default 2022-11-27 12:35:47 +01:00
Gwendal Roué cd16e921fe Tests for primary key definition with NOT NULL constraint by default 2022-11-27 11:47:56 +01:00
Gwendal Roué 8b8e480391 Primary key definition with NOT NULL constraint by default 2022-11-27 11:32:38 +01:00
Gwendal Roué 3074b61cb7 Move schema documentation to DocC 2022-11-27 11:07:13 +01:00
Gwendal Roué d91e6c2db6 Add schema recommendations to DatabaseSchema.md 2022-11-26 17:09:58 +01:00
Gwendal Roué a0bfbafd9c Add tests for MutablePersistableRecord on tables without explicit primary key 2022-11-26 16:27:27 +01:00
Gwendal Roué 4e4699ebed Improve inline documentation 2022-11-26 16:26:46 +01:00
Gwendal Roué 6295f4609e More precise WALSnapshot creation errors 2022-11-25 08:31:47 +01:00
Gwendal Roué e430b4ebd7 DatabaseSnapshotReader reentrant read is not unsafe 2022-11-25 08:15:14 +01:00
Gwendal Roué 4ff8928dc4 Simplify declaration of ValueObservation factory methods (SE-0267) 2022-11-23 19:46:00 +01:00
Gwendal Roué 10596e17bf Cleanup snapshot configurations 2022-11-23 19:42:12 +01:00
Gwendal Roué 392e9e447d Shared in-memory databases 2022-11-23 18:32:57 +01:00
Gwendal Roué e8f1e76958 Enhance documentation 2022-11-18 17:45:51 +01:00
Gwendal Roué 131f414a75 Enhance DatabaseSchema.md 2022-11-18 13:49:28 +01:00
Gwendal Roué d4cefc984f Update documentation index 2022-11-18 13:33:28 +01:00
Gwendal Roué 2dce8d533e Project organization 2022-11-18 13:33:28 +01:00
Gwendal Roué dc43607921 Cleanup 2022-11-18 13:33:28 +01:00
Gwendal Roué 0ba3dff901 Rewrite availability check for WAL snapshots
Also, enable WAL snapshots with SQLCipher, if SQLITE_ENABLE_SNAPSHOT is set.
2022-11-18 13:33:28 +01:00
Gwendal Roué fcf8ac43b7 Delete obsolete comment 2022-11-18 12:41:15 +01:00
Gwendal Roué 9b4d76ca37 Robustness: DatabaseSnapshotPool discards connections that have lost the snapshot 2022-11-18 08:53:39 +01:00
Gwendal Roué 9b663e3bcc Pool can discard elements after use 2022-11-18 08:52:52 +01:00
Gwendal Roué 847386860f Fix test compilation on Xcode 14
Grrr
2022-11-17 22:48:13 +01:00
Gwendal Roué 8a42c11624 DatabaseSnapshotPool documentation 2022-11-17 22:38:41 +01:00
Gwendal Roué e4c5cc3451 Test that DatabaseSnapshotPool can be used from ValueObservation 2022-11-17 22:04:06 +01:00
Gwendal Roué 79d4db7827 More DatabaseSnapshotPool tests 2022-11-17 21:56:01 +01:00
Gwendal Roué b1770e89b7 Introduce DatabaseSnapshotReader 2022-11-17 20:11:58 +01:00
Gwendal Roué 12d656d3a1 Let SQLite check if DatabaseSnapshotPool can be created 2022-11-17 20:01:17 +01:00
Gwendal Roué 0bc49460d7 DatabaseSnapshotPool uses its own pool of connections
In the previous implementation, the snapshot pool would use the same reader connections as the database pool. This would create problem with reentrant reads. Let's make things simple, and not share any database connection.
2022-11-17 18:36:17 +01:00
Gwendal Roué 2743ded335 Merge pull request #1293 from groue/experimental/WALSnapshotToken
Enable concurrent reads from a WAL snapshot
2022-11-14 20:53:26 +01:00
Gwendal Roué e129df15db Fix tests for Xcode 14.0 2022-11-14 19:29:17 +01:00
Gwendal Roué c4c0b1ce90 Test and fix unsafe and async DatabaseSnapshotPool 2022-11-14 19:10:52 +01:00
Gwendal Roué 9ac8c0703d Remove dead code 2022-11-14 19:02:10 +01:00
Gwendal Roué 433ed36a4b More documentation about transactions 2022-11-14 18:51:39 +01:00
Gwendal Roué c23b93d71b Document that reentrant database accesses use the current database connection when possible 2022-11-14 18:38:33 +01:00
Gwendal Roué b8bc8273a9 Turn snapshot tokens into a proper reader: DatabaseSnapshotPool 2022-11-14 18:22:13 +01:00
Gwendal Roué bcb70855d5 Enhance WALSnapshotToken documentation 2022-11-14 10:42:09 +01:00
Gwendal Roué eaf8dc239a Simplify WALSnapshotToken creation 2022-11-14 10:39:48 +01:00
Gwendal Roué 6864e6b2fb Enhance registerAccess(to:) documentation 2022-11-14 08:47:58 +01:00
Gwendal Roué 4b21704258 CHANGELOG 2022-11-13 18:35:59 +01:00
Gwendal Roué a71eb3d662 Introduce WALSnapshotToken 2022-11-13 18:28:54 +01:00
Gwendal Roué dffe56f8a9 Simplify ValueReducer definition 2022-11-13 18:09:06 +01:00
Gwendal Roué 4871304c60 Enable WALSnapshot on macOS (Xcode 14.1+) 2022-11-13 15:29:44 +01:00
Gwendal Roué a6f9b1c4b7 CHANGELOG 2022-11-13 10:55:31 +01:00
Gwendal Roué cbac0e7286 Enhance Configuration.threadingMode documentation 2022-11-13 10:54:40 +01:00
Gwendal Roué 997d6cb677 DatabaseSnapshot does not require the WAL mode
One can create a snapshot from a read-only pool on a non-WAL database, and that's OK. The snaphost still sees an unchanging database content (but other connections can't write).
2022-11-13 10:54:40 +01:00
Gwendal Roué 51230834c8 Configuration.maximumReaderCount can be queried
This is useful for tools that adapt their own inner scheduling to the actual capacity for concurrent reads.
2022-11-13 10:54:40 +01:00
Gwendal Roué 638e586dbc Expose Database.registerAccess(to:)
This helps tools that intend to declare an observed region without directly accessing it. This will be necessary for (future) snapshot-based observations that postpone actual database access.
2022-11-13 10:54:40 +01:00
Gwendal Roué 6dc4d50e00 Expose Configuration.readQoS and writeQoS
This helps tools that perform their own asynchronous jobs that depend on database scheduling. By using the same QoS as the database, they won't create priority inversion or similar scheduling misuses.
2022-11-12 11:55:37 +01:00
Gwendal Roué 5d50e396c1 Enhance Configuration documentation 2022-11-12 11:55:37 +01:00
Gwendal Roué 981d42aed6 Execute SPM tests in parallel 2022-11-12 11:55:37 +01:00
Gwendal Roué 8ffceb49c8 Document SPI_BUILDER 2022-11-11 15:14:59 +01:00
Gwendal Roué b14ef2112c Fix documentation typo 2022-11-11 12:55:35 +01:00
Gwendal Roué 2d31ed4618 Merge branch 'development' 2022-11-11 11:34:48 +01:00
Gwendal Roué 5e7b604ecd v6.3.1 2022-11-11 11:34:02 +01:00
Gwendal Roué 90ec3c188b Host documentation on SPI 2022-11-11 11:34:02 +01:00
Gwendal Roué 1625bc83f8 Documentation organization 2022-11-11 11:34:02 +01:00
Gwendal Roué be9740b5f6 Discourage usage of reentrant by linking to the related doc 2022-11-10 08:50:41 +01:00
Gwendal Roué f914fe73ff DocC Concurrency Resources 2022-11-10 08:34:54 +01:00
Gwendal Roué 57b07515c7 Rename GRDB_DOCC_PLUGIN to SPI_BUILDER
This addresses https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/issues/2122#issuecomment-1305649066
2022-11-09 21:56:19 +01:00
Gwendal Roué 9d03c1ae61 DocC: Single-Row Tables 2022-11-09 21:54:17 +01:00
Gwendal Roué 3014ddb00a Enhance Documentation 2022-11-09 21:52:22 +01:00
Gwendal Roué 85b2e113b2 Relocate DatabaseSnapshot documentation 2022-11-09 17:16:03 +01:00
Gwendal Roué c5a0598cea DocC: Concurrency Guides 2022-11-09 13:22:53 +01:00
Gwendal Roué 5242fe10f6 Enhance Documentation 2022-11-09 13:22:53 +01:00
Gwendal Roué 71880a9b8e Enhance Documentation 2022-11-09 13:20:08 +01:00
Gwendal Roué 14fb1945be Fix documentation 2022-11-08 22:57:48 +01:00
Gwendal Roué 33cdf6f270 Extract <doc:DatabaseSchema> 2022-11-08 19:28:13 +01:00
Gwendal Roué ca079cab17 TODO 2022-11-08 19:28:09 +01:00
Gwendal Roué 0873474a17 DocC: SQL 2022-11-08 18:22:03 +01:00
Gwendal Roué bfe2450da5 Fix typo 2022-11-08 08:53:59 +01:00
Gwendal Roué 19b0b6af3e http -> https 2022-11-08 08:45:37 +01:00
Gwendal Roué cdf480ef1f Migrations guide cleanup 2022-11-08 08:41:10 +01:00
Gwendal Roué da3059f0a8 fix typos and wordings 2022-11-08 05:43:09 +01:00
Gwendal Roué 754ced7b5e Enhance DocC output for ForeignKeyViolation 2022-11-07 22:50:50 +01:00
Gwendal Roué fb81ec6792 Migrations Guide in now a DocC article 2022-11-07 22:44:37 +01:00
Gwendal Roué 1be868c4b0 Fix documentation typo 2022-11-07 09:16:50 +01:00
Gwendal Roué 4dda8d7650 Host DocC on Github pages
SPI will be up soon, but we have to fix the dead links currently published on the master branch

https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/discussions/2120
2022-11-07 08:14:39 +01:00
Gwendal Roué 16fe4331f2 make doc generates DocC for hosting on Github pages
Example: http://groue.github.io/GRDB.swift/docs/6.3/documentation/grdb
2022-11-07 08:14:39 +01:00
Gwendal Roué 5ff2ad9e71 Merge branch 'development' 2022-11-06 20:47:53 +01:00
Gwendal Roué f5259af512 v6.3.0 2022-11-06 20:47:03 +01:00
Gwendal Roué 2dd2d2db35 Makefile no longer needs to be updated on each release 2022-11-06 20:46:53 +01:00
Gwendal Roué 9fd3e822e5 More links to future SPI-hosted pages 2022-11-06 20:45:48 +01:00
Gwendal Roué edbfc7749c Merge pull request #1291 from groue/dev/DocC
DocC inline documentation
2022-11-06 20:36:46 +01:00
Gwendal Roué 2aa7e3c79f Makefile: support for Xcode 14.1 2022-11-06 19:42:49 +01:00
Gwendal Roué 3592db997a Makefile: allow disabling min iOS destination 2022-11-06 19:05:38 +01:00
Gwendal Roué 4307f6a680 Fix Swiftlint warnings 2022-11-06 18:43:00 +01:00
Gwendal Roué b7b83a965b Update the Swift Package Index manifest file 2022-11-06 18:11:18 +01:00
Gwendal Roué fcfecc5a73 Update Release Process 2022-11-06 18:09:49 +01:00
Gwendal Roué 39a76ff929 Links to future SPI-hosted pages 2022-11-06 18:09:09 +01:00
Gwendal Roué aef2d087ae CHANGELOG 2022-11-06 17:50:40 +01:00
Gwendal Roué 0b12e89e62 DocC: AssociationAggregate 2022-11-06 17:18:27 +01:00
Gwendal Roué 0379947ab1 Rename DocC article about SQL 2022-11-06 16:57:27 +01:00
Gwendal Roué 2e5cf546c6 DocC: RowAdapter 2022-11-06 16:45:13 +01:00
Gwendal Roué 0c011b970b Add missing experimental notices 2022-11-06 16:31:12 +01:00
Gwendal Roué a08a86cc76 Update CONTRIBUTING.md 2022-11-06 16:24:34 +01:00
Gwendal Roué 29a21302a2 Generate documentation in ~/Sites/GRDB 2022-11-06 16:02:36 +01:00
Gwendal Roué 13c804d1cc DocC 2022-11-06 16:02:36 +01:00
Gwendal Roué 811d287bd9 Row.withUnsafeData 2022-11-06 16:02:36 +01:00
Gwendal Roué 1818534513 DocC 2022-11-06 16:02:36 +01:00
Gwendal Roué 8d316dc969 Test insertAndFetch with IGNORE policy 2022-11-06 16:02:36 +01:00
Gwendal Roué 38e7e649c7 Upgrade GRDBPerformance dependencies 2022-10-29 17:10:16 +02:00
Gwendal Roué 3df9e8e5c1 Merge branch 'development' 2022-10-29 16:49:28 +02:00
Gwendal Roué c98d918bf6 v6.2.0 2022-10-29 15:36:01 +02:00
Gwendal Roué c197e2f520 Don't run unicode61 tokenizer categories tests before SQLite 3.25.0 2022-10-29 15:04:09 +02:00
Gwendal Roué 13b3f1d741 Github workflow: use Xcode 14.0.1 2022-10-29 14:35:54 +02:00
Gwendal Roué ad011a0974 CHANGELOG 2022-10-29 14:21:33 +02:00
Gwendal Roué a89dad2554 Fix Swiftlint warnings 2022-10-29 14:21:33 +02:00
Gwendal Roué 4f4553f4f0 Regression tests for tokenizer arguments quoting 2022-10-29 14:21:33 +02:00
Gwendal Roué 9b505bb34b Fix quoting of FTS5 tokenizer arguments
Tokenizer arguments only need to be quoted ("foo" -> "'foo'") when we generate SQL for a tokenizer. They must not be quoted when we instantiate a tokenizer with the fts5_tokenizer.xCreate function.

This commit fixes tokenizer instantiation by not quoting arguments when we call the fts5_tokenizer.xCreate function.

Before this fix, the FTS5Tokenizer.tokenize(query:) method would return incorrect tokens.
2022-10-29 14:21:33 +02:00
Gwendal Roué 6c841bf96e Merge pull request #1289 from idkclub/categories
Add support for passing in categories to the unicode61 tokenizer
2022-10-29 14:08:47 +02:00
Jon 76b05369ff Add support for passing in categories to the unicode61 tokenizer 2022-10-21 16:21:07 -04:00
Gwendal Roué e79b6a5622 Fix typo 2022-10-21 08:50:01 +02:00
Gwendal Roué 13e1f4d7c2 Merge branch 'development' 2022-10-20 14:08:36 +02:00
Gwendal Roué 8aaf1af9f0 v6.1.0 2022-10-20 13:23:37 +02:00
Gwendal Roué 3b10e1df41 CHANGELOG 2022-10-20 13:19:54 +02:00
Gwendal Roué 6caa27cb20 Merge pull request #1288 from jcavar/feature/strict-support
Add support for .strict table option in 3.37+
2022-10-20 13:00:07 +02:00
Gwendal Roué 6ca3bb051a make smokeTest checks SQLCipher 3
It's better to quickly catch failures to support SQLCipher 3.
2022-10-20 08:49:48 +02:00
Gwendal Roué 901d010ab3 Restore the test that strict tables won't accept ill-typed values. 2022-10-20 08:46:49 +02:00
Gwendal Roué 3c4ff5b26e Single test for strict tables
Also, skip the test for old SQLCipher version.
2022-10-20 08:46:49 +02:00
Gwendal Roué 2ade133b50 Move availability check below doc comment 2022-10-20 08:27:46 +02:00
Josip Cavar c57e76be52 Add support for .strict table option in 3.37+ 2022-10-19 15:55:46 +02:00
Gwendal Roué 9531a7f8fc More specialization 2022-09-17 15:49:28 +02:00
Gwendal Roué 9e3eebf4c2 Merge pull request #1279 from daveverwer/add-spi-documentation
Added an external documentation link for the Swift Package Index
2022-09-17 12:46:35 +02:00
Gwendal Roué 1221cb703a Update link to documentation 2022-09-17 12:45:55 +02:00
Dave Verwer 59b40de83e Added a Swift Package Index manifest with an external documentation link. 2022-09-14 12:15:46 +01:00
Gwendal Roué 0ac435744a Merge branch 'development' 2022-09-09 11:50:22 +02:00
Gwendal Roué 589e53b231 v6.0.0 2022-09-09 11:40:39 +02:00
Gwendal Roué 125f112fb7 CHANGELOG 2022-09-09 11:34:58 +02:00
Gwendal Roué c6aa323cd8 Skip flaky test 2022-09-09 09:50:25 +02:00
Gwendal Roué 1c7b618a89 Parallelizable tests 2022-09-09 09:33:57 +02:00
Gwendal Roué d3ad7acd59 No WALSnapshot on macOS and macOS Catalyst
Fix #1276
2022-09-09 08:16:55 +02:00
Gwendal Roué 82b4d90a82 Xcode 14 RC doesn't ship with the Swift 5.6 stdlib
https://forums.swift.org/t/xcode-14-rc-cannot-specialize-protocol-type/60171
2022-09-09 08:16:55 +02:00
Gwendal Roué 2a3318ef9a ALTER TABLE DROP COLUMN is properly reported with SQLITE_ALTER_TABLE for SQLite 3.38+ 2022-09-07 08:51:05 +02:00
Gwendal Roué f2c46784a6 ArrayRowImpl is checked Sendable 2022-09-07 08:50:32 +02:00
Gwendal Roué 9340fdc7c2 DatabaseValue.Storage is checked Sendable 2022-09-07 08:02:34 +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é 30234fde62 CHANGELOG 2022-09-06 08:54:29 +02:00
Gwendal Roué fdbcb07452 Fix #1275 2022-09-06 08:25:21 +02:00
Gwendal Roué dced16bdce Update SQLiteCustom to v3.39.3 2022-09-05 20:43:51 +02:00
Gwendal Roué 849be02906 Remove useless Xcode requirements in documentation
GRDB 6 requires Xcode 14+, Swift concurrency is always available.
2022-09-05 20:32:50 +02:00
Gwendal Roué b3f5b892a6 CHANGELOG 2022-09-05 08:46:05 +02:00
Gwendal Roué 65efc413fe Fix for failing test for #1274
https://github.com/groue/GRDB.swift/discussions/1274
2022-09-05 08:43:43 +02:00
Gwendal Roué f3b8b7221c Failing test for #1274
https://github.com/groue/GRDB.swift/discussions/1274
2022-09-05 08:42:29 +02:00
Gwendal Roué f04a02731d Add defaultLocalization to GRDB package
This solves the "manifest property 'defaultLocalization' not set; it is required in the presence of localized resources" error
2022-09-04 14:09:35 +02:00
Gwendal Roué 6add38e3e5 BREAKING: Allow ValueObservation to perform different kinds of fetch
We're interested in allowing observations to build values based on snapshots
2022-09-04 12:06:17 +02:00
Gwendal Roué 202b3e5620 Encapsulate ValueObservation database accesses
Also, enhance Database.isolated(readOnly:) by not creating a savepoint if the database is already inside a transaction.
2022-09-04 10:11:22 +02:00
Gwendal Roué 49cce0aa8a CHANGELOG 2022-08-29 14:22:04 +02:00
Gwendal Roué ccf3486827 CHANGELOG 2022-08-29 14:21:01 +02:00
Gwendal Roué cb93979a44 Update CONTRIBUTING.md
It needed to be updated for cross-platform targets
2022-08-28 14:52:31 +02:00
Gwendal Roué 628ac58535 Merge branch 'development' 2022-08-28 13:45:17 +02:00
Gwendal Roué 373f95a6cb v6.0.0-beta.4 2022-08-28 13:44:35 +02:00
Gwendal Roué f2859ff8bf Use SQLITE_OPEN_EXRESCODE when available 2022-08-28 12:50:47 +02:00
Gwendal Roué e2b412afc8 Merge branch 'dev/TableInfo' into development 2022-08-28 12:49:59 +02:00
Gwendal Roué 040e5d9d87 WITHOUT ROWID check: prefer PRAGMA table_list when available
This avoids the undesired errors described in #945.
2022-08-28 12:28:39 +02:00
Gwendal Roué 189430c1fe PRAGMA table_list 2022-08-28 12:28:39 +02:00
Gwendal Roué 3d77a8da86 Update the manual installation documentation 2022-08-28 09:59:52 +02:00
Gwendal Roué c40256600a Update playgrounds doc 2022-08-28 09:49:34 +02:00
Gwendal Roué b617f432c0 Merge branch 'dev/cross-platform-targets' into development 2022-08-27 14:43:33 +02:00
Gwendal Roué 72ef13f4fb CHANGELOG 2022-08-27 14:43:06 +02:00
Gwendal Roué 535f44c463 Update the GRDB6 migration guide 2022-08-27 14:42:57 +02:00
Gwendal Roué 4c10899a3c Single Cross-Platform Target 2022-08-27 13:43:44 +02:00
Gwendal Roué 524ee1d098 Merge pull request #1271 from groue/dev/SQLite-3.39.2
Bump custom SQLite builds v3.39.2
2022-08-27 12:27:56 +02:00
Gwendal Roué 973b679baa CHANGELOG 2022-08-27 12:27:14 +02:00
Gwendal Roué 0321c79c2d Update SQLiteCustom to v3.39.2 2022-08-27 12:16:59 +02:00
Gwendal Roué e82a03615f Merge branch 'development' 2022-08-25 19:11:29 +02:00
Gwendal Roué 51c9071b3d v6.0.0-beta.3 2022-08-25 19:11:20 +02:00
Gwendal Roué 91e5f838d3 Merge branch 'dev/GRDB6-singleton-record' into development 2022-08-25 19:10:09 +02:00
Gwendal Roué d026232cbf CHANGELOG 2022-08-25 19:09:51 +02:00
Gwendal Roué c2e4aaf51d Throw SQLITE_MISUSE in case of programmer error in the aroundXxx callbacks
While writing SingletonRecordTest.swift, I tried the solution below, in order to turn a failed update into an insert:

    func aroundUpdate(_ db: Database, columns: Set<String>, update: () throws -> PersistenceSuccess) throws {
        do {
            _ = try update()
        } catch {
            insert(db)
        }
    }

But this can't work. This `insert(db)` is unable to provide the information we need in `update()`: the result of the eventual RETURNING clause, and the PersistenceSuccess that contains the persisted PersistenceContainer.

So we now detect two misuses: 1) not calling the action method, and 2) not rethrowing the error of the action method.
2022-08-25 19:05:27 +02:00
Gwendal Roué 05b81df614 Update the migration guide with the actions to perform on customized records 2022-08-25 19:05:27 +02:00
Gwendal Roué 3e4b04d4d1 Test the "Single-Row Tables" guide 2022-08-25 19:05:27 +02:00
Gwendal Roué 56cdaabd9c Update the "Single-Row Tables" guide 2022-08-25 19:05:27 +02:00
Gwendal Roué c65a19c50f Merge pull request #1268 from groue/dev/issue-1267
Fix SQL generation of CHECK constraints.
2022-08-25 08:31:53 +02:00
Gwendal Roué 5247a1537c CHANGELOG 2022-08-25 08:31:20 +02:00
Gwendal Roué 58f970701f BREAKING: Fix failing test for #1267
The regression was probably due to a bad interaction between Implicitly Opened Existentials (SE-0352) and Opaque Parameter Declarations (SE-0341) which GRDB 6 now uses in a lot of places.

Considering the sample code below:

    try db.create(table: ...) { t in
      t.column(...).check { $0 != Column(...) }
    }

- The `check` method accepts a closure that returns `any SQLExpressible` (the same as GRDB 5)
- The `!=` SQL comparison operator is `(some SQLSpecificExpressible, some SQLSpecificExpressible) -> SQLExpression`, when it was `(SQLSpecificExpressible, SQLSpecificExpressible) -> SQLExpression` in GRDB 5

The compiler has started preferring interpreting the != operator as Column's Equatable implementation, instead of the `!=` SQL comparison operator

We force the compiler to use the SQL comparison operator by removing the Equatable conformance from Column. It was introduced in a70b42c, as a support for a feature that has been removed since then.

This is a breaking change, but this also is an improvement. Now `column1 != column2` has a single meaning, and the library is less prone to similar regressions in the future.
2022-08-25 08:26:37 +02:00
Gwendal Roué 980f5247f0 Failing test for #1267 2022-08-25 08:12:32 +02:00
Gwendal Roué d70032c483 Merge branch 'development' 2022-08-23 22:17:06 +02:00
Gwendal Roué 14321e411c v6.0.0-beta.2 2022-08-23 22:16:37 +02:00
Gwendal Roué d3d2ad1b91 Merge branch 'dev/upsert-documentation' into development 2022-08-23 22:10:33 +02:00
Gwendal Roué 55f3c2f510 CHANGELOG 2022-08-23 22:05:23 +02:00
Gwendal Roué ffa183821c UPSERT documentation 2022-08-23 22:05:23 +02:00
Gwendal Roué 327911d057 Upsert: add support for conflict target and assignments 2022-08-23 20:02:17 +02: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é 2a5626efea Replace if let x = x with if let x 2022-08-22 20:40:00 +02:00
Gwendal Roué 6bf346ccf5 Merge branch 'development' 2022-08-21 21:57:30 +02:00
Gwendal Roué 1036dd4d6e v6.0.0-beta 2022-08-21 21:56:51 +02:00
Gwendal Roué 48f14c7a8c Merge pull request #1221 from groue/GRDB6/development
GRDB 6
2022-08-21 21:44:19 +02:00
Gwendal Roué 2789444acd Enable UPSERT and RETURNING with SQLCipher 2022-08-21 21:22:34 +02:00
Gwendal Roué 8f8b273424 CHANGELOG organization 2022-08-21 21:22:34 +02:00
Gwendal Roué 37f0a0bb9a BREAKING: throwing EncodableRecord.encode(to:) 2022-08-21 21:22:34 +02:00
Gwendal Roué d2dd18b3e5 Remove note and warning icons
Those are handled by Github now:
https://github.com/community/community/discussions/16925
2022-08-21 21:22:34 +02:00
Gwendal Roué 422e0ae85a BREAKING: Handles both commits and rollbacks
Replace afterNextTransactionCommit(_:) with afterNextTransaction(onCommit:onRollback:)
2022-08-21 21:22:34 +02:00
Gwendal Roué 8f562d3e11 NEW: Upsert 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é 0ed9367b26 BREAKING: DatabaseCursor no longer exposes its prepared statement 2022-08-21 21:22:34 +02:00
Gwendal Roué eda403bd31 StatementArguments is Hashable 2022-08-21 21:22:34 +02:00
Gwendal Roué c553d2d69e Documentation 2022-08-21 21:22:34 +02:00
Gwendal Roué 5243db7fbc Spelling 2022-08-21 21:22:34 +02:00
Gwendal Roué 4ced8c78e7 Less "iff" (some people think this is a typo)
iff = if and only if
2022-08-21 21:22:34 +02:00
Gwendal Roué c38d903f4d Make RequestProtocols.swift easier to read 2022-08-21 21:22:34 +02:00
Gwendal Roué 1239c14e6d Explicit initializers for HasOneThrough and HasManyThrough associations 2022-08-21 21:22:34 +02:00
Gwendal Roué 5004994344 TODO 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é 546bba17fb Make LockedBox.swift easier to read 2022-08-21 21:22:34 +02:00
Gwendal Roué 27b65c9a80 BREAKING: Starting DatabaseRegionObservation returns a cancellable 2022-08-21 21:22:34 +02:00
Gwendal Roué 1bfba945d3 Fix invalid Swift syntax in documentation 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é 84940af3dc Cleanup statement separator character set 2022-08-21 21:22:34 +02:00
Gwendal Roué e0786537db BREAKING: replace Int32 with CInt everywhere it is possible 2022-08-21 21:22:34 +02:00
Gwendal Roué 496c2ae359 Make Database+Statements.swift easier to read 2022-08-21 21:22:34 +02:00
Gwendal Roué 5b7c58faf4 Make Database+Schema.swift easier to read 2022-08-21 21:22:34 +02:00
Gwendal Roué 0658808028 Make Database.swift easier to read
Enhance documentation, and rename some types and variables.
2022-08-21 21:22:34 +02:00
Gwendal Roué fb6ea57d74 Don’t setup database observation in read-only connections.
Observation of read-only connections has turned useless since read-only transactions are no longer reported to TransactionObserver, in #1213
2022-08-21 21:22:34 +02:00
Gwendal Roué 0879311646 Make TransactionObserver.swift easier to read
Add some documentation, and rename some types and variables.
2022-08-21 21:22:34 +02:00
Gwendal Roué 2f2cccacf9 Remove UI tests of demo apps, since GRDBQuery is tested on its own
(Don't test the framework)
2022-08-21 21:22:34 +02:00
Gwendal Roué e5d10ed8c1 fix async AppDatabaseTests tests 2022-08-21 21:22:34 +02:00
Gwendal Roué 070ee2c796 Makefile: disable -warn-concurrency and -enable-actor-data-race-checks
This creates issues with Xcode 14 beta 4
2022-08-21 21:22:34 +02:00
Gwendal Roué 9a9406a69d SE-0353: Constrained Existential Types
https://github.com/apple/swift-evolution/blob/main/proposals/0353-constrained-existential-types.md
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é 36892fee55 BREAKING: Bump minimum SQLite version to 3.19.3 2022-08-21 21:22:34 +02:00
Gwendal Roué 49a66e197b Foster some FetchRequest<...> in the documentation 2022-08-21 21:22:34 +02:00
Gwendal Roué 80ec31f588 BREAKING: remove DerivableRequest.limit(_:offset:) 2022-08-21 21:22:34 +02:00
Gwendal Roué c26ed6c280 NEW: throw decoding errors 2022-08-21 21:22:34 +02:00
Gwendal Roué eb98541923 Documentation 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é 927fc21f00 NEW: ValueObservation.map accepts a throwing closure
This will allow us to call a throwing FetchableRecord.init(row:) from this operator
2022-08-21 21:22:34 +02:00
Gwendal Roué a15f731042 BREAKING: remove Record.copy()
This will allow FetchableRecord.init(row:) to throw
2022-08-21 21:22:34 +02:00
Gwendal Roué 3000cd3c7f TODO 2022-08-21 21:22:34 +02:00
Gwendal Roué 2011776cbe Remove misleading comments 2022-08-21 21:22:34 +02:00
Gwendal Roué 33a039717c Refer to UIApplication notifications by their names
It looks like FB9801372 was fixed
2022-08-21 21:22:34 +02:00
Gwendal Roué a20d543bcf Swiftlint: disable the for_where rule 2022-08-21 21:22:34 +02:00
Gwendal Roué 55445dcc7c NEW: RangeReplaceableCollection.append(contentsOf: cursor) 2022-08-21 21:22:34 +02:00
Gwendal Roué 34a4fa6444 TODO 2022-08-21 21:22:34 +02:00
Gwendal Roué dba7f1b2dc BREAKING: turn Cursor.isEmpty into a property
https://github.com/apple/swift-evolution/blob/main/proposals/0310-effectful-readonly-properties.md
2022-08-21 21:22:34 +02:00
Gwendal Roué 180c8975ac Stop using #filePath 2022-08-21 21:22:34 +02:00
Gwendal Roué 11a6d53d8a SE-0326: closure result type inference
https://github.com/apple/swift-evolution/blob/main/proposals/0326-extending-multi-statement-closure-inference.md
2022-08-21 21:22:34 +02:00
Gwendal Roué 42987dd849 Cleanup filter(rawKeys:) 2022-08-21 21:22:34 +02:00
Gwendal Roué 7ffc332327 BREAKING: replace selectID() with selectPrimaryKey(as:)
Since Optional is a database value like others, selectID would be a request of optionals for records with an optional ID type:

    struct Player: Identifiable, MutablePersistableRecord {
        var id: Int64?
    }

    Player.selectID() // QueryInterface<Int64?>

This is not good, because primary keys are not null. And those requests would fetch impractical types such as [Int64?], Set<Int64?>, Int64??.

Instead, we introduce selectPrimaryKey(as:), which allows the user to provide the desired type.

    Player.selectPrimaryKey(as: Int64.self) // QueryInterface<Int64>
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
Gwendal Roué c0c6b34869 SE-0346: primary associated types 2022-08-21 21:22:34 +02:00
Gwendal Roué dd55175978 SE-0345: if let x { }
https://github.com/apple/swift-evolution/blob/main/proposals/0345-if-let-shorthand.md
2022-08-21 21:22:34 +02:00
Gwendal Roué 58293befc9 BREAKING: Optional is a database value like others 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é 6f0d45eedb BREAKING: throwing DatabaseWriter.barrierWriteWithoutTransaction
It used to be rethrowing, but it was then unable to deal with closed databases.

The async version is modified accordingly: it accepts a Result<Database, Error>, instead of a raw Database.

DatabaseMigrator.asyncMigrate is impacted as well: it accepts a Result<Database, Error>, instead of a (Database, Error?) tuple.
2022-08-21 19:21:57 +02:00
Gwendal Roué fe225fe452 BREAKING: Remove deprecated methods 2022-08-21 19:21:57 +02:00
Gwendal Roué 78b9c543a3 Swift 5.7 required: SPM testing convenience
Make it possible to test SQLITE_ENABLE_FTS5 and SQLITE_ENABLE_PREUPDATE_HOOK with `make test_SPM`.

This is very handy because Xcode 14 beta 3 has difficulties testing GRDBCustom.
2022-08-21 19:21:57 +02:00
Gwendal Roué 86de843bda Swift 5.7 required: Xcode 14 updates 2022-08-21 19:21:57 +02:00
Gwendal Roué 20dcab75c7 Swift 5.7 required: SPM resources 2022-08-21 19:21:57 +02:00
Gwendal Roué 23cbf13af0 Swift 5.7 required: Availability checks 2022-08-21 19:21:57 +02:00
Gwendal Roué 6da7d47394 Swift 5.7 required: Remove compiler checks 2022-08-21 19:21:57 +02:00
Gwendal Roué fcb037bdf0 Swift 5.7 required: Bump deployment targets 2022-08-21 19:21:57 +02:00
Gwendal Roué df0ae43c5f Swift 5.7 required: Sendable 2022-08-21 19:21:26 +02:00
Gwendal Roué fc59b45493 Swift 5.7 required: Package.swift 2022-08-21 19:21:26 +02:00
Gwendal Roué a22113faa5 Swift 5.7 required: podspec 2022-08-21 19:21:26 +02:00
Gwendal Roué d1a32d1950 Swift 5.7 required: Makefile 2022-08-21 19:21:26 +02:00
Gwendal Roué e150ca6864 Migration guide to GRDB 6 2022-08-21 19:21:26 +02:00
Gwendal Roué 9d7e27ced1 Add support for index origin 2022-07-25 08:07:27 +02:00
Gwendal Roué df7ba20ff2 Test columnInfos(in:) for views 2022-07-24 15:17:20 +02:00
Gwendal Roué 8dc0168841 Database.sqliteConnection setter is private 2022-07-24 15:14:35 +02:00
Gwendal Roué 23f4254ae3 Merge branch 'development' 2022-07-09 18:28:22 +02:00
Gwendal Roué 2df6a17c1c v5.26.0 2022-07-09 18:27:57 +02:00
Gwendal Roué 5aeee0e429 CHANGELOG 2022-07-09 17:17:27 +02:00
Gwendal Roué 3a61a8a0e0 Merge pull request #1253 from george-signal/george-signal/optional-memory-management
Make memory management optional.
2022-07-09 17:14:11 +02:00
Gwendal Roué e0766449f1 Fix compilation error on iOS Xcode 13.3.1.app, macOS 12, Swift 5.6 2022-07-09 16:14:37 +02:00
Gwendal Roué c1e752132c Document why DatabasePool.releaseMemory() needs a barrier 2022-07-09 14:28:09 +02:00
Gwendal Roué 6ab90a03c4 Document releaseMemoryEventually and automaticMemoryManagement 2022-07-09 14:00:00 +02:00
Gwendal Roué 23fa42a3e4 Make Database.releaseMemory() public
This allows us to document how to release memory asynchronously with a DatabaseQueue (in the next commit)
2022-07-09 13:55:39 +02:00
Gwendal Roué 07eaeee123 automaticMemoryManagement tests check for actual connection closing 2022-07-09 13:39:39 +02:00
Gwendal Roué 0bfb4de02d Enhance DatabaseQueue automatic memory management
We have async methods, now: no need to use a global dispatch queue.
2022-07-09 13:39:11 +02:00
Gwendal Roué d72b7109ad DatabasePool automatic memory management no longer uses any reader barrier
This fixes the failing `testDatabasePoolDoesNotPreventConcurrentReadsOnPressureEvent` test
2022-07-09 13:39:11 +02:00
Gwendal Roué e1a63a4c05 Introduce DatabasePool.releaseMemoryEventually 2022-07-09 13:33:01 +02:00
Gwendal Roué caab403282 Failing test for concurrent read on memory warning 2022-07-09 13:31:15 +02:00
George Nachman bbe94a9607 Make memory management optional.
Memory management may not be desirable for all
users of GRDB. `DatabasePool.releaseMemory`
creates a barrier which may cause normally fast
readers to block for a long time. If this is not a
desirable tradeoff, the new
`automaticMemoryManagement` flag in
`Configuration` allows you to disable this feature
of GRDB.
2022-07-05 15:27:55 -07:00
Gwendal Roué 84bee1977e Merge pull request #1248 from groue/dev/WALSnapshot
Avoid double notification of the initial value for ValueObservation on DatabasePool
2022-06-30 20:35:52 +02:00
Gwendal Roué 0aa561e61c [skip-ci] CHANGELOG 2022-06-30 19:32:35 +02:00
Gwendal Roué b1b51c01f8 [skip-ci] Xcode drives me crazy 2022-06-30 19:32:24 +02:00
Gwendal Roué cc5196757d Fix for Xcode 12.4 2022-06-30 19:22:23 +02:00
Gwendal Roué 0e9766373d Merge pull request #1246 from sameer4/patch-1
Update AssociationsBasics.md
2022-06-30 10:43:50 +02:00
Sameer aacaa433c9 Update AssociationsBasics.md
Fixed a typo
2022-06-30 12:51:53 +05:00
Gwendal Roué 44ec3535c2 Documentation 2022-06-24 16:48:38 +02:00
Gwendal Roué 38c0d68db7 WALSnapshot
SQLITE_ENABLE_SNAPSHOT is available from Xcode 14 :-)
2022-06-24 16:48:38 +02:00
Gwendal Roué f3cc4add9f Merge pull request #1240 from danielinoa/patch-1
Fix inline documentation typo in Row
2022-06-12 14:47:16 +02:00
Daniel Inoa 432670e13a Fix documentation typo in Row 2022-06-12 05:14:28 -07:00
Gwendal Roué 3ba13b0af6 Merge pull request #1239 from groue/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-06-12 08:32:19 +02:00
dependabot[bot] 1a6228e2c5 Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-11 15:37:15 +00:00
Gwendal Roué e02f2c8aba Merge branch 'development' 2022-06-11 17:35:55 +02:00
Gwendal Roué c0e9c8746d v5.25.0 2022-06-11 17:35:39 +02:00
Gwendal Roué d1cba5e5c8 TODO 2022-06-11 17:35:39 +02:00
Gwendal Roué bf824bf68c Makefile: support for Xcode 14.0 2022-06-11 14:59:02 +02:00
Gwendal Roué 5e5b44aa7f Fix Swiftlint build phase 2022-06-11 14:59:02 +02:00
Gwendal Roué 806919b5be Merge pull request #1235 from groue/dev/raise-default-qos
Raise default Quality of Service to .userInitiated
2022-06-08 23:35:48 +02:00
Gwendal Roué a289aecc3c CHANGELOG 2022-06-08 08:13:12 +02:00
Gwendal Roué 3f7adec072 Default qos is .userInitiated
Addresses #1234
2022-06-08 08:12:47 +02:00
Gwendal Roué c9f3a1e17f CHANGELOG 2022-06-08 08:12:30 +02:00
Gwendal Roué cf2a79e12f Merge pull request #1228 from turrisxyz/Dependabot-GitHub-Actions
chore: Included githubactions in the dependabot config
2022-06-08 08:09:37 +02:00
Gwendal Roué a0212eb129 [skip ci] Early mention of the async accesses 2022-06-07 19:32:39 +02:00
Gwendal Roué d5470b7278 Merge pull request #1233 from GetToSet/ethanwong/fix-xcode-14-warning
Fix warnings of redundant conformance constraint on Xcode 14.
2022-06-07 09:33:44 +02:00
Ethan Wong cd6960f5e9 Fix warnings of redundant conformance constraint on Xcode 14. 2022-06-07 11:35:37 +08:00
naveen f72859b5b2 chore: Included githubactions in the dependabot config
This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure.

Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot

GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool
Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-06-01 01:30:32 +00:00
Gwendal Roué b947065d25 Merge pull request #1226 from turrisxyz/Pinned-Dependencies-GitHub
chore: Set permissions for GitHub actions
2022-05-31 08:12:22 +02:00
naveen 11f95806c4 chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-05-31 00:30:47 +00:00
Gwendal Roué 2ac5c77353 Merge branch 'development' 2022-05-26 13:32:23 +02:00
Gwendal Roué 2a849d380c v5.24.1 2022-05-26 13:31:48 +02:00
Gwendal Roué fd31632203 Bump GRDBPerformance dependencies 2022-05-26 13:31:48 +02:00
Gwendal Roué 4a98a53dad CHANGELOG 2022-05-26 12:09:42 +02:00
Gwendal Roué 952ee0a137 Rename Pool.async to asyncGet 2022-05-25 17:25:43 +02:00
Gwendal Roué ee92db9d6f Pool has a QoS 2022-05-25 17:21:50 +02:00
Gwendal Roué de4266499c Configuration.readQoS 2022-05-25 17:19:41 +02:00
Gwendal Roué 4b7a9bbe7b CI: raise timeouts 2022-05-25 09:27:01 +02:00
Gwendal Roué 184d5aa4af CI: raise timeouts 2022-05-25 09:01:39 +02:00
Gwendal Roué 6c48e492d1 CI: raise timeouts 2022-05-24 21:58:46 +02:00
Gwendal Roué 26fedd2702 CI: raise timeouts 2022-05-24 20:47:34 +02:00
Gwendal Roué 06216fd875 Merge pull request #1225 from groue/dev/thread-limit
Prevent heavy DatabasePool concurrent reads from creating too many threads
2022-05-24 20:46:54 +02:00
Gwendal Roué 42050e5e28 CHANGELOG 2022-05-24 19:54:51 +02:00
Gwendal Roué 9ed309b470 Fix failing tests for number of threads created by DatabasePool 2022-05-24 19:31:22 +02:00
Gwendal Roué 00d1a80b31 Failing tests for number of threads created by DatabasePool 2022-05-24 19:31:09 +02:00
Gwendal Roué aaf3efe6df Merge pull request #1163 from groue/dev/ci
Tests with GitHub actions
2022-05-24 08:18:57 +02:00
Gwendal Roué d8f2989542 Split SQLCipher clear/encrypted tests 2022-05-23 14:20:26 +02:00
Gwendal Roué 28543109ea Rename CI jobs 2022-05-23 08:18:09 +02:00
Gwendal Roué 63c2bd0876 Raise SQLCipher CI timeouts 2022-05-23 08:17:12 +02:00
Gwendal Roué 59bd10b1b5 Raise all CI timeouts 2022-05-22 18:05:13 +02:00
Gwendal Roué 758f561fbf Raise timeout threshold for SQLCipher CI tests 2022-05-22 17:31:45 +02:00
Gwendal Roué 40b0e98eb5 Delete obsolete Travis setup files 2022-05-22 16:47:21 +02:00
Gwendal Roué 2ec0a4c69d More tests 2022-05-22 16:47:20 +02:00
Gwendal Roué ca43f1e803 Test macOS, All Xcodes and Swifts 2022-05-18 16:40:39 +02:00
Gwendal Roué 0a7e7d1e5c Makefile: support for Xcode 13.4 2022-05-18 13:48:24 +02:00
Gwendal Roué 1260980150 Remove return keywords 2022-05-18 08:14:19 +02:00
Gwendal Roué f0cfde682e Update outdated documentation 2022-05-18 08:12:00 +02:00
Gwendal Roué 096a3b2f0f Merge pull request #1217 from GetToSet/development
Update doc issue on TableRequest.filter(keys:).
2022-05-16 11:03:17 +02:00
Ethan Wong f313a43ef9 Update doc issue on TableRequest.filter(keys:). 2022-05-07 13:32:31 +08:00
Gwendal Roué fead2ea634 Merge branch 'development' 2022-05-01 11:43:49 +02:00
Gwendal Roué 5b254eec16 v5.24.0 2022-05-01 11:43:14 +02:00
Gwendal Roué 3632edb238 Mention SwiftUI support in the README 2022-05-01 11:36:26 +02:00
Gwendal Roué 752415b5fb Merge pull request #1213 from groue/dev/fix-1209
Fix crash when the number of active ValueObservations is high
2022-05-01 08:25:56 +02:00
Gwendal Roué f17a786165 CHANGELOG 2022-04-30 16:07:04 +02:00
Gwendal Roué b89ce00361 Document that read-only transactions are not notified 2022-04-30 16:06:59 +02:00
Gwendal Roué c5eba4741d Test that read-only transactions are not notified 2022-04-30 15:42:57 +02:00
Gwendal Roué fb18a3938f Database.isolated(readOnly: true) avoids triggering database observation
Fix failing test for #1209
2022-04-30 15:27:20 +02:00
Gwendal Roué 5082207bb0 Don't notify read-only transactions 2022-04-30 15:27:20 +02:00
Gwendal Roué 06b5367053 Default transaction kind is .deferred in read-only connections
This applies to both connections open in read-only mode, and pragma query_only.
2022-04-30 14:29:31 +02:00
Gwendal Roué 819ee588c9 Failing test for #1209 2022-04-30 14:26:04 +02:00
Gwendal Roué 1b3f1ed393 Fix typo 2022-04-30 13:26:25 +02:00
Gwendal Roué f0fe7e86ca Merge pull request #1212 from groue/MartinP7r-patch-1
Fix apple docs links
2022-04-29 12:18:03 +02:00
Martin Pfundmair dd5ce280b5 Fix apple docs links 2022-04-29 16:10:03 +09:00
Matt Gallagher 744aa825a3 Merge pull request #1203 from EvanHahn/fix-changelog-links
Fix changelog links
2022-04-20 12:25:10 +10:00
Evan Hahn 24f3de9dfa Fix changelog links
This change:

1. Makes all links use HTTPS (there were a few that used insecure HTTP)
2. Corrects a few links, which previously went to the wrong place

It was easy to find HTTP links—a simple search. I wrote a silly script,
to be run in the browser console, to find the rest:

```js
(() => {
  for (const a of document.getElementsByTagName("a")) {
    if (!/^#\d+$/.test(a.innerText)) {
      continue;
    }

    const id = a.innerText.slice(1);
    const expectedPullHref = `https://github.com/groue/GRDB.swift/pull/${id}`;
    const expectedIssueHref = `https://github.com/groue/GRDB.swift/issues/${id}`;

    if (a.href !== expectedPullHref && a.href !== expectedIssueHref) {
      console.error(`"${a.innerText}" has an invalid href, ${a.href}`);
    }
  }
})();
```

Hope this helps!
2022-04-19 18:30:53 -05:00
Gwendal Roué 4472d3a60e Merge branch 'development' 2022-04-16 10:10:05 +02:00
Gwendal Roué dc03adb4e2 v5.23.0 2022-04-16 10:09:45 +02:00
Gwendal Roué dea9bedacb Merge pull request #1200 from groue/dev/require-swift-5.6-for-concurrency
Require Swift 5.6 Compiler for Concurrency Support
2022-04-14 07:11:17 +02:00
Gwendal Roué 83d243853b CHANGELOG 2022-04-13 23:21:38 +02:00
Gwendal Roué 209192d3a5 Require Swift 5.6 Compiler for Concurrency Support 2022-04-13 23:07:33 +02:00
Gwendal Roué 15c06e0374 Merge branch 'development' 2022-04-02 14:56:09 +02:00
Gwendal Roué 0324f592dc v5.22.2 2022-04-02 14:55:54 +02:00
Gwendal Roué 051787b17f Merge pull request #1196 from layoutSubviews/development
Fix a crash when an observation is quickly cancelled
2022-04-02 14:50:38 +02:00
Gwendal Roué feebc07101 Documentation 2022-04-02 13:21:26 +02:00
Renaud Lienhart 80c15c6ef6 Fix a crash when an observation is quickly cancelled 2022-03-31 10:55:00 +11:00
Gwendal Roué 9014b3ebd0 Fix #1192 2022-03-26 14:48:27 +01:00
Gwendal Roué bec58a32d4 And fix typo... 2022-03-26 12:54:00 +01:00
Gwendal Roué b66374670c CHANGELOG: add 5.22.1 in the list of releases 2022-03-26 12:53:11 +01:00
Gwendal Roué f3992a034d Merge branch 'development' 2022-03-26 11:52:33 +01:00
Gwendal Roué 8b120fa9b6 v5.22.1 2022-03-26 11:52:17 +01:00
Gwendal Roué 8b58ec4cee Merge branch 'dev/issue1194' into development 2022-03-26 11:46:03 +01:00
Gwendal Roué 9b7b603a69 Documentation 2022-03-26 11:44:33 +01:00
Gwendal Roué a3a26bf88f Fix #1194 2022-03-26 11:43:44 +01:00
Gwendal Roué 770484b78d Failing test for #1194 2022-03-26 11:33:10 +01:00
Gwendal Roué fafa74c246 Fix ValueObservation.publisher documentation 2022-03-22 19:24:06 +01:00
Gwendal Roué 62450b5817 Bump performance comparison dependencies 2022-03-22 18:00:21 +01:00
Gwendal Roué e9b8df68ee Merge branch 'development' 2022-03-22 17:38:18 +01:00
Gwendal Roué 9fa831b6bb v5.22.0 2022-03-22 16:41:40 +01:00
Gwendal Roué 43e1871005 Fix for Xcode 12.4 2022-03-22 13:46:09 +01:00
Gwendal Roué 8a6e784428 Fix for Xcode 12.5.1
Without this change, the compiler would crash with Abort trap: 6
2022-03-22 09:26:12 +01:00
Gwendal Roué 727ca68b98 CHANGELOG 2022-03-22 08:36:24 +01:00
Gwendal Roué fb3e08aba8 Merge pull request #1186 from benrb/databaseerror-message
DatabaseError provide error message as localizedFailureReason
2022-03-22 08:26:14 +01:00
Ben Barnett 1c614e8de6 Test localizedFailureReason is not nil
-localizedFailureReason can be nil in some cases, but not in the one we are testing here
2022-03-20 08:23:35 +00:00
Ben Barnett 3f0a8e6730 Provide error message as a failure reason 2022-03-20 08:07:39 +00:00
Gwendal Roué 6916a8feca #1183 cleanup 2022-03-18 03:36:20 +01:00
Gwendal Roué e08dfdb0bf Merge pull request #1183 from groue/dev/strong-observation
Starting a ValueObservation keeps a strong reference on the database connection.
2022-03-17 19:17:03 +01:00
Gwendal Roué 6236b8a068 Move Headers build phase before Compile Sources
This prevents a build error when running tests with Xcode 13.3:

error: Cycle inside GRDBiOS; building could produce unreliable results. This usually can be resolved by moving the target's Headers build phase before Compile Sources.
2022-03-17 18:50:11 +01:00
Gwendal Roué 55dea6f9d2 Makefile: support for Xcode 13.3 2022-03-17 18:44:30 +01:00
Gwendal Roué cdb08988f4 CHANGELOG 2022-03-17 18:44:30 +01:00
Gwendal Roué 881bbd3f0d Update documentation 2022-03-17 18:44:30 +01:00
Gwendal Roué 6ab3fea8fb Refactor ValueObservation 2022-03-17 18:44:30 +01:00
Gwendal Roué 287ceb8b07 Documentation & cleanup 2022-03-17 18:44:30 +01:00
Gwendal Roué 4eefb9afbe Merge pull request #1184 from GetToSet/ethanwong/update-row-adapter-doc
Update RowAdapter doc to cover all concrete adapters.
2022-03-17 18:05:09 +01:00
Ethan Wong 4ea04ec978 Update RowAdapter doc to cover all concrete adapters. 2022-03-18 00:59:16 +08:00
Gwendal Roué c30b49117b If a scope is found, there is no point searching for prefetched rows 2022-03-04 12:04:02 +01:00
Gwendal Roué ec975819b7 Fix for container.decodeNil(forKey:) in the context of including(all:) 2022-03-04 11:55:53 +01:00
Gwendal Roué b974dfa9a7 Use fetchSet when available 2022-03-04 11:40:42 +01:00
Gwendal Roué e19f21be99 TODO 2022-03-04 10:28:23 +01:00
Gwendal Roué 9b0e41ad58 Details about date formats 2022-02-13 12:27:27 +01:00
Gwendal Roué d40474d2b7 Merge branch 'development' 2022-02-06 12:14:25 +01:00
Gwendal Roué 685074932e v5.21.0 2022-02-06 12:14:05 +01:00
Gwendal Roué f1a23bacc0 Extend the thank you notice 2022-02-06 12:10:35 +01:00
Gwendal Roué fbef103f01 CHANGELOG 2022-02-06 12:09:27 +01:00
Gwendal Roué fc9f0bcad1 Wording 2022-02-06 10:20:06 +01:00
Gwendal Roué 1929e96d11 Merge pull request #1165 from BeehiveInnovations/development
Add dynamic library to products to support dynamic linking
2022-02-06 10:13:31 +01:00
Gwendal Roué 9d4eb8a6dd test_install_SPM_Dynamic_Project: use a destination
Otherwise `make test_install_SPM_Dynamic_Project` uses a default destination, which CAN be the current mac, and thus require code signing:

% make test_install_SPM_Dynamic_Project
...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], ... }
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
...
❌  error: Signing for "ios-dynamic" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'ios-dynamic' from project 'ios-dynamic')
** BUILD FAILED **
2022-02-06 10:00:58 +01:00
Fahad 3914a9ec21 Updated Makefile. Updated code-signing team 2022-02-06 01:25:34 +04:00
Fahad 29bacc138c Replaced test project with iOS project 2022-02-06 01:14:19 +04:00
Beehive InnovationsandGwendal Roué ba866359b2 Update README.md
Co-authored-by: Gwendal Roué <gr@pierlis.com>
2022-02-03 23:11:54 +04:00
Beehive InnovationsandGwendal Roué ffced55d3c Update README.md
Co-authored-by: Gwendal Roué <gr@pierlis.com>
2022-02-03 22:52:10 +04:00
Beehive Innovations 74caa96dcb Undo and use automatic
More clarity on this now - helps compile optimize and skip producing a `.a` static library entirely.
2022-02-03 22:13:12 +04:00
Beehive Innovations f6bea21e80 The first target should explicitly say static
Otherwise the behavior is undefined since omitting the type may at some point in time cause Xcode to pull it in as dynamic (when they fix their dependency resolution).
2022-02-03 21:44:06 +04:00
Fahad 27f6125099 Dynamic library test added 2022-02-03 13:36:52 +04:00
Beehive Innovations 70ea2027e4 Renamed dynamic library name
In line with naming standard used by other libraries
2022-02-03 13:11:24 +04:00
Beehive Innovations e28658c574 Updated SPM installation instructions
Added note about static / dynamic
2022-02-03 13:09:52 +04:00
fahad@guidedways.com c184b76849 Add dynamic library to products to allows dynamic linking 2022-02-03 09:25:42 +04:00
Gwendal Roué d23d74f65f Merge pull request #1164 from groue/dev/migrator-is-not-concurrent
Drop async apis from DatabaseMigrator
2022-02-01 18:17:02 +01:00
Gwendal Roué 984a5b4c4c CHANGELOG 2022-02-01 16:55:05 +01:00
Gwendal Roué 8e84beee36 Fix Swift 5.6 warnings 2022-02-01 10:08:24 +01:00
Gwendal Roué 95ce4a3f8a Drop async apis from DatabaseMigrator
This is because DatabaseMigrator can't be Sendable as long as it runs migrations that embed non-@Sendable closures.
2022-02-01 09:53:20 +01:00
Gwendal Roué 98ca653c6a Merge branch 'development' 2022-02-01 09:07:15 +01:00
Gwendal Roué e5a8e130d7 v5.20.0 2022-02-01 07:44:09 +01:00
Gwendal Roué 72e8dd2816 Cleanup 2022-01-31 20:20:02 +01:00
Gwendal Roué b5338650db Bump performance comparison dependencies 2022-01-31 19:23:55 +01:00
Gwendal Roué 75f72472ff Cleanup 2022-01-31 08:37:57 +01:00
Gwendal Roué 09f7d4d952 Complete #1161 2022-01-30 15:27:11 +01:00
Gwendal Roué c1c3cf6605 Merge pull request #1162 from groue/dev/fix-truncate-optimization
Fix truncate optimization handling
2022-01-30 15:26:14 +01:00
Gwendal Roué fc7f24ef6e Test case insensitivity of truncation optimization prevention 2022-01-30 14:57:37 +01:00
Gwendal Roué 3d0b34590f Fix typo 2022-01-30 14:49:31 +01:00
Gwendal Roué 2d6c2873e0 CHANGELOG 2022-01-30 14:42:22 +01:00
Gwendal Roué 4e65425c00 Cleanup 2022-01-30 14:41:29 +01:00
Gwendal Roué b82f92f726 Test for cursor next() followed by forEach() 2022-01-30 14:33:22 +01:00
Gwendal Roué b8c0e9d2c2 Fix failing test for cached statement which does not prevent the truncate optimization 2022-01-30 14:24:28 +01:00
Gwendal Roué b2df255306 Failing test for cached statement which does not prevent the truncate optimization 2022-01-30 14:12:46 +01:00
Gwendal Roué c60b8cfc53 Refactor prevention of truncate optimization
We now always use the same authorizer, which is always ready to prevent truncate optimization depending on the current transaction observers.
2022-01-30 14:07:43 +01:00
Gwendal Roué 9dc6fbd7f9 Fix #1159 2022-01-30 12:27:19 +01:00
Gwendal Roué 9a4e1f7806 Merge pull request #1161 from groue/dev/write-target-queue
Target DispatchQueue for non-read-only database connections
2022-01-30 12:07:25 +01:00
Gwendal Roué 5dde1409ad CHANGELOG 2022-01-29 17:54:33 +01:00
Gwendal Roué 936fd3ed5f Test that DatabaseMigrator.eraseDatabaseOnSchemaChange does not deadlock on Configuration.writeTargetQueue 2022-01-29 17:47:30 +01:00
Gwendal Roué ed4471c5b9 Configuration.writeTargetQueue 2022-01-29 17:45:21 +01:00
Gwendal Roué dd025a14e4 Merge pull request #1160 from groue/dev/privacy
Hide statement arguments by default
2022-01-29 16:29:58 +01:00
Gwendal Roué 29808e51ff Fix typo 2022-01-29 16:06:22 +01:00
Gwendal Roué 426044154c Fix public statement arguments for system SQLite 2022-01-29 15:54:39 +01:00
Gwendal Roué d69db0b9a1 CHANGELOG 2022-01-29 15:32:21 +01:00
Gwendal Roué 914bd14cd1 CHANGELOG 2022-01-29 15:27:44 +01:00
Gwendal Roué b5395a097c Documentation 2022-01-29 15:27:40 +01:00
Gwendal Roué 99c596f778 Fix DatabaseError public initializer 2022-01-29 15:21:44 +01:00
Gwendal Roué fd22fac5c0 Don't shed too much light on expandedSQL & expandedDescription properties 2022-01-29 15:12:41 +01:00
Gwendal Roué 6e3a15ebed Statement.description no longer contains statement arguments 2022-01-29 14:57:18 +01:00
Gwendal Roué bb8b39f7fd Documentation for public statement arguments 2022-01-29 14:54:47 +01:00
Gwendal Roué fc5138ae91 Configuration.publicStatementArguments
This flags allows database errors and trace events to hide or show statement arguments by default.
2022-01-28 13:57:12 +01:00
Gwendal Roué d3985c7ebf TraceEvent.description no longer contains statement arguments
Use TraceEvent.expandedDescription in order to see statements arguments
2022-01-27 19:30:00 +01:00
Gwendal Roué 9f0ba49c93 DatabaseError.description no longer contains statement arguments
Use DatabaseError.expandedDescription in order to see statements arguments
2022-01-27 19:30:00 +01:00
Gwendal Roué 09922c34ff Code formatting 2022-01-23 12:24:34 +01:00
Gwendal Roué 3826003d93 TODO 2022-01-23 10:51:15 +01:00
Gwendal Roué 9baa72cfd7 Mention association annotation methods in the main README 2022-01-21 13:48:51 +01:00
Gwendal Roué aacc69f485 Fix typos 2022-01-21 13:43:44 +01:00
Gwendal Roué 301fb34702 Fix failing test for including(all:) on limited request and composite primary keys 2022-01-21 13:42:42 +01:00
Gwendal Roué 6444285ee2 Failing test for including(all:) on limited request and composite primary keys 2022-01-21 13:39:40 +01:00
Gwendal Roué bd42dc69f0 CHANGELOG 2022-01-19 19:27:50 +01:00
Gwendal Roué 14d8763a84 Merge branch 'development' 2022-01-19 16:20:21 +01:00
Gwendal Roué c46e8257d8 v5.19.0 2022-01-19 16:18:59 +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 MishaliandGwendal 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é fe92b93f0b CHANGELOG 2022-01-19 08:15:19 +01: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
Gwendal Roué ca47426c61 Merge pull request #1149 from BB9z/fix-typos
Fix typos
2022-01-19 06:31:12 +01:00
Gwendal Roué 90c85c6703 TODO 2022-01-19 06:25:33 +01:00
BB9z 6d3f309cad Fix typos 2022-01-19 00:10:42 +08:00
Gwendal Roué 06dbaba7cc Add failing test for schema cache invalidation 2022-01-18 08:50:42 +01:00
Timothy Ellis daf44d9baa Exposed drop(column:) to custom builds and cipher 2022-01-18 10:11:12 +11:00
Timothy Ellis 187a661626 Updated to reflect drop column 2022-01-17 10:31:11 +11:00
Timothy Ellis 55302cb937 Added test for drop column 2022-01-17 10:02:23 +11:00
Timothy Ellis 869d776962 Added drop column support 2022-01-17 10:02:04 +11: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é 8f100a6395 Document that GRDB/SQLCipher must be the only pod
Addresses #1141
2022-01-16 10:49:02 +01:00
Gwendal Roué 44dd21690f Merge pull request #1139 from groue/dev/more-1124
Deal with authorization callbacks from more cursors
2022-01-14 18:43:13 +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é 149d5ac151 Fix GRDBProfiling 2022-01-14 13:13: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é 3fff6b2f51 Fix typo 2022-01-13 07:29:38 +01:00
Gwendal Roué 62a0b1c148 Fix typo 2022-01-09 19:03:31 +01:00
Gwendal Roué dfca044433 Merge branch 'development' 2022-01-09 18:56:04 +01:00
Gwendal Roué 78df734f51 v5.18.0 2022-01-09 17:36:31 +01:00
Gwendal Roué e72b7e4597 Merge pull request #1133 from groue/dev/strict-tables
Support for STRICT tables
2022-01-09 17:22:50 +01:00
Gwendal Roué fb6c695658 CHANGELOG 2022-01-09 17:12:17 +01:00
Gwendal Roué a1c0c6d1f3 Update documentation for the new table/index creation options 2022-01-09 17:01:37 +01:00
Gwendal Roué 68f3e5586b Test strict tables, and table/index creation options 2022-01-09 17:01:37 +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é 95f1d83d78 The .strict table creation option
The .strict table creation option

The .strict table creation option
2022-01-09 17:01:37 +01:00
Gwendal Roué 790c054a28 Fix Swiftlint warnings 2022-01-09 14:43:27 +01:00
Gwendal Roué 06a5d6f44b Merge pull request #1132 from groue/dev/sqlite-3.72.2
Bump custom SQLite builds v3.72.2
2022-01-09 14:42:28 +01:00
Gwendal Roué 3145a916a0 CHANGELOG 2022-01-09 14:33:33 +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é c172dac909 Update test for SQLite to v3.37.2 2022-01-09 14:21:51 +01:00
Gwendal Roué 5b7ba122e8 Bump custom SQLite to v3.37.2 2022-01-09 14:06:27 +01:00
Gwendal Roué 0513e0acf8 Enhance wording in the pull request template 2022-01-09 13:42:22 +01:00
Gwendal Roué b3d49de023 Mention CONTRIBUTING in the pull request template 2022-01-09 13:41:11 +01:00
Gwendal Roué 779e2c202f Merge pull request #1128 from groue/dev/issue-1124
Deal with authorization callbacks from cursors of FetchableRecord
2022-01-09 13:38:20 +01:00
Gwendal Roué be45781cf9 CHANGELOG 2022-01-09 13:31:03 +01:00
Gwendal Roué c7d816b860 Merge branch 'development' into dev/issue-1124 2022-01-09 13:27:54 +01:00
Gwendal Roué a0f6f7a9ab Merge pull request #1129 from groue/dev/detached-column
Detached columns
2022-01-09 13:27:04 +01:00
Gwendal Roué 86c0180487 CHANGELOG 2022-01-09 13:17:29 +01:00
Gwendal Roué 80c11d0bc4 Merge branch 'development' into dev/detached-column 2022-01-09 13:13:31 +01:00
Gwendal Roué 66602ba2e2 CHANGELOG 2022-01-09 13:13:11 +01:00
Gwendal Roué 8fdcc020e0 Documentation 2022-01-08 14:09:14 +01:00
Gwendal Roué 1bb2029e74 Fix #1124 by dealing with authorizers 2022-01-08 13:51:41 +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é 2093b477df Failing test for #1124 2022-01-08 13:18:32 +01:00
Gwendal Roué 29cd08cba4 Fix typo 2022-01-07 15:01:29 +01:00
Gwendal Roué 76523db5b9 Removed undesired :nodoc: comment 2022-01-07 14:58:42 +01:00
Gwendal Roué c0305853bc Enhance fatal error message for reversed literal ordering terms 2022-01-07 14:43:57 +01:00
Gwendal Roué 5d51f2a884 New Embedding SQL in Query Interface Requests chapter 2022-01-07 14:41:15 +01:00
Gwendal Roué bdf54e80a9 Mention detached columns in the documentation of expression.forKey(_:) 2022-01-07 13:30:27 +01:00
Gwendal Roué e799c8534e ColumnExpression.detached 2022-01-07 10:07:15 +01:00
Gwendal Roué 536ad2ebff Merge branch 'master' into development 2022-01-07 10:06:42 +01:00
Gwendal Roué 972f45295f Request make smokeTest to pass before submitting a pull request. 2022-01-07 10:06:21 +01:00
Gwendal Roué b96bd52c38 Merge branch 'dev/issue-1074-incremental_backup_api' into development 2022-01-06 18:36:31 +01:00
Gwendal Roué 2af0a74676 Fix SQLCipher 3 and 4 test projects 2022-01-06 14:13:25 +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
Gwendal Roué 911b2a76d8 Merge pull request #1121 from byohay/feature/fix-variables-with-spaces
GRDB: quote PROJECT_DIR and SRCROOT environment variables.
2021-12-31 14:32:29 +01:00
Gwendal Roué 54b13de632 Merge pull request #1120 from jnross/joe/fix-typo
Fix typos of the word "default"
2021-12-31 13:56:56 +01:00
Ben Yohay 4a3232199f GRDB: quote PROJECT_DIR and SRCROOT environment variables.
Using those variables without quoting will yield unexpected results if
they contain spaces.
2021-12-29 14:40:56 +02:00
Joseph Ross bf28abbb25 Fix typos of the word "default" 2021-12-28 14:49:33 -08:00
Gwendal Roué c945504a34 Addition and substraction are not bijective functions (due to floating point rounding errors) 2021-12-21 11:13:28 +01:00
Gwendal Roué 8217966215 Table creation methods accept throwing closures 2021-12-21 09:26:55 +01:00
Gwendal Roué c96a74658c TODO 2021-12-19 12:34:16 +01:00
Gwendal Roué 042e220f49 Rewrite CONTRIBUTING.md 2021-12-18 14:31:02 +01:00
Michael Allman a71639159b Add DatabaseBackupProgress and update the documentation 2021-12-15 01:52:25 -05:00
Gwendal Roué d633927999 Merge branch 'development' 2021-12-14 19:33:32 +01:00
Gwendal Roué 8df7020ad7 v5.17.0 2021-12-14 19:32:51 +01:00
Gwendal Roué bc95c5c977 Performance tests: upgrade dependencies 2021-12-14 19:15:59 +01: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é e1984721dc Merge pull request #1079 from groue/dev/async
Async / Await
2021-12-14 13:29:02 +01:00
Gwendal Roué 469898c5df CHANGELOG 2021-12-14 13:15:22 +01:00
Gwendal Roué 0207aef4dc CHANGELOG 2021-12-14 12:48:48 +01:00
Gwendal Roué d7604d2174 Merge branch 'development' into dev/async 2021-12-14 12:46:49 +01: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é 0cf4c4efba Merge branch 'development' into dev/async 2021-12-12 17:00:08 +01:00
Gwendal Roué 710142edc0 CHANGELOG 2021-12-12 16:44:43 +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é 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' 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' 2021-12-02 19:43:04 +01:00
Gwendal Roué c7291db360 v5.15.0 2021-12-02 18:48:36 +01:00
Gwendal Roué a52d1b1d21 Merge pull request #1102 from groue/dev/ValueObservation-explicit-region-tracking
Explicit tracked region for ValueObservation
2021-12-02 18:40:40 +01:00
Gwendal Roué 89b1783220 TrackingMode is a property of ValueObservation
No reducer changes the tracking mode, so let's simplify the code.
2021-12-02 17:22:18 +01:00
Gwendal Roué 76d2168988 Extend the general description of ValueObservation behavior
Link to the ability to track something which is not the fetched region.
2021-12-02 17:22:18 +01:00
Gwendal Roué e419bb55ca Enhance documentation of DatabaseRegion 2021-12-02 17:22:18 +01:00
Gwendal Roué 06eb45db65 Documentation for ValueObservation(region:fetch:) 2021-12-02 17:22:18 +01:00
Gwendal Roué 6180e4b815 Fix for Swift 5.3 2021-12-02 17:22:18 +01:00
Gwendal Roué 85747935c8 ValueObservation can track an explicit database region 2021-12-02 17:22:18 +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é ad66fbc666 ValueObserver documentation 2021-12-02 09:46:02 +01:00
Gwendal Roué e69092ca6a Add DatabaseRegionConvertible to Table 2021-12-02 09:45:38 +01:00
Gwendal Roué bb2ce74125 Add helper method Database.isolated(readOnly:) 2021-12-02 09:45:28 +01:00
Gwendal Roué 06bf3980b6 Fix documentation links 2021-12-02 09:17:36 +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é 6dc7367853 Merge branch 'development' 2021-11-25 18:29:23 +01:00
Gwendal Roué 4228df9c06 v5.14.0 2021-11-25 18:23:31 +01:00
Gwendal Roué ca9fd1f8e6 CHANGELOG 2021-11-25 18:18:15 +01:00
Gwendal Roué 1fbf2f8693 GRDBCombineDemo uses the GRDBQuery package 2021-11-25 17:26:19 +01:00
Gwendal Roué 811c41af6d @Query has been exported to https://github.com/groue/GRDBQuery 2021-11-25 15:25:40 +01:00
Gwendal Roué 5d87609f4b Ignore .swiftpm 2021-11-25 15:08:53 +01:00
Gwendal Roué a9036a4563 Ignore .swiftpm 2021-11-25 14:49:37 +01:00
Gwendal Roué 988c7bb62f Query documentation 2021-11-25 13:56:07 +01:00
Gwendal Roué 51182fc862 Query documentation 2021-11-25 13:55:00 +01:00
Gwendal Roué 485509a8cc Query documentation 2021-11-25 13:47:27 +01:00
Gwendal Roué a81f80cddb Query documentation 2021-11-25 13:46:50 +01:00
Gwendal Roué d590a06212 Query documentation 2021-11-25 12:39:50 +01:00
Gwendal Roué b3a1497791 Query documentation 2021-11-25 12:38:27 +01:00
Gwendal Roué c7f0a80a91 Query documentation 2021-11-25 10:52:10 +01:00
Gwendal Roué 068081d043 Query documentation 2021-11-25 10:37:06 +01:00
Gwendal Roué 01ba7de2f9 Query documentation 2021-11-25 10:16:38 +01:00
Gwendal Roué 10e784bee3 Query documentation 2021-11-25 10:11:35 +01:00
Gwendal Roué 21c6c9c794 Query documentation 2021-11-25 09:49:19 +01:00
Gwendal Roué dec515aceb Query documentation 2021-11-25 09:42:21 +01:00
Gwendal Roué 9be04da707 Query documentation 2021-11-25 09:41:25 +01:00
Gwendal Roué 6b02b4ca02 Rename Query generic parameter to Request 2021-11-25 09:37:40 +01:00
Gwendal Roué 5983473aa5 Query documentation 2021-11-25 09:33:24 +01:00
Gwendal Roué 1c4456a9fc Query documentation 2021-11-25 09:28:59 +01:00
Gwendal Roué 82a2776acd Query documentation 2021-11-25 09:14:54 +01:00
Gwendal Roué c7fb5cb3e3 Query demo README 2021-11-24 20:48:56 +01:00
Gwendal Roué f726b670f9 Polish Query demo app 2021-11-24 20:18:37 +01:00
Gwendal Roué 62e710b9b1 Cleanup Query demo app 2021-11-24 19:16:39 +01:00
Gwendal Roué 66f953a21a Rename Query demo app 2021-11-24 17:19:07 +01:00
Gwendal Roué ceed45cf22 QuerySideEffect demo 2021-11-24 09:40:15 +01:00
Gwendal Roué 13a040ae1b CHANGELOG 2021-11-18 08:39:01 +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
Gwendal Roué ea41f34f3d Quote table name in raw SQL query 2021-11-16 08:40:16 +01:00
Gwendal Roué 861ca5f022 Merge branch 'development' into dev/async 2021-11-07 16:30:37 +01:00
Gwendal Roué 59f9482aa7 Fix links to documentation images 2021-11-07 16:29:17 +01:00
Gwendal Roué 8658b7bc10 Merge branch 'development' 2021-11-07 16:20:59 +01:00
Gwendal Roué 42eeb54d6f v5.13.0 2021-11-07 16:06:50 +01:00
Gwendal Roué fe32981e0e Performance report: fallback for hardware name
The https://apple.stackexchange.com/a/98089 technique does not work on my mac
2021-11-07 16:06:50 +01:00
Gwendal Roué 0c9de25a8c Bump number of operations performed by performance tests
Apple Silicon and SSD are too fast, and we need to display higher numbers
2021-11-07 16:06:50 +01:00
Gwendal Roué 2b5d3f1d72 Upgrade Realm version in performance tests 2021-11-07 16:06:50 +01:00
Gwendal Roué 9da2e66e46 Fix flaky test 2021-11-07 14:58:18 +01:00
Gwendal Roué 8bf45e5452 Remove debugging code 2021-11-07 14:46:36 +01:00
Gwendal Roué d85168dd3c Query cleanup 2021-11-07 13:47:04 +01:00
Gwendal Roué 7ed103d5e4 Documentation 2021-11-07 13:25:50 +01:00
Gwendal Roué b44a9eb470 Extract @Query into its own package 2021-11-07 12:03:55 +01:00
Gwendal Roué d240d8c5f0 Fix typo 2021-11-07 11:58:51 +01:00
Gwendal Roué 74f268a378 Makefile: test_GRDBAsyncDemo 2021-11-07 11:49:42 +01:00
Gwendal Roué f74ce91a17 Merge branch 'development' into dev/async
# Conflicts:
#	CHANGELOG.md
#	Documentation/Concurrency.md
#	README.md
2021-11-07 11:47:01 +01:00
Gwendal Roué 23a9b6e1ae Makefile: test BUILD_LIBRARY_FOR_DISTRIBUTION & XCFramework 2021-11-07 11:13:35 +01:00
Gwendal Roué 03822bdf99 Makefile: skip test_framework_GRDBtvOS_minTarget until simulator is installed 2021-11-07 10:45:03 +01:00
Gwendal Roué b0c77a5e0f Makefile: tests for demo apps 2021-11-07 10:41:12 +01:00
Gwendal Roué af2d65ef49 Fix Swiftlint warnings 2021-11-07 10:32:00 +01:00
Gwendal Roué 72271b0299 CHANGELOG 2021-11-07 10:07:46 +01:00
Gwendal Roué b5433803ef Makefile: support for Xcode 13.1 2021-11-07 10:03:42 +01:00
Gwendal Roué 037443e600 Wording 2021-11-07 09:36:50 +01:00
Gwendal Roué 19b182b6a8 Remove the immediate transactions advice
It has write transactions fail faster, but it also has writes that only read, or writes that do nothing fail - for no good reason.
2021-11-07 09:20:38 +01:00
Gwendal Roué 0955ac3001 New concurrent read illustration 2021-11-07 09:14:23 +01:00
Gwendal Roué ff7773cf41 Wording 2021-11-07 08:29:24 +01:00
Gwendal Roué 8a0cbb63f5 Wording 2021-11-07 08:25:24 +01:00
Gwendal Roué d3e55cf8f6 wording 2021-11-07 08:23:47 +01:00
Gwendal Roué 7af3858ff6 More robust DatabasePool.close() test 2021-11-07 08:17:48 +01:00
Gwendal Roué c3bbd3d6f8 CHANGELOG 2021-11-07 08:17:46 +01:00
Gwendal Roué eb9d0bce58 Documentation 2021-11-07 08:16:58 +01:00
Gwendal Roué 716e223844 Fix typo 2021-11-06 17:09:12 +01:00
Gwendal Roué 1df5d834e8 Wording 2021-11-06 17:06:51 +01:00
Gwendal Roué 05b03ef56c Wording 2021-11-06 17:02:47 +01:00
Gwendal Roué 06827de207 All fetches are stale 2021-11-06 17:00:19 +01:00
Gwendal Roué 1070b9bd9d Exercise guarantees in context 2021-11-06 16:05:05 +01:00
Gwendal Roué de4c06478d New Concurrency Images 2021-11-06 16:00:40 +01:00
Gwendal Roué 78d5b4abaa Doc of completion block-based async accesses 2021-11-06 12:39:05 +01:00
Gwendal Roué 5e89d08fd0 Layout Concurrency Guide 2021-11-06 12:27:19 +01:00
Gwendal Roué 3d5b436a81 CHANGELOG 2021-11-06 12:23:54 +01:00
Gwendal Roué 1738ad34cd Extract the Concurrency Guide 2021-11-06 12:23:54 +01:00
Gwendal Roué 65668cfc8e Documentation 2021-11-06 11:22:16 +01:00
Gwendal Roué 9249efbe6f Fix UIKit warnings 2021-11-06 09:43:38 +01:00
Gwendal Roué 913860f3ce UUID encoding strategies uppercaseString and lowercaseString
This commit was influenced by https://forums.swift.org/t/53058
2021-11-04 20:33:55 +01:00
Gwendal Roué 088f76db9e Merge pull request #1095 from groue/dev/foreign-keys-checks
Precise foreign key checks for migrations
2021-11-04 19:38:56 +01:00
Gwendal Roué 454dd73c4c CHANGELOG 2021-11-04 18:52:19 +01:00
Gwendal Roué c81a4dbf32 Distinguish "FOREIGN KEY constraint failed" from "FOREIGN KEY constraint violation" errors 2021-11-04 18:44:44 +01:00
Gwendal Roué 127c4e0440 Rename methods that check foreign keys 2021-11-04 18:26:24 +01:00
Gwendal Roué ffdc80646e Documentation 2021-11-04 16:12:46 +01:00
Gwendal Roué 7e9a2f5a73 Fix typo 2021-11-04 15:12:24 +01:00
Gwendal Roué 8a36f4d94e Clean up tests 2021-11-04 15:10:41 +01:00
Gwendal Roué 63ba4fb294 Rename unsafeWithoutDeferredForeignKeyChecks to disablingDeferredForeignKeyChecks 2021-11-04 15:10:33 +01:00
Gwendal Roué d0997efbb6 Documentation 2021-11-04 14:27:34 +01:00
Gwendal Roué 6193c6aa00 foreignKeyViolations() and checkForeignKeyViolations() 2021-11-04 14:19:11 +01:00
Gwendal Roué b66b907fbc Documentation 2021-11-03 14:56:59 +01:00
Gwendal Roué 51c15e9db6 Precise handling of foreign key checks in migrations 2021-11-03 13:26:24 +01:00
Gwendal Roué 0a8967ccde move applied migration identifiers table creation to the top of migrations execution
https://github.com/zdnk/GRDB.swift/commit/51ff937397248355d4b264aedfd5a8f05893a2b8

Thanks @zdnk :-)
2021-11-03 08:33:09 +01:00
Gwendal Roué 19fd58f64f Documentation 2021-11-02 21:48:51 +01:00
Gwendal Roué 19c7ec568c Documentation 2021-11-02 21:42:44 +01:00
Gwendal Roué bc8a31dcd2 Documentation 2021-11-02 20:33:03 +01:00
Gwendal Roué 2273efa07f Improve documentation of persistence methods 2021-11-02 08:13:34 +01:00
Gwendal Roué 62f568d932 Merge branch 'development' into dev/async 2021-11-02 06:02:29 +01:00
Gwendal Roué 1aab03b02a Fix close() test
The behavior of sqlite3_close_v2() depends on SQLite version. Don't test this behavior.
2021-11-01 19:55:31 +01:00
Gwendal Roué 1646dfc49b Fix FAQ organization 2021-11-01 10:28:31 +01:00
Gwendal Roué 640a67257f Documentation for async DatabaseMigrator.migrate() 2021-11-01 10:19:03 +01:00
Gwendal Roué 5be27dd90a CHANGELOG 2021-11-01 10:08:19 +01:00
Gwendal Roué 485ce79293 More ValueObservation async cancellation test 2021-11-01 09:45:16 +01:00
Gwendal Roué 5725d9db21 Refactor the ValueObservation async cancellation test 2021-11-01 08:03:00 +01:00
Gwendal Roué 7897c6a799 asyncUnsafeRead handle closed connection 2021-11-01 07:25:26 +01:00
Gwendal Roué 5f549ef6af Cleanup with Table 2021-11-01 07:22:09 +01:00
Gwendal Roué ac94a2f90e Merge branch 'development' into dev/async 2021-10-31 19:35:13 +01:00
Gwendal Roué 15b38353bc Add experimental warning to the documentation of async methods 2021-10-31 19:35:05 +01:00
Gwendal Roué a7c1a99866 Fix wording 2021-10-31 18:48:26 +01:00
Gwendal Roué 1a87faacfa Merge branch 'development' into dev/async 2021-10-31 18:32:03 +01:00
Gwendal Roué 5cc881138e CHANGELOG 2021-10-31 18:31:32 +01:00
Gwendal Roué 5e56a4465c close() documentation 2021-10-31 18:27:08 +01:00
Gwendal Roué 20cb50f52d Public close() method 2021-10-31 18:12:13 +01:00
Gwendal Roué b4f30784f4 Support for SwiftLint installed via Homebrew on Apple Silicon 2021-10-31 15:32:26 +01:00
Gwendal Roué 0f0c345ebb Fix markdown format 2021-10-31 14:38:10 +01:00
Gwendal Roué 1ee2c8097a SharedValueObservation is experimental 2021-10-31 13:55:18 +01:00
Gwendal Roué 3e58f35f1e I'm so fed up with this
https://developer.apple.com/forums/thread/663975
2021-10-31 13:54:53 +01:00
Gwendal Roué f70b75633c Documentation: fix typo 2021-10-31 12:34:09 +01:00
Gwendal Roué 3a44311b95 Documentation: fix typos and wordings 2021-10-31 12:33:17 +01:00
Gwendal Roué e0a6f43101 Documentation: async/await examples 2021-10-31 12:30:44 +01:00
Gwendal Roué 0c8c8cb1f4 Concurrency Guide: fix wordings 2021-10-31 12:22:23 +01:00
Gwendal Roué fa8598d1e8 Async/Await support is experimental 2021-10-31 11:50:05 +01:00
Gwendal Roué 6cf5a2c33d Merge branch 'development' into dev/async
# Conflicts:
#	CHANGELOG.md
2021-10-31 11:48:27 +01:00
Gwendal Roué 9790d05795 CHANGELOG 2021-10-31 11:29:32 +01:00
Gwendal Roué 273b9befd8 Update documentation for date and uuid encoding strategies 2021-10-31 11:26:27 +01:00
Gwendal Roué 31a5180a58 CHANGELOG 2021-10-31 11:09:22 +01:00
Gwendal Roué 8076e7c725 Fix failing tests for key/id encoding strategies 2021-10-31 11:07:17 +01:00
Gwendal Roué 4cc3768344 Failing tests for key/id encoding strategies 2021-10-31 11:04:01 +01:00
Gwendal Roué 0317c4e454 Reuse screenshot of Combine demo 2021-10-31 06:06:55 +01:00
Gwendal Roué db78c22904 Demo app requirements 2021-10-31 06:04:46 +01:00
Gwendal Roué 6b36c74de9 Concurrency: move saved(_:) and inserted(_:) suggestion to a FAQ 2021-10-31 06:03:35 +01:00
Gwendal Roué 51ab275714 Concurrency: suggest saved(_:) and inserted(_:) 2021-10-30 23:44:30 +02:00
Gwendal Roué b9e1f4604e Concurrency Guide: fix wordings 2021-10-30 23:20:29 +02:00
Gwendal Roué 0b853c5447 Concurrency Guide: fix wordings 2021-10-30 21:08:02 +02:00
Gwendal Roué 691ee8f7fd Concurrency Guide: fix typos and wordings 2021-10-30 20:38:48 +02:00
Gwendal Roué c755dc70ef Restrict async/await to Xcode 13.1+ 2021-10-30 20:09:39 +02:00
Gwendal Roué 9cc30018b6 CHANGELOG 2021-10-30 19:52:09 +02:00
Gwendal Roué 4616ef5229 Remove Concurrency guide from main README 2021-10-30 19:47:57 +02:00
Gwendal Roué 10a741a346 Concurrency Guide 2021-10-30 19:47:57 +02:00
Gwendal Roué 3c78029b3c SwiftUI demo apps: PlayerEditionView saves player when back button is pressed 2021-10-25 19:07:40 +02:00
Gwendal Roué 3ea6fb2201 Merge branch 'development' into dev/async 2021-10-25 18:23:00 +02:00
Gwendal Roué de7d5f42d4 Clarify the benefits of shared observations 2021-10-25 08:47:50 +02:00
Gwendal Roué 450a7c2d71 SharedValueObservation async sequence 2021-10-24 17:47:08 +02:00
Gwendal Roué 2542ad7de8 Reuse ValueObservationStart, and move BufferingPolicy to AsyncValueObservation 2021-10-24 17:33:32 +02:00
Gwendal Roué 2a665df672 Merge branch 'development' into dev/async 2021-10-24 17:13:16 +02:00
Gwendal Roué bddbc31733 Merge pull request #1088 from groue/dev/shareValueObservation
Shared ValueObservation
2021-10-24 17:11:31 +02:00
Gwendal Roué 92e4c8f785 I want a new keyboard ASAP 2021-10-24 17:06:25 +02:00
Gwendal Roué 909afc0233 Fix typo 2021-10-24 17:05:10 +02:00
Gwendal Roué d73228a812 Documentation 2021-10-24 17:04:07 +02:00
Gwendal Roué 76cac45720 Fix typo 2021-10-24 16:35:32 +02:00
Gwendal Roué 22a4f08f40 CHANGELOG 2021-10-24 16:25:18 +02:00
Gwendal Roué ae0edde7c5 Documentation 2021-10-24 16:22:47 +02:00
Gwendal Roué c62e4fd94c Documentation 2021-10-24 16:17:46 +02:00
Gwendal Roué 7690db9284 Documentation 2021-10-24 16:15:46 +02:00
Gwendal Roué 2f212b8a5f SharedValueObservation error handling 2021-10-24 15:46:32 +02:00
Gwendal Roué abc6c55e14 Documentation 2021-10-24 15:17:52 +02:00
Gwendal Roué 450ff62392 Fix SQLCipher tests 2021-10-24 14:03:39 +02:00
Gwendal Roué a5dd61ff13 Fix availability checks in tests
Fix `make test_framework_GRDBiOS_minTarget` with Xcode 13
2021-10-24 13:41:07 +02:00
Gwendal Roué c3618e0cf0 SharedValueObservation publisher 2021-10-24 12:38:00 +02:00
Gwendal Roué a3a804fa82 Upgrade CombineExpectations 2021-10-24 12:37:28 +02:00
Gwendal Roué 8ccaf59d4d Default SharedValueObservation extent: .whileObserved 2021-10-23 17:47:12 +02:00
Gwendal Roué 9e0b1b3ded SharedValueObservation 2021-10-23 17:23:48 +02:00
Gwendal Roué 0a65399a7b Merge branch 'development' into dev/async 2021-10-23 12:48:33 +02:00
Gwendal Roué 618969ab2a More tests for optional collections from prefetched rows 2021-10-23 12:46:30 +02:00
Gwendal Roué 53c662d179 Decode optional collections from prefetched rows
This allows to define records that only decode to-many associations when they are eager-loaded.

See https://github.com/groue/GRDB.swift/issues/1084#issuecomment-948880910
2021-10-23 12:40:55 +02:00
Gwendal Roué 02f71cfecc AsyncValueObservation: let user control buffering policy 2021-10-20 08:16:24 +02:00
Gwendal Roué 00cd547ea6 UIKit demo app: use UIAction 2021-10-19 20:12:26 +02:00
Gwendal Roué 66bbf15f58 UIKit demo app: use @IBSegueAction 2021-10-19 19:30:23 +02:00
Gwendal Roué dbb19979d6 Demo app: prefer tracking over trackingConstantRegion
For those specific player requests, trackingConstantRegion is _correct_. But readers may blindly copy and paste, and use trackingConstantRegion when they should not.

So the demo apps prefer the unoptimized but always-correct `tracking` method instead.
2021-10-19 08:57:45 +02:00
Gwendal Roué 0d8d40d683 Demo apps: document why we use .immediate observation scheduling 2021-10-19 08:55:41 +02:00
Gwendal Roué 5d69d2a35b All demo apps provide unbounded read-only access to the database
Also, UIKit app now does not have to deal with an initial asynchronous delivery of players
2021-10-19 08:54:48 +02:00
Gwendal Roué 128399871a Demo projects organization 2021-10-19 08:15:14 +02:00
Gwendal Roué 4dd5677755 Demo apps: rename newRandom to makeRandom 2021-10-19 08:03:56 +02:00
Gwendal Roué dbf3335188 Demo apps: prefer inserted(_:) over mutating a temp variable 2021-10-19 08:02:09 +02:00
Gwendal Roué 048082f4b2 Demo apps: prefer isEmpty(db) over fetchCount(db) == 0 2021-10-19 07:58:03 +02:00
Gwendal Roué 6a980f90da Async sequence is unsuitable for preventing flash of missing content
See https://forums.swift.org/t/52862 for a longer explanation.

Fortunately, we can base @Query on Combine publishers, which do not have this problem.
2021-10-18 08:41:44 +02:00
Gwendal Roué e4bfea8bcc Use inserted(_:) in order to avoid a temporary variable 2021-10-17 21:25:19 +02:00
Gwendal Roué 329a7c8301 @Query cleanup & documentation 2021-10-17 14:09:53 +02:00
Gwendal Roué 1ff5159d40 Add the MIT license to Query.swift
This file is designed to be copied into user apps: make sure the license comes along.
2021-10-17 13:38:28 +02:00
Gwendal Roué d6f8a9a9ea UIKit demo app is iOS15+/watchOS8+ 2021-10-17 13:26:42 +02:00
Gwendal Roué c711efc7e0 Combine demo app is iOS15+ 2021-10-17 13:26:42 +02:00
Gwendal Roué 01d2bc89a9 Cleanup async demo app 2021-10-17 13:26:42 +02:00
Gwendal Roué 6bcee422b7 Improve tests of async demo app 2021-10-17 13:26:42 +02:00
Gwendal Roué 07faea9cfe Restore demo app tests 2021-10-17 13:26:42 +02:00
Gwendal Roué b76950f695 Follow EnvironmentValues.managedObjectContext example: appDatabase is not optional 2021-10-17 13:26:42 +02:00
Gwendal Roué b9e79791a3 Modernize syntax 2021-10-17 13:26:42 +02:00
Gwendal Roué 533cef692f Use SwiftUI Label 2021-10-17 13:26:42 +02:00
Gwendal Roué 0bed585fd0 Use dismiss from SwiftUI environment 2021-10-17 13:26:42 +02:00
Gwendal Roué 54bef0bba6 Workaround "flash of missing content" https://forums.swift.org/t/52862 2021-10-17 13:26:42 +02:00
Gwendal Roué a7820f9a35 Cleanup 2021-10-17 13:26:42 +02:00
Gwendal Roué bd89311f4d Refactor Query for async sequences 2021-10-17 13:26:41 +02:00
Gwendal Roué 1e17bf011f Refactor Query for AppDatabase access 2021-10-17 13:26:41 +02:00
Gwendal Roué ed8ff31b3e GRDBAsyncDemo 2021-10-17 13:26:41 +02:00
Gwendal Roué 0ead20cdd6 All async apis are experimental 2021-10-17 13:26:41 +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é 646782d499 test AsyncValueObservation with all DatabaseQueue & Pool
Also use .trackingConstantRegion since it triggers optimizations
2021-10-17 13:24:10 +02:00
Gwendal Roué a888c46b1a New: AsyncValueObservation 2021-10-17 13:24:10 +02:00
Gwendal Roué 046d1d6355 -Xfrontend -warn-concurrency -Xfrontend -enable-actor-data-race-checks 2021-10-17 13:24:10 +02:00
Gwendal Roué 8936ef6a40 DatabaseMigrator async methods
migrate(_:)
migrate(_:upTo:)
2021-10-17 13:24:10 +02:00
Gwendal Roué 8754b10a40 Documentation of DatabaseWriter async methods 2021-10-17 13:24:10 +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é a827188881 async DatabaseReader.unsafeRead 2021-10-17 13:23:34 +02:00
Gwendal Roué 64be4763f2 async DatabaseReader.read 2021-10-17 13:23:34 +02:00
Gwendal Roué 20a1c8666e Merge pull request #1078 from groue/dev/qol
More convenience methods
2021-10-17 13:21:22 +02:00
Gwendal Roué e6f00a7c4b CHANGELOG 2021-10-17 13:11:06 +02:00
Gwendal Roué aa05148a18 Documentation 2021-10-17 13:05:07 +02:00
Gwendal Roué 94c86211bc Add inserted and saved in the list of record methods 2021-10-17 13:00:13 +02:00
Gwendal Roué b4570c0e84 Fix typos in Table documentation 2021-10-17 12:56:24 +02:00
Gwendal Roué 8c9ac0ecd2 Documentation for exists, isEmpty, saved, inserted 2021-10-17 12:28:42 +02:00
Gwendal Roué 5f44162abe Rename request.exists(_:) to isEmpty(_:) 2021-10-17 12:27:19 +02:00
Gwendal Roué 55b938a1f5 Test exists(_:), exists(_🔑) and exists(_🆔) 2021-10-17 12:27:19 +02:00
Gwendal Roué 235ea2e689 Test saved(_:) and inserted(_:) 2021-10-17 12:27:19 +02:00
Gwendal Roué 7a046fb27e exists(_:) quality of life improvements 2021-10-17 12:27:19 +02:00
Gwendal Roué cbd68099a9 inserted(_:) and saved(_:) quality of life improvements 2021-10-17 12:27:19 +02:00
Gwendal Roué 6d44c05f3b DatabasePool.erase() prevents concurrent reads until it has completed 2021-10-13 14:46:47 +02:00
Gwendal Roué fe6d4665ee CHANGELOG 2021-10-12 18:32:38 +02:00
Gwendal Roué 0c6c2c7eb4 Merge pull request #1076 from groue/dev/require-swift-5.3
Require Swift 5.3
2021-10-12 18:29:44 +02:00
Gwendal Roué 03fe178439 Bump Xcode compatibility version of projects (Xcode 12+) 2021-10-11 17:13:26 +02:00
Gwendal Roué ff126c1543 SE-0276 Multi-Pattern Catch Clauses 2021-10-11 16:24:38 +02:00
Gwendal Roué 038c320f07 Require Swift 5.3. 2021-10-11 16:18:29 +02:00
Gwendal Roué ba88a150c0 Improve inline doc of database access methods 2021-10-11 15:50:06 +02:00
Gwendal Roué 32df5e27c3 Test for DatabaseRegionObservation tracking DatabaseRegion.fullDatabase 2021-10-01 11:13:41 +02:00
Gwendal Roué 2d4398798a SE-0299 for DatabaseRegionConvertible.fullDatabase 2021-10-01 11:13:20 +02:00
Gwendal Roué 32b2923e89 Merge branch 'development' 2021-09-25 19:44:17 +02:00
Gwendal Roué dbb4668033 v5.12.0 2021-09-25 19:13:10 +02:00
Gwendal Roué abcbf72421 CHANGELOG 2021-09-25 19:13:10 +02:00
Gwendal Roué 6724862eea Bump min iOS version to 11.0
This drops support for 32 bit devices
Fix #1059
Fix #1033
2021-09-25 19:13:10 +02:00
Gwendal Roué 79c5c1d1ba Failing test for #1059
Xcode 13, make test_install_SPM_ios_release
2021-09-25 19:13:10 +02:00
Gwendal Roué bc9ea84bb2 Merge pull request #1052 from jason-gabriele/fix-swift-error
Change init to fix Swift error
2021-09-22 10:34:43 +02:00
Gwendal Roué c0d70f9ef0 Refactor FTS5 tokenization in order to support custom tokenizers 2021-09-21 19:34:06 +02:00
Gwendal Roué bcd65f534b CHANGELOG 2021-09-20 17:55:56 +02:00
Gwendal Roué 7ae5010353 Document the tokenize(_:) method 2021-09-20 17:53:59 +02:00
Gwendal Roué 46eceb5e28 Document prefix-based FTS patterns 2021-09-20 17:47:17 +02:00
Gwendal Roué dfe519ea9b Build FTS patterns from prefixes 2021-09-20 17:35:47 +02:00
Gwendal Roué b0b8872798 Expose FTS tokenization methods 2021-09-20 17:14:07 +02:00
jason fbc0ee77bb Change init to fix Swift error 2021-09-08 13:57:24 -07:00
Gwendal Roué 1acf8e4b1e Merge branch 'development' 2021-09-03 14:59:18 +02:00
Gwendal Roué 042fbe958d v5.11.0 2021-09-03 14:59:02 +02:00
Gwendal Roué e4bc3da4d7 Merge pull request #1029 from sberrevoets/master
Column coding strategies for Codable records
2021-09-03 14:55:20 +02:00
Gwendal Roué cc23263897 Update thank you notice 2021-09-03 14:51:01 +02:00
Gwendal Roué c7e05caf86 CHANGELOG 2021-09-03 14:50:53 +02:00
Gwendal Roué dabdb0d590 Merge branch 'development' into pr-1029 2021-09-03 14:37:29 +02:00
Gwendal Roué 14ca47f84d CHANGELOG 2021-09-03 14:37:14 +02:00
Gwendal Roué d63429ea23 DatabaseMigrator.migrations 2021-09-03 14:31:46 +02:00
Gwendal Roué 87e9a0d0e0 Add license 2021-08-30 19:21:37 +02:00
Gwendal Roué d2e7485b02 Thorough testing of DatabaseColumnDecodingStrategy with including(all:)
We make sure strategies are correctly applied for each involved record type.
2021-08-29 14:14:31 +02:00
Gwendal Roué c23d977759 Thorough testing of DatabaseColumnDecodingStrategy with including(optional:) and including(required:)
We make sure strategies are correctly applied for each involved record type.
2021-08-29 14:12:23 +02:00
Gwendal Roué 0842e11281 Thourough testing of DatabaseColumnDecodingStrategy 2021-08-29 13:53:22 +02:00
Gwendal Roué e6e2536f6b Reverse DatabaseColumnDecodingStrategy
It does not convert coding keys to columns, but columns to CodingKeys, exactly as JSONDecoder.KeyDecodingStrategy
2021-08-29 13:52:36 +02:00
Gwendal Roué 86e4adf860 Spot a design flaw 2021-08-29 10:08:08 +02:00
Gwendal Roué c36aa2bfda Fix typo 2021-08-29 09:59:49 +02:00
Gwendal Roué 427a00582f Rename keyDecodingStrategy to columnDecodingStrategy 2021-08-29 09:55:06 +02:00
Gwendal Roué 6f024373b3 Fix failing test 2021-08-29 09:51:31 +02:00
Gwendal Roué 76f8b5547f Failing test 2021-08-29 09:51:24 +02:00
Gwendal Roué e60a31f401 Fix failing test 2021-08-29 09:40:32 +02:00
Gwendal Roué 8846ea3c25 Failing test 2021-08-29 09:40:16 +02:00
Gwendal Roué d567630966 Column decoding strategy only applies to columns 2021-08-29 08:55:39 +02:00
Gwendal Roué 5a04183baf Fix test name 2021-08-29 08:55:06 +02:00
Gwendal Roué 8aa640f84b Documentation: Column Names Coding Strategies 2021-08-29 08:41:46 +02:00
Gwendal Roué 42045ad8fb Merge remote-tracking branch 'origin/development' into pr1029 2021-08-29 08:37:13 +02:00
Gwendal Roué 0914b56c41 Add mark 2021-08-29 08:31:36 +02:00
Gwendal Roué 33e2c379db Make it clear that strategies apply to columns only
...and not to row scopes or prefetched records
2021-08-28 16:24:53 +02:00
Gwendal Roué 06763e47d2 Share convertToSnakeCase() 2021-08-28 16:05:41 +02:00
Gwendal Roué 5f23d97903 Add the custom strategies 2021-08-28 15:50:34 +02:00
Gwendal Roué 03a8e03a92 Documentation
Doc of cases is copied from JSONDecoder.KeyDecodingStrategy and JSONEncoder.KeyEncodingStrategy
2021-08-28 15:48:31 +02:00
Gwendal Roué 987b8a48e5 Key coding strategies transform keys into columns
They are not String transformers
2021-08-28 15:41:12 +02:00
Gwendal Roué cbc24751d1 Merge pull request #1046 from groue/dev/issue1043
Improve performance of by-index row decoding
2021-08-28 15:28:19 +02:00
Gwendal Roué e0b397fd4e Upgrade versions of compared libraries 2021-08-28 14:55:18 +02:00
Gwendal Roué c26df67e78 Raise the number of iterations for more precise average 2021-08-28 14:54:51 +02:00
Gwendal Roué ae60de399e Inline GRDBPrecondition 2021-08-28 14:54:51 +02:00
Gwendal Roué b06dc5dc77 Do not inline RowDecodingError.valueMismatch creation 2021-08-28 14:54:51 +02:00
Gwendal Roué c0c8eec75d Replace _checkedIndex with _checkIndex
That's what the stdlib Array does
2021-08-28 14:54:51 +02:00
Gwendal Roué 151a457251 Inline StatementColumnConvertible decoding 2021-08-28 14:53:54 +02:00
Gwendal Roué fc4b55dd97 Restore compilation flags to their pristine state
This reverts an undesired change in 0511fec001
2021-08-26 17:30:30 +02:00
Gwendal Roué ba41c22304 Merge branch 'development' 2021-08-22 16:18:55 +02:00
Gwendal Roué 04c18e3fd6 v5.10.0 2021-08-22 16:18:25 +02:00
Gwendal Roué 28f2aa1423 Upgrade performance comparison dependencies 2021-08-22 16:18:25 +02:00
Gwendal Roué 5ecc069bb4 TODO 2021-08-22 13:34:07 +02:00
Gwendal Roué 47934cc858 TODO 2021-08-22 12:44:54 +02:00
Gwendal Roué 0511fec001 SE-0299: enhance access to Column.rowID 2021-08-22 12:42:53 +02:00
Gwendal Roué 14b5eea277 CHANGELOG 2021-08-22 11:12:10 +02:00
Gwendal Roué c7294af809 Merge pull request #1038 from GetToSet/development
Add match operator in ColumnExpression for FTS5.
2021-08-22 11:10:02 +02:00
Gwendal Roué 8eff518850 Documentation for FTS5 column matching 2021-08-22 11:03:54 +02:00
Gwendal Roué 48ef691897 Disallow FTS5 column matching against NULL
SQLite just throws a syntax error
2021-08-22 11:03:18 +02:00
Ethan Wong 836432c4ce Add tests of column matching expression for fts5 2021-08-22 16:30:07 +08:00
Ethan Wong 2f3311cd1e Add match operator in ColumnExpression for FTS5 2021-08-22 16:12:39 +08:00
Gwendal Roué 8f7a2b6a8e Documentation: Combine and Data Consistency 2021-08-21 18:18:57 +02:00
Gwendal Roué 7ae35068c4 Merge pull request #1037 from groue/dev/BUILD_LIBRARY_FOR_DISTRIBUTION
Support BUILD_LIBRARY_FOR_DISTRIBUTION
2021-08-21 17:34:32 +02:00
Gwendal Roué 6639e9c598 CHANGELOG 2021-08-21 15:55:37 +02:00
Gwendal Roué e6cdbb156d FAQ: Does GRDB support library evolution and ABI stability 2021-08-21 15:48:17 +02:00
Gwendal Roué e2c9734df1 Specialize StatementColumnConvertible cursors 2021-08-21 15:48:07 +02:00
Gwendal Roué 18e9b1b9aa Specialize StatementColumnConvertible decoding 2021-08-21 14:53:11 +02:00
Gwendal Roué 59c4d42076 Remove test warnings with BUILD_LIBRARY_FOR_DISTRIBUTION 2021-08-21 14:08:46 +02:00
Gwendal Roué 665770c50c Remove all ABI annotations 2021-08-21 13:14:54 +02:00
Gwendal Roué f36f4aaf74 Deprecate count(_ counted: SQLSelectable) 2021-08-21 12:44:14 +02:00
Gwendal Roué 2858b803d0 Remove useless <Void> qualifiers
SQLRequest and CommonTableExpression are <Row> by default
2021-08-21 12:25:04 +02:00
Gwendal Roué faf100dbba Merge pull request #1036 from groue/dev/github-action
Basic GitHub action
2021-08-21 12:10:53 +02:00
Gwendal Roué 8af2b4bf1b Basic GitHub action 2021-08-21 12:06:09 +02:00
Gwendal Roué 253c878367 Cleanup 2021-08-17 08:30:51 +02:00
Gwendal Roué f5b1219549 SQLStatementCursor no longer allocates a copy of the sql C string
Based on https://forums.swift.org/t/stable-pointer-into-a-c-string-without-copying-it/51244
2021-08-16 18:59:55 +02:00
Gwendal Roué eda960de58 Merge branch 'development' 2021-08-15 19:12:58 +02:00
Gwendal Roué f0443a63eb v5.9.0 2021-08-15 19:12:48 +02:00
Gwendal Roué 24b978c3bb Update thank you notice 2021-08-15 14:33:03 +02:00
Gwendal Roué 3d180183a4 CHANGELOG 2021-08-15 14:32:51 +02:00
Gwendal Roué 98930d7f1d Merge pull request #1025 from DrawboardLtd/value-observer-reducer-locking
Added locking around `reducer` to mitigate Release build crashes.
2021-08-15 14:23:18 +02:00
Gwendal Roué adc16ea7dc Protect mutating TextOutputStream with a lock
This change addresses https://github.com/groue/GRDB.swift/pull/1025#issuecomment-898894618
2021-08-15 13:03:37 +02:00
Scott Berrevoets 79abf62a47 Fix name and convert Decodables as well 2021-08-14 21:45:35 -07:00
Scott Berrevoets 4ab7f1cf3e Add support for encoding as well 2021-08-12 20:12:10 -07:00
Scott Berrevoets cdc7805471 Add option for converting snake case
This adds an option to convert column names from snake case to camel
case, similar to how JSONDecoder works. In fact, the implementation here
is largely based on JSONDecoder's implementation.
2021-08-12 20:11:54 -07:00
Renaud Lienhart 7791e300d2 Use the ValueObserver.synchronized() helper 2021-08-06 09:27:39 +10:00
Matt Gallagher 8350dced55 Added locking around reducer to mitigate Release build crashes. 2021-08-06 09:10:29 +10:00
Gwendal Roué 97221c7bd6 Documentation 2021-07-31 09:39:24 +02:00
Gwendal Roué eb6895207e Remove Swiftlint warnings 2021-07-30 16:14:03 +02:00
Gwendal Roué d93b2f16e4 Remove the promising swiftlint rule that catches urls in doc comments
It yields false positives.

https://github.com/groue/GRDB.swift/pull/1012#issuecomment-889919351
2021-07-30 16:12:47 +02:00
Gwendal Roué f09a5e105d CHANGELOG 2021-07-30 14:34:38 +02:00
Gwendal Roué e6f6a11277 Merge pull request #1019 from groue/dev/merge-statements
Merge prepared statement types, and introduce statement cursor
2021-07-30 14:31:48 +02:00
Gwendal Roué fe95d07062 Documentation 2021-07-30 14:25:49 +02:00
Gwendal Roué dc3fac95db allStatements() can build statements without any arguments 2021-07-30 14:24:08 +02:00
Gwendal Roué be0a2c01e1 More allStatements() documentation 2021-07-30 13:55:59 +02:00
Gwendal Roué f232dfde27 CHANGELOG 2021-07-30 13:44:23 +02:00
Gwendal Roué e1dd96603b Test that cursors can trigger transaction observers
This is important because users will start executing database modifications with fetching methods, now that they have db.allStatement().
2021-07-30 13:41:52 +02:00
Gwendal Roué f2296c065a Test that cursors can invalidate schema cache
This is important because users will start executing DROP statements with fetching methods, now that they have db.allStatement().
2021-07-30 13:02:36 +02:00
Gwendal Roué 096eeffecf More allStatements() documentation 2021-07-30 12:54:52 +02:00
Gwendal Roué 6bbec1495d fix typo 2021-07-30 08:53:31 +02:00
Gwendal Roué a60fe170de Document allStatements() 2021-07-30 08:51:57 +02:00
Gwendal Roué 5cd34da6ca Use allStatements() from makeStatement() 2021-07-30 08:50:15 +02:00
Gwendal Roué a4acbf4854 Tests consuming values from allStatements() 2021-07-29 23:04:02 +02:00
Gwendal Roué c9eb67dae8 Database.allStatements(sql:literal:)
Addresses #1015
2021-07-29 22:41:49 +02:00
Gwendal Roué bf601e6810 Merge SelectStatement and UpdateStatement
Addresses #1015
2021-07-29 20:20:15 +02:00
Gwendal Roué c45f681813 Update thank you notice 2021-07-21 08:41:10 +02:00
Gwendal Roué 6a2645e0be CHANGELOG 2021-07-21 08:40:53 +02:00
Gwendal Roué 96108a5b9b Merge pull request #1012 from ZevEisenberg/add-brackets-to-urls
Add brackets to urls in doc comments to make them clickable
2021-07-21 07:53:58 +02:00
Zev Eisenberg a6e0d47d61 Add lint rule to catch URLs in doc comments that are not wrapped in angle brackets. 2021-07-20 21:10:36 -04:00
Zev Eisenberg 8b060e6b09 Add angle brackets to URLs to make them clickable in Xcode's rendered documentation. 2021-07-20 20:53:58 -04:00
Gwendal Roué f0a99a9100 Merge pull request #1010 from tternes/tt-add-vacuum-into
Add VACUUM INTO Support
2021-07-20 20:15:33 +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
Gwendal Roué 8d4416d02e Update thank you notice 2021-07-20 19:36:49 +02:00
Gwendal Roué 6db245efe5 CHANGELOG 2021-07-20 19:35:59 +02:00
Gwendal Roué c115b6a92d Explain why vacuum(into:) is not available on DatabaseReader 2021-07-20 19:31:22 +02:00
Thaddeus Ternes dc40da1ef2 Improvements based on PR feedback 2021-07-19 21:59:43 -05:00
Gwendal Roué 374595d89e Merge pull request #1009 from kaishin/patch-1
Remove extra dot at the end of reference URL
2021-07-19 18:49:23 +02:00
Gwendal Roué 2d05dd488c Update TODO.md 2021-07-19 11:42:26 +02:00
Thaddeus Ternes 7d0c8c6657 Refactor tests, fix inline documentation parameter value 2021-07-12 02:28:49 -05:00
Thaddeus Ternes ed9fb39982 Add inline documentation 2021-07-12 01:26:34 -05:00
Thaddeus Ternes b28f75c5a2 Add VACUUM INTO support to DatabaseWriter 2021-07-12 01:19:45 -05:00
Reda Lemeden 1ac364defb Remove extra dot at the end of reference URL 2021-07-12 02:11:34 +02:00
Gwendal Roué e19de4e42e Merge branch 'dev/codable-database-value' into development 2021-07-04 19:29:47 +02:00
Gwendal Roué 57cf9b45b6 Add missing Foundation import for SPM 2021-07-04 19:28:27 +02:00
Gwendal Roué d772e8da3a CHANGELOG 2021-07-04 18:37:44 +02:00
Gwendal Roué ad48aa6eec Document the default DatabaseValueConvertible+Codable implementation 2021-07-04 18:36:56 +02:00
Gwendal Roué 620eb6f21c Default DatabaseValueConvertible+Codable implementation uses the JSON format 2021-07-04 17:34:31 +02:00
Gwendal Roué 653837bb02 Merge branch 'master' into development 2021-07-04 12:05:30 +02:00
Gwendal Roué 3de6f51427 Document that cipher_plaintext_header_size disables the salt 2021-07-01 09:12:57 +02:00
Gwendal Roué 9456fe809d Fix for Xcode 11.4 2021-06-27 16:36:18 +02:00
Gwendal Roué e907bc2686 Fix tvOS 14.5 simulator for Travis 2021-06-27 16:11:37 +02:00
Gwendal Roué e386553c18 Update Makefile for Xcode 12.5 2021-06-27 16:04:58 +02:00
Gwendal Roué 3b435d018f Use Xcode 12.5 on Travis 2021-06-27 15:54:56 +02:00
Gwendal Roué b5de7a907a Update link to 0xdead10cc documentation 2021-06-27 15:43:32 +02:00
Gwendal Roué e5bb488b00 CHANGELOG 2021-06-27 15:39:21 +02:00
Gwendal Roué 76852c1f9c Improve documentation about handling of NULL in foreign keys 2021-06-27 15:36:43 +02:00
Gwendal Roué 2f36fc06f5 Fix failing tests for #999 2021-06-27 15:36:12 +02:00
Gwendal Roué ff576d945c Failing tests for #999 2021-06-27 15:35:44 +02:00
Gwendal Roué 0098369e29 Simplify Refinable 2021-06-27 13:11:26 +02:00
Gwendal Roué fb5a3ba388 CHANGELOG 2021-06-22 08:27:38 +02:00
Gwendal Roué 98f398cd75 Deemphasize Table 2021-06-22 08:26:55 +02:00
Gwendal Roué f2dbbee428 Merge pull request #993 from groue/dev/Table
QueryInterfaceRequest builder with dynamic table/view name
2021-06-22 08:15:46 +02:00
Gwendal Roué f54467af3c Fix test for batch deletion of Identifiable type with Optional ID 2021-06-21 18:26:35 +02:00
Gwendal Roué 8c361acd7f Update documentation: batch delete/updates are available on TableRecord 2021-06-21 18:21:04 +02:00
Gwendal Roué bdfd5ce277 Table: batch delete & update
Also, MutablePersistableRecord is no longer necessary for such operations. TableRecord is enough.
2021-06-21 18:08:27 +02:00
Gwendal Roué 120c973e29 Refactor test for association from CTE to Table 2021-06-20 14:31:45 +02:00
Gwendal Roué 17ee1debdc Test associations from TableRecord to Table 2021-06-20 14:26:21 +02:00
Gwendal Roué b154998ae6 Fix documentation 2021-06-20 11:57:53 +02:00
Gwendal Roué eedd3af59b Test association from CTE to Table 2021-06-20 11:54:55 +02:00
Gwendal Roué c5b6325cf6 Table documentation 2021-06-20 11:39:14 +02:00
Gwendal Roué 629840f6f2 Table.fetchCount(_:) 2021-06-20 11:37:59 +02:00
Gwendal Roué e7ef3e1867 Prevent aggregate misuse
I wrote association.max("id") when I meant association.max(Column("id"))
2021-06-20 11:08:24 +02:00
Gwendal Roué 32bbee9c8a Tests for Table Associations 2021-06-20 11:07:38 +02:00
Gwendal Roué 9def48f4f6 Tests for Table 2021-06-19 17:31:40 +02:00
Gwendal Roué 92d10e2713 Table fetching methods 2021-06-19 17:31:23 +02:00
Gwendal Roué 3d855a6a90 Table request methods 2021-06-19 15:25:14 +02:00
Gwendal Roué d7971d76e7 Introduce Table 2021-06-19 14:30:04 +02:00
Gwendal Roué 220d221ea6 CHANGELOG 2021-06-19 14:03:37 +02:00
Gwendal Roué 2ce588ad76 Cached statements from a SQL literal
Addresses https://github.com/groue/GRDB.swift/issues/985#issuecomment-859570434
2021-06-19 13:57:53 +02:00
Gwendal Roué 7050e3cc48 Naive fix for #983 2021-06-19 13:31:30 +02:00
Gwendal Roué fed0b6b136 CHANGELOG 2021-06-19 13:24:27 +02:00
Gwendal Roué e3674ccdf2 Documentation for selectID() 2021-06-19 13:21:13 +02:00
Gwendal Roué 046564dab6 Fix #991 2021-06-19 13:05:24 +02:00
Gwendal Roué d6069888b8 Update thank you notice 2021-06-19 12:24:31 +02:00
Gwendal Roué a9ea79dba9 CHANGELOG 2021-06-19 12:24:23 +02:00
Gwendal Roué 18083165a1 Merge pull request #989 from pp5x/pp5x/fts-synchronize-if-not-exists
FTS: add support of ifNotExists in synchronize()
2021-06-19 12:20:13 +02:00
Gwendal Roué 1aeb10439f synchronize: failing test for FTS5 ifNotExists support 2021-06-17 19:30:24 +02:00
Gwendal Roué 1a2de126ce Fix #988 2021-06-17 19:30:03 +02:00
Pierre Pagnoux d8cb3066a1 synchronize: failing test for ifNotExists support 2021-06-15 17:35:45 +02:00
Gwendal Roué c3b3d2eeb8 Fix Xcode 13 beta 1 compilation warnings 2021-06-08 05:54:45 +02:00
Gwendal Roué 52b1727bb3 Fix Xcode 13 beta 1 compilation error 2021-06-08 05:54:31 +02:00
Gwendal Roué a328349514 Thank you notice 2021-05-31 14:04:02 +02:00
Gwendal Roué 5666ffb4a7 CHANGELOG 2021-05-31 14:03:56 +02:00
Gwendal Roué e6ef8740eb Merge branch 'master' into development 2021-05-31 13:58:51 +02:00
Gwendal Roué df6c2e2b05 Merge pull request #980 from jroselightricks/feature/spelling
Fix spelling succesful -> successful.
2021-05-31 13:58:25 +02:00
Jonathan Rose ae7f83dc40 Fix spelling succesful -> successful. 2021-05-31 14:28:28 +03:00
Gwendal Roué 1693a706e0 Skip tests that do not support encrypted databases 2021-05-29 13:26:17 +02:00
Gwendal Roué af13c91744 Merge branch 'development' 2021-05-16 15:25:33 +02:00
Gwendal Roué b5dea2164f v5.8.0 2021-05-16 15:25:15 +02:00
Gwendal Roué 148897ad73 Simplify 2021-05-04 07:27:21 +02:00
Gwendal Roué 095bfde072 CHANGELOG 2021-05-02 18:05:13 +02:00
Gwendal Roué fabdb73785 Merge pull request #967 from steipete/peter/selectStatement-Debug
Make SelectStatement conform to CustomStringConvertible
2021-05-02 18:03:44 +02:00
Gwendal Roué f30f970cf2 Merge pull request #973 from groue/dev/issue-971
Restore access to attached databases from record types
2021-05-02 10:12:58 +02:00
Gwendal Roué 1c2499528c Merge branch 'development' into dev/issue-971 2021-05-02 10:12:41 +02:00
Gwendal Roué 766e731bf9 Merge pull request #974 from groue/dev/issue-965
Provide access to included associations when root table is not selected
2021-05-02 10:11:12 +02:00
Gwendal Roué b9496a01e1 Simplify FAQ now that Statement conforms to CustomStringConvertible 2021-05-02 10:07:07 +02:00
Gwendal Roué 1554c80fdb Statement.sql checks correct scheduling 2021-05-02 10:02:21 +02:00
Gwendal Roué 61ee7cc3f7 Move SelectStatement.description to Statement 2021-05-02 10:01:44 +02:00
Gwendal Roué 0f481e7867 CHANGELOG 2021-05-01 17:32:02 +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é e5a810105a Failing tests for #965 2021-05-01 16:59:38 +02:00
Gwendal Roué a46b2ad127 Fix "cannot ATTACH database within transaction" error in older versions of SQLite 2021-05-01 15:08:36 +02:00
Gwendal Roué 3ccac4098a CHANGELOG 2021-05-01 15:06:08 +02:00
Gwendal Roué a4e8bbe2da Add test for cross-attached-databases association 2021-05-01 14:55:53 +02:00
Gwendal Roué 52bc7eb7c6 Cleanup 2021-05-01 14:40:20 +02:00
Gwendal Roué e8802fb010 Fix #971 2021-05-01 14:32:01 +02:00
Gwendal Roué 885f43dbad Failing tests for #971 2021-05-01 14:27:44 +02:00
Peter Steinberger 5dfab017e5 Make SelectStatement conform to CustomStringConvertible 2021-04-22 14:12:10 +02:00
Gwendal Roué 35d6ac0041 CHANGELOG 2021-04-18 18:21:22 +02:00
Gwendal Roué eae64b587a Documentation 2021-04-18 17:25:05 +02:00
Gwendal Roué fb6ae07722 Documentation 2021-04-18 17:22:08 +02:00
Gwendal Roué 491e17f62e Documentation 2021-04-18 17:21:13 +02:00
Gwendal Roué f521002e74 Documentation 2021-04-18 17:17:30 +02:00
Gwendal Roué bbaee79618 Documentation 2021-04-18 17:10:47 +02:00
Gwendal Roué 64951c84d7 Documentation 2021-04-18 17:08:02 +02:00
Gwendal Roué 5996b64469 Documentation 2021-04-18 17:00:55 +02:00
Gwendal Roué 65b2fecdfc Documentation 2021-04-18 16:56:38 +02:00
Gwendal Roué 232086e50e Documentation 2021-04-18 16:41:53 +02:00
Gwendal Roué 8f7feda27c Documentation 2021-04-18 16:31:44 +02:00
Gwendal Roué 6aa6c4d4b5 Documentation 2021-04-18 16:19:06 +02:00
Gwendal Roué afc360cf78 Documentation 2021-04-18 16:13:42 +02:00
Gwendal Roué 5673d73738 Documentation 2021-04-18 16:09:22 +02:00
Gwendal Roué 4a894f2b43 Documentation 2021-04-18 16:05:35 +02:00
Gwendal Roué 83cd6d1469 Change Query Interface Organization picture 2021-04-18 14:28:48 +02:00
Gwendal Roué 0b2e5d836f Query Interface Organization 2021-04-18 14:26:46 +02:00
Gwendal Roué b9576aedbe SQLCollection is not public 2021-04-18 11:41:11 +02:00
Gwendal Roué 2f549d21bf Can't articulate distinctive features yet 2021-04-18 11:28:56 +02:00
Gwendal Roué 4d6958b52a Documentation 2021-04-17 20:55:21 +02:00
Gwendal Roué 588b2677e7 Documentation 2021-04-17 20:52:26 +02:00
Gwendal Roué 66e52eea40 Documentation 2021-04-17 20:46:29 +02:00
Gwendal Roué 975cbaa7e8 MyPlayground setup 2021-04-17 20:31:27 +02:00
Gwendal Roué 9e265f7ebc Documentation 2021-04-17 20:19:33 +02:00
Gwendal Roué 37522f3766 Documentation 2021-04-17 19:55:01 +02:00
Gwendal Roué 4980beda69 Documentation 2021-04-17 16:47:28 +02:00
Gwendal Roué 69b9c7331f Documentation 2021-04-17 16:46:16 +02:00
Gwendal Roué 28375f5c1a Organization image 2021-04-17 16:41:37 +02:00
Gwendal Roué e019617a50 Documentation 2021-04-17 16:21:11 +02:00
Gwendal Roué 8ff0c456dc Documentation 2021-04-17 16:13:49 +02:00
Gwendal Roué 744b0c5661 Documentation 2021-04-17 16:10:28 +02:00
Gwendal Roué c6003143c4 Documentation 2021-04-17 16:04:51 +02:00
Gwendal Roué b0545bcfb0 CHANGELOG 2021-04-17 15:52:17 +02:00
Gwendal Roué 3976feb6ab Query Interface Organization 2021-04-17 15:52:11 +02:00
Gwendal Roué 002399ff1a Remove limit(_:offset:) from documentation 2021-04-17 15:44:53 +02:00
Gwendal Roué cdc21531fc Query Interface Organization 2021-04-17 15:41:03 +02:00
Gwendal Roué 7afe011b69 Improve documentation 2021-04-17 15:38:30 +02:00
Gwendal Roué 12809f5891 Fix duplicate file warning 2021-04-17 13:22:27 +02:00
Gwendal Roué 7fd51f440a Warn about DerivableRequest.limit(_:offset:)
We can't deprecate it because the compiler emits a warning on acceptable request.limit() calls :-(
2021-04-17 13:22:08 +02:00
Gwendal Roué 4f0d3b31e1 SQLRequest is SQLRequest<Row> unless stated otherwise 2021-04-17 12:53:20 +02:00
Gwendal Roué 36039fb6a3 Documentation 2021-04-17 12:48:18 +02:00
Gwendal Roué e66e59cd21 Remove misleading documentation
Limiting to-many associations does not do what this false documentation is saying
2021-04-15 18:24:54 +02:00
Gwendal Roué a3279c9f63 Distinctive Features 2021-04-15 18:02:43 +02:00
Gwendal Roué 5ed64ea8f8 CHANGELOG 2021-04-14 20:13:58 +02:00
Gwendal Roué 62763ece52 Documentation for LIKE ESCAPE 2021-04-14 20:12:02 +02: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é 31e2b01c10 Merge branch 'development' 2021-04-11 16:32:47 +02:00
Gwendal Roué 7fd786955c v5.7.4 2021-04-11 16:17:39 +02:00
Gwendal Roué af13283aa7 Update thank you notice 2021-04-11 15:48:56 +02:00
Gwendal Roué 6a5d196c2d CHANGELOG 2021-04-11 15:47:32 +02:00
Gwendal Roué 6959ac80b5 Merge pull request #960 from MartinP7r/userinfo_tests
adds test for userInfo being applied to database encoder/decoder
2021-04-11 15:40:03 +02:00
Martin Pfundmair 0c4e483e9e adds test for userInfo in EncodableRecord.databaseJSONDecoder()
Making sure that `databaseEncodingUserInfo` is being applied to `FetchableRecord.databaseJSONDecoder()`

This tries to cover the other half of the changes in PR groue#958
2021-04-11 09:29:33 +09:00
Gwendal Roué f9c162b657 CHANGELOG 2021-04-10 18:16:53 +02:00
Gwendal Roué c0f537c5e6 Merge pull request #956 from groue/dev/observation-case-insensitivity
Fix case-sensitivity of region-based database observation
2021-04-10 18:12:03 +02:00
Martin Pfundmair 8895d590a0 adds test for userInfo in FetchableRecord.databaseJSONDecoder()
Making sure that databaseDecodingUserInfo is being applied to FetchableRecord.databaseJSONDecoder()

This tries to cover some of the changes in PR groue#958
2021-04-11 00:02:09 +09:00
Gwendal Roué a44c518e31 Fix DatabaseRegion tests for tvOS 10.2 2021-04-10 16:27:46 +02:00
Gwendal Roué 0571d9b3b8 Fix DatabaseRegion tests for iOS 10.3.1 2021-04-10 16:27:45 +02:00
Gwendal Roué c0a3e61253 DatabaseRegion is now case-preserving and case-insensitive 2021-04-10 16:27:45 +02:00
Gwendal Roué c02901b335 Fix canonicalName(_:ofType:) 2021-04-10 16:27:45 +02:00
Gwendal Roué ee2d6d8074 CaseInsensitiveIdentifier should help 2021-04-10 16:27:45 +02:00
Gwendal Roué b51dc81c3a Failing tests for #954 2021-04-10 16:27:45 +02:00
Gwendal Roué 47199ed72b Merge branch 'master' into development 2021-04-10 16:26:55 +02:00
Gwendal Roué 28bddb04fa Merge pull request #955 from steipete/peter/query-base
Ensure Query can be updated
2021-04-10 16:20:14 +02:00
Gwendal Roué c34615ced3 Document that @steipete's test has turned moot
We don't 100% need to address this now, but we 100% need to remember this in the future.
2021-04-10 16:10:02 +02:00
Gwendal Roué a5ffc52dbe Restore the barebone app setup
Leave the AppView(initialOrdering:) initializer, though, so that readers can get some inspiration.
2021-04-10 15:45:00 +02:00
Gwendal Roué fd61a5f1ea Remove 14.5 IPHONEOS_DEPLOYMENT_TARGET
Tests succeed on 14.4, and 14.0 target does not generate any Xcode warning
2021-04-10 15:37:18 +02:00
Gwendal Roué 0f70e9d9c9 Remove all DEVELOPMENT_TEAM from demo app 2021-04-10 15:35:42 +02:00
Gwendal Roué d4f1102976 Document how AppDatabase.makeShared() supports test
This helps readers understand the purpose of those lines, and remove them if they are not interested.
2021-04-10 15:07:02 +02:00
Martin Pfundmair 1591948c10 Merge pull request #958 from Rightpoint/userinfo-fix
Always add userInfo to databaseJSONDecoder and databaseJSONEncoder
2021-04-10 15:21:52 +09:00
Chris Ballinger 43de1c24a7 Add userInfo to databaseJSONDecoder and databaseJSONEncoder 2021-04-08 13:11:59 -07:00
Peter Steinberger 481f6e93e5 Add UI test to show late-changing of Query 2021-04-08 10:41:20 +02:00
Peter Steinberger 6887441264 Ensure Query can be updated 2021-04-07 15:32:59 +02:00
Gwendal Roué e017eddf4f Merge branch 'development' 2021-04-05 17:00:08 +02:00
Gwendal Roué 53d75c37aa v5.7.3 2021-04-05 16:59:44 +02:00
Gwendal Roué 331990ce33 CHANGELOG 2021-04-05 16:54:56 +02:00
Gwendal Roué 63a52acb34 Merge pull request #953 from groue/dev/refactor-SwiftUI-demo
Refactor the SwiftUI demo app
2021-04-05 16:51:17 +02:00
Gwendal Roué 6958a10a08 Refactor the SwiftUI demo application 2021-04-05 15:28:45 +02:00
Martin Pfundmair 5d14b3d6db Merge pull request #952 from holsety/tiny/typo
Fix a tiny typo
2021-04-05 08:00:44 +09:00
hlst de0709163c Fix a tiny typo 2021-04-05 06:31:56 +08:00
Gwendal Roué 8c872fccfc End of experiment. But we squeezed a few more cycles :-) 2021-04-04 13:50:17 +02:00
Martin Pfundmair 46867877fd Merge pull request #951 from alexwlchan/patch-1
Fix a typo: "bet set" ~> "be set"
2021-04-04 09:25:09 +09:00
Alex Chan 622ecda283 Fix a typo: "bet set" ~> "be set" 2021-04-03 21:06:05 +01:00
Gwendal Roué 5f9911ff0d Performance tests for optimized records 2021-04-03 18:02:15 +02:00
Gwendal Roué eaf830c05c Fix paths in performance report 2021-04-03 16:47:53 +02:00
Gwendal Roué 064dec5095 Upgrade Realm 2021-04-03 16:26:27 +02:00
Gwendal Roué 89521a7288 Improve statement binding performance 2021-04-03 14:52:22 +02:00
Gwendal Roué 76d4e38cd1 CHANGELOG and thank you notice for #950 2021-04-02 08:29:25 +02:00
Gwendal Roué c56a56a2f3 Merge pull request #950 from MartinP7r/fix/json-column-memory
Fix memory consumption when encoding JSON columns
2021-04-02 08:26:21 +02:00
Martin Pfundmair 02d3518194 adds autoreleasepool for databaseJSONEncoder
when encoding json columns in order to prevent memory build up
2021-04-01 18:40:19 +09:00
Gwendal Roué 67892d7cdb CHANGELOG 2021-03-29 06:12:17 +02:00
Gwendal Roué 0e091124a2 v5.7.2 2021-03-29 06:09:24 +02:00
Gwendal Roué 2402185235 Make SQLLiteral public 2021-03-29 06:08:44 +02:00
Gwendal Roué f406062b81 Merge pull request #948 from xAlien95/patch-1
Fix documentation typo
2021-03-29 06:06:17 +02:00
Stefano De Carolis 7bf25925c7 Fix documentation typo 2021-03-29 02:25:10 +02:00
Gwendal Roué 8dd8a57de3 v5.7.1 2021-03-28 15:33:58 +02:00
Gwendal Roué fa8a8f0b87 Add fixit for SQLLiteral 2021-03-28 15:31:23 +02:00
Gwendal Roué fa2c489ee4 Fix typo 2021-03-28 10:20:35 +02:00
Gwendal Roué 2cb0baf88e Merge branch 'development' 2021-03-28 10:17:20 +02:00
Gwendal Roué 1ab23dfa52 v5.7.0 2021-03-28 10:16:20 +02:00
Gwendal Roué bd29585461 Wording 2021-03-28 10:12:55 +02:00
Gwendal Roué f1cd6dbae8 CHANGELOG 2021-03-28 09:56:47 +02:00
Gwendal Roué a91d9b23e0 Merge pull request #947 from Rightpoint/codable-access
Allow access to Encoder from KeyedEncodingContainer
2021-03-28 09:51:57 +02:00
Gwendal Roué 7eb348cb2a [skip travis] New Identifiable Records documentation chapter 2021-03-28 08:39:43 +02:00
Gwendal Roué ab4ae144ac [skip travis] Simplify Record introduction 2021-03-28 07:51:12 +02:00
Gwendal Roué 09899e9bcf filter(id:) does not accept optionals 2021-03-28 06:48:22 +02:00
Gwendal Roué 2625653532 Improve documentation of the EXISTS operator 2021-03-27 22:49:58 +01:00
Gwendal Roué ea26dea687 Fix typo 2021-03-27 22:20:30 +01:00
Gwendal Roué 4a17281bd7 Fix typo 2021-03-27 22:09:11 +01:00
Gwendal Roué e9ba3e6ccc Fix typo 2021-03-27 22:08:20 +01:00
Gwendal Roué 9692410e7d CHANGELOG 2021-03-27 22:07:09 +01:00
Gwendal Roué b69dfb1709 Document the type-safe extensions to Identifiable records 2021-03-27 22:07:04 +01:00
Gwendal Roué 4307eedbc0 Update demo apps with the new type-safe primary key methods 2021-03-27 21:10:34 +01:00
Gwendal Roué 521f9e498a deleteOne(_🆔) and deleteAll(_:ids:) 2021-03-27 21:07:01 +01:00
Gwendal Roué e7ce5f13e7 Tests for rowid filtering of Identifiable types 2021-03-27 21:06:01 +01:00
Gwendal Roué 55c0abef8b Tests for id filtering of Identifiable types 2021-03-27 19:46:03 +01:00
Gwendal Roué 9489174b98 Filter by id for Identifiable types with optional ID type 2021-03-27 18:47:16 +01:00
Gwendal Roué b086b99821 Filter by id for Identifiable types 2021-03-27 17:43:01 +01:00
Chris Ballinger 984dea156c Allow access to Encoder and Decoder from KeyedCodingContainer 2021-03-27 08:57:44 -07:00
Gwendal Roué 1297a781fd Better fatal error messages for unimplemented features 2021-03-27 16:41:23 +01:00
Gwendal Roué c4f9ddd688 Simplify handling of collated expressions 2021-03-27 16:34:37 +01:00
Gwendal Roué fcff9b34ba Make sure empty migrator publisher is async as well 2021-03-27 15:23:30 +01:00
Gwendal Roué 914ad1b882 Address #945 by running a distinctive query
When a user finds this query in the error log, it will be easier for everybody to understand why it happens.
2021-03-27 14:56:08 +01:00
Gwendal Roué b13922b76e Database schema cache distinguishes the main from the temp schema
Addresses https://github.com/groue/GRDB.swift/pull/946#issuecomment-805756799
2021-03-27 14:50:25 +01:00
Gwendal Roué f6f4839e07 Document that WITHOUT ROWID tables can't be tracked (#945) 2021-03-27 11:50:38 +01:00
Gwendal Roué c5aeec3385 Documentation 2021-03-23 18:33:02 +01:00
Gwendal Roué 21b22ab3fb Travis: check old Xcode version first 2021-03-21 16:38:26 +01:00
Gwendal Roué 39eb57fe64 Fix for Xcode 11.4 2021-03-21 16:36:54 +01:00
Gwendal Roué bbacfd5ec1 Wording 2021-03-21 16:32:35 +01:00
Gwendal Roué 7bbec01dec Remove references to GRDBObjc 2021-03-21 14:25:19 +01:00
Gwendal Roué 969f28945c Focus 2021-03-21 14:20:25 +01:00
Gwendal Roué 869f6cb3b3 Focus 2021-03-21 14:19:49 +01:00
Gwendal Roué 607e53b04e Add an "In a glance" usage section 2021-03-21 14:14:15 +01:00
Gwendal Roué 051fdb37b6 Rename SQLLiteral to SQL 2021-03-21 13:33:49 +01:00
Gwendal Roué db963cbbb2 TODO 2021-03-21 13:05:45 +01:00
Gwendal Roué 13120063e0 TODO 2021-03-21 13:01:00 +01:00
Gwendal Roué be02e920d2 Dry up number documentation 2021-03-21 12:58:52 +01:00
Gwendal Roué 901b9c6fe6 More NSNumber/NSDecimalNumber tests 2021-03-21 12:58:11 +01:00
Gwendal Roué 64f5e6bdca Always use Decimal(string:) when decoding strings 2021-03-21 12:57:50 +01:00
Gwendal Roué 178727fd5b CHANGELOG 2021-03-20 20:22:40 +01:00
Gwendal Roué 791a8ed41b Update documentation for NSNumber, NSDecimalNumber, and Decimal 2021-03-20 20:14:31 +01:00
Gwendal Roué d9083a7bf5 Support for Foundation.Decimal 2021-03-20 20:11:26 +01:00
Gwendal Roué e355af3584 Decode NSNumber from textual database values 2021-03-20 17:15:16 +01:00
Gwendal Roué 5b39494125 TODO 2021-03-20 15:51:06 +01:00
Gwendal Roué 4f709e8e4f CHANGELOG 2021-03-20 15:51:01 +01:00
Gwendal Roué 63448fb0bc Documentation for EXISTS 2021-03-20 15:47:00 +01:00
Gwendal Roué 989a0e82eb Test for EXISTS expression 2021-03-20 15:46:46 +01:00
Gwendal Roué 8ba05a011d EXISTS expression 2021-03-20 15:24:32 +01:00
Gwendal Roué 659e6a53bb Documentation 2021-03-20 14:40:17 +01:00
Gwendal Roué 8a7ab17349 TODO 2021-03-20 14:37:54 +01:00
Gwendal Roué 3113e20f69 CHANGELOG 2021-03-20 14:37:13 +01:00
Gwendal Roué e44dc8486a Documentation for asynchronous migrations 2021-03-20 14:33:37 +01:00
Gwendal Roué 21a2206443 Remove asynchronous migration to target identifier
Migrating up to a specific identifier is a test-oriented use case: it does not need any async version.
2021-03-20 14:20:41 +01:00
Gwendal Roué f38c2ff754 Test DatabasePublishers.Migrate 2021-03-20 14:12:09 +01:00
Gwendal Roué 8ad880e20d DatabaseMigrator publisher 2021-03-20 14:11:43 +01:00
Gwendal Roué 50cec3fce7 Asynchronous migrations tests 2021-03-20 13:27:40 +01:00
Gwendal Roué c9c652dddc DatabaseMigrator async migrations 2021-03-20 13:25:43 +01:00
Gwendal Roué edde38837e TODO 2021-03-20 12:21:53 +01: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é 7c023d5c1f CHANGELOG 2021-03-18 19:30:50 +01:00
Gwendal Roué 99a06f1c05 CHANGELOG 2021-03-18 19:29:02 +01:00
Gwendal Roué 0c2b5318bf Documentation 2021-03-18 19:28:46 +01:00
Gwendal Roué c47316a846 Documentation 2021-03-18 19:25:07 +01:00
Gwendal Roué 529b042b8a Database.makeSelectStatement(literal:) tests 2021-03-18 19:24:37 +01:00
Gwendal Roué 5aa1184e68 Database.makeSelectStatement(literal:) 2021-03-18 19:24:24 +01:00
Gwendal Roué a912c5cbe5 Documentation 2021-03-18 18:53:16 +01:00
Gwendal Roué 3753bd8d6d Database.makeUpdateStatement(literal:) tests 2021-03-18 18:48:22 +01:00
Gwendal Roué a6f7d9ba86 Database.makeUpdateStatement(literal:) accepts all arguments, or no arguments 2021-03-18 18:48:06 +01:00
Gwendal Roué fdc47d7158 Database.makeUpdateStatement(literal:) 2021-03-18 17:08:25 +01:00
Gwendal Roué 8aa4807f9b CHANGELOG 2021-03-17 21:57:49 +01:00
Gwendal Roué 339fbdf1ce Literal column alteration 2021-03-17 21:54:56 +01:00
Gwendal Roué ada972d78d Documentation 2021-03-17 21:31:35 +01:00
Gwendal Roué 085c8f5953 Literal table and constraint definition 2021-03-17 20:26:49 +01:00
Gwendal Roué 1f4db99a37 Documentation fix 2021-03-17 20:26:10 +01:00
Gwendal Roué 076813826f CHANGELOG 2021-03-17 19:01:04 +01:00
Gwendal Roué fcb6049381 Test SQLLiteral protocols in practice 2021-03-17 18:21:44 +01:00
Gwendal Roué 4c88d792f0 Documentation 2021-03-14 14:13:29 +01:00
Gwendal Roué 9d64a32814 Improve SQLLiteral documentation 2021-03-14 13:26:16 +01:00
Gwendal Roué 77db650464 More SQLLiteral interpolation test 2021-03-14 13:08:10 +01:00
Gwendal Roué 0e8a42aedc Tests for interpretations of SQLLiteral
If those tests break, we have introduced a breaking change.
2021-03-14 12:57:15 +01:00
Gwendal Roué 8ad096ae35 Refactor column counting for improved testability 2021-03-14 11:49:35 +01:00
Gwendal Roué ac436a2770 Make SQLLiteral less painful to use 2021-03-14 11:09:29 +01:00
Gwendal Roué 0133ff9056 Merge pull request #938 from michaelkirk/patch-1
fix small typos
2021-03-13 07:56:31 +01:00
Michael Kirk 178fb8688a fix small typos 2021-03-12 15:53:35 -08:00
Gwendal Roué 0b5f7e960b [skip travis] Mention key-value tables as a valid alternative
Inspired from https://twitter.com/dhartbit/status/1370434943956959238
2021-03-12 19:30:42 +01:00
Gwendal Roué ae3c491661 Merge branch 'development' 2021-03-12 17:47:50 +01:00
Gwendal Roué 8548d7a727 v5.6.0 2021-03-12 17:12:41 +01:00
Gwendal Roué daab7aef2c Fix typo 2021-03-12 15:37:29 +01:00
Gwendal Roué ba9b4db197 Fix typo 2021-03-12 15:33:35 +01:00
Gwendal Roué cab795a4a9 Wording 2021-03-12 15:32:00 +01:00
Gwendal Roué b331a715ef CHANGELOG 2021-03-12 15:30:31 +01:00
Gwendal Roué 48e214b4b3 Link to demo app tests 2021-03-12 14:42:51 +01:00
Gwendal Roué 65beb24d41 Simplify 2021-03-12 14:33:01 +01:00
Gwendal Roué e1c7150714 Documentation 2021-03-12 14:26:43 +01:00
Gwendal Roué cc93f43ee4 Better introduction to DerivableRequest
Also reintroduce extensions to QueryInterfaceRequest
2021-03-12 14:24:47 +01:00
Gwendal Roué 33174fce8e Documentation 2021-03-12 14:00:31 +01:00
Gwendal Roué cb8611587c Fix Swiftlint warning 2021-03-12 13:48:41 +01:00
Gwendal Roué 6e7555514a More collection initializers from cursors
- support for minimumCapacity
- support for Dictionary (cursors with unique keys)
2021-03-12 13:48:25 +01:00
Gwendal Roué 8b1efb2c80 Single-Row Tables guide 2021-03-12 11:31:32 +01:00
Gwendal Roué 8388486289 TODO 2021-03-12 08:32:32 +01:00
Gwendal Roué c3dcd7636e Merge pull request #936 from groue/dev/more-eager-loading
Complete Associations and the DerivableRequest Protocol
2021-03-11 19:35:39 +01:00
Gwendal Roué 464b77bdcd Improve "Record Types Hide Intimate Database Details" 2021-03-10 13:25:25 +01:00
Gwendal Roué fe437fb7e3 Improve "Record Types Hide Intimate Database Details" 2021-03-10 13:21:25 +01:00
Gwendal Roué 1a2a6898eb Improve "Record Types Hide Intimate Database Details" 2021-03-10 13:07:16 +01:00
Gwendal Roué de2a37fb89 Improve "Record Types Hide Intimate Database Details" 2021-03-10 13:06:05 +01:00
Gwendal Roué 1d5604815d Improve "Record Types Hide Intimate Database Details" 2021-03-10 13:05:11 +01:00
Gwendal Roué 4de5059373 Improve "Record Types Hide Intimate Database Details" 2021-03-10 12:55:25 +01:00
Gwendal Roué 850040c51e Fix typo 2021-03-10 09:02:00 +01:00
Gwendal Roué eb0983facd Wording 2021-03-10 08:59:40 +01:00
Gwendal Roué 9e974a4c96 Fix typo 2021-03-10 08:58:39 +01:00
Gwendal Roué 609fcf6a6d CHANGELOG 2021-03-10 08:57:46 +01:00
Gwendal Roué 5e61d38272 Add a Record Types Hide Intimate Database Details chapter 2021-03-10 08:56:53 +01:00
Gwendal Roué cdbca5d215 Fix sample code 2021-03-09 08:29:14 +01:00
Gwendal Roué 9bda5fc41b Move the Further Refinements to Associations chapter 2021-03-09 08:27:29 +01:00
Gwendal Roué 04d35381a6 Documentation 2021-03-09 07:57:57 +01:00
Gwendal Roué 1f27e724c9 Open a door 2021-03-09 07:21:43 +01:00
Gwendal Roué b22afd7f17 CHANGELOG 2021-03-08 21:56:47 +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é 42718db49d Documentation 2021-03-08 21:11:36 +01:00
Gwendal Roué e08df854dd Lower the tone about record responsabilities 2021-03-08 20:50:17 +01:00
Gwendal Roué f4b7d99aab Remove warning about associations that use CTEs 2021-03-08 19:59:47 +01:00
Gwendal Roué 4dd8042894 Make it possible to decode arrays of scalars from including(all:) 2021-03-08 14:21:35 +01:00
Gwendal Roué 4583bbfa90 Test for joined associations that use CTEs 2021-03-08 14:10:43 +01:00
Gwendal Roué a655974eb0 Let joined associations use CTEs 2021-03-08 14:10:38 +01:00
Gwendal Roué d4fc1d9566 Update documentation for the new Association/DerivableRequest powers 2021-03-08 08:36:32 +01:00
Gwendal Roué f9b554d00a Merge AggregateJoinableRequest into DerivableRequest
Also put distinct(), limit(_:offset:) and with(_:) into DerivableRequest
2021-03-08 07:55:20 +01:00
Gwendal Roué 6b733cfc0a Tests for including(all:) with distinct, limited, grouped, and cte-decorated associations 2021-03-07 20:32:21 +01:00
Gwendal Roué f0aec27095 AssociationToMany: distinct(), limit(_:offset:), with(_:) 2021-03-07 20:25:30 +01:00
Gwendal Roué 092b0d0e44 Move with(cte) methods to the file it belongs to 2021-03-07 19:58:15 +01:00
Gwendal Roué d2a22ddd97 Make sure joined associations do not use prefetched to-many features
One can't join a distinct, grouped, or limited association.
2021-03-07 19:56:04 +01:00
Gwendal Roué 9c6ff6a1c0 Simplifly association aggregates
We don't need any promise. We used to, but SQLExpression.fastPrimaryKey has been introduced since then.
2021-03-07 19:36:08 +01:00
Gwendal Roué a4dca3390a AggregateJoinableRequest is the new protocol that supports aggregate annotations
AssociationToMany is a subprotocol of AggregateJoinableRequest :-)
2021-03-07 19:15:09 +01:00
Gwendal Roué ea6a052b73 Merge all SQLRelation properties 2021-03-07 17:12:44 +01:00
Gwendal Roué f49fab0cff Merge SQLQuery into SQLRelation 2021-03-07 14:37:53 +01:00
Gwendal Roué 37faf0a1fd Upgrade obsolete documentation 2021-03-07 14:20:28 +01:00
Gwendal Roué 4b5a6b503a TODO 2021-03-07 13:12:28 +01:00
Gwendal Roué 2a85b1230b Merge pull request #934 from groue/dev/issue-932
Fix a crash in the ValueObservation publisher
2021-03-07 12:12:44 +01:00
Gwendal Roué 3eb17fdbb7 CHANGELOG 2021-03-07 12:11:50 +01:00
Gwendal Roué 5400217bb6 ReceiveValuesOnSubscription forwards cancellation
Fixes #932
2021-03-07 12:10:35 +01:00
Gwendal Roué 71083a5586 Merge pull request #933 from groue/dev/issue-931
Fix DatabaseMigrator.eraseDatabaseOnSchemaChange in the context of shared databases
2021-03-07 12:09:04 +01:00
Gwendal Roué 37279dfad2 CHANGELOG 2021-03-06 14:20:11 +01:00
Gwendal Roué 8be0976bd1 Fix #931 2021-03-06 14:01:56 +01:00
Gwendal Roué 7623a96034 Failing test for #931 2021-03-06 13:34:27 +01:00
Gwendal Roué 424df6dee3 TODO 2021-03-06 13:25:59 +01:00
Gwendal Roué 48b6faa45e Improve documentation of Configuration.prepareDatabase 2021-03-06 13:25:52 +01:00
Gwendal Roué bac7b6b0e5 Refactor function calls
and make it possible to express other DISTINCT aggregates than COUNT: SUM(DISTINCT ...), etc.
2021-03-06 13:25:25 +01:00
Gwendal Roué 174766925a Remove warning 2021-03-03 20:04:08 +01:00
Gwendal Roué 9d5cb15380 SQLExpression documentation & cleanup 2021-03-03 20:03:56 +01:00
Gwendal Roué 284ebbd3ef [skip travis] Update thank you notice 2021-03-03 14:09:23 +01:00
Gwendal Roué 3b6cf4c12b Merge branch 'development' 2021-03-03 13:00:39 +01:00
Gwendal Roué 2329a5c7b4 v5.5.0 2021-03-03 13:00:21 +01:00
Gwendal Roué 8f50d70703 Merge pull request #930 from groue/dev/issue-929
Fix SQL generation for `COLLATE`, `IN`, `NOT IN`
2021-03-03 07:56:14 +01:00
Gwendal Roué d2d515658e CHANGELOG 2021-03-02 20:21:51 +01:00
Gwendal Roué 72123494ca Add test for NOT IN and collated expressions 2021-03-02 20:16:15 +01:00
Gwendal Roué 7b81fd1bff Fix documentation for #929 2021-03-02 20:12:38 +01:00
Gwendal Roué 5ea7296e7a Add support for subquery.contains(collated expression) 2021-03-02 20:09:24 +01:00
Gwendal Roué 279b00f890 Fix failing tests for #929 2021-03-02 20:03:19 +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é b17fce357d Merge pull request #925 from groue/dev/RowDecodingError
Foundation for decoding errors
2021-03-01 09:03:20 +01:00
Gwendal Roué 37dfd95ae1 Symmetry with StatementColumnConvertible 2021-02-26 19:31:41 +01:00
Gwendal Roué b834b9876d Data.fastDecodeNoCopyIfPresent can not fail 2021-02-26 18:51:14 +01:00
Gwendal Roué 7f48e66fdc Reduce inlined code 2021-02-26 18:50:47 +01:00
Gwendal Roué b7c57dc7f2 Attempt at clarifying the (complex) decoding api
The difficulty is due to fast decoding of StatementColumnConvertible, and non-copied Data, from raw SQLite statement.

We want it to be inlinable, and possible in nested rows.

Added missing tests for nested rows
2021-02-25 20:45:12 +01:00
Gwendal Roué cb2405a8b9 RowDecodingError 2021-02-21 14:21:04 +01:00
Gwendal Roué 4398777f07 TODO 2021-02-20 17:03:17 +01:00
Gwendal Roué 6e8285e4ec CHANGELOG 2021-02-20 13:02:30 +01:00
Gwendal Roué aceaaf24d2 Paranoid: Wrap DatabaseQueue.read in a transaction
This guarantees snapshot isolation even in case of external connections
2021-02-20 12:59:27 +01:00
Gwendal Roué 64bb63e304 CommonTableExpression has an implicit Row RowDecoder 2021-02-20 12:47:13 +01:00
Gwendal Roué a681ccf2b9 Fix: DatabaseQueue.read is throws, not rethrows 2021-02-20 11:55:19 +01:00
Gwendal Roué 8c8a25a73b Spot the possible improvement on SQLRelation children 2021-02-20 11:42:54 +01:00
Gwendal Roué d419d23368 Tests for SQLRelation children 2021-02-19 16:28:22 +01:00
Gwendal Roué 081500b5ce TODO 2021-02-19 13:26:18 +01:00
Gwendal Roué 7dd36ecc0f Tests for SQLRelation children 2021-02-19 07:36:33 +01:00
Gwendal Roué 10a16ac6f0 Rename .allNotPrefetched to .bridge 2021-02-18 08:42:01 +01:00
Gwendal Roué d7f61fa0f5 Documentation 2021-02-18 07:58:10 +01:00
Gwendal Roué 3665a533cf Add missing tests for has-many through association with three steps 2021-02-17 20:04:35 +01:00
Gwendal Roué c9332a8c9e Fix typo 2021-02-17 20:03:59 +01:00
Gwendal Roué e40534942c format 2021-02-17 18:19:52 +01:00
Gwendal Roué de52856cf3 Aliasing is not qualifying 2021-02-17 18:11:00 +01:00
Gwendal Roué 0dd345eb91 SQLQuery no longer depends on SQLExpressible and other high-level protocols 2021-02-17 18:00:53 +01:00
Gwendal Roué c4620aa587 SQLRelation no longer depends on SQLExpressible and _JoinableRequest
Those are one level up
2021-02-17 17:43:57 +01:00
Gwendal Roué bda63c70bf Document the type of variables 2021-02-17 13:51:23 +01:00
Gwendal Roué 3407715599 CHANGELOG 2021-02-17 13:47:15 +01:00
Gwendal Roué 7eaf579c18 Update CommonTableExpression documentation about the implicit Void RowDecoder 2021-02-17 13:44:51 +01:00
Gwendal Roué 488849535e CommonTableExpression has an implicit Void RowDecoder 2021-02-17 13:22:28 +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é cceb24a1e5 Merge branch 'development' 2021-02-15 19:17:27 +01:00
Gwendal Roué bea454a0b9 v5.4.0 2021-02-15 19:16:06 +01:00
Gwendal Roué 276fb2d698 Performance tests: upgrade dependencies 2021-02-15 18:54:32 +01:00
Gwendal Roué 8e3046b00f Move Sequence.joined(operator:) back to SQLSpecificExpressible
`[1, 2, 3].joined(operator: .add)` is not supported. It would pollute autocompletion.

This commit fixes a regression introduced in 920417b.
2021-02-15 18:16:18 +01:00
Gwendal Roué 8a5790ed8b Move SQLSelectable and SQLOrderingTerm down from SQLExpressible to SQLSpecificExpressible 2021-02-15 14:01:42 +01:00
Gwendal Roué fd6f5ec525 CHANGELOG 2021-02-15 13:55:58 +01:00
Gwendal Roué 987d549ff0 Remove obsolete test in demo app 2021-02-15 07:59:48 +01:00
Gwendal Roué f57e724ef6 Merge pull request #922 from groue/experiments/enums
Refactor query interface implementation
2021-02-15 07:22:42 +01:00
Gwendal Roué 920417beb3 Replace protocols with enums 2021-02-14 18:28:15 +01:00
Gwendal Roué 2a016ac4f5 TODO 2021-02-12 18:47:37 +01:00
Gwendal Roué ba3a3f7c38 Move definition of TableRecord to CTE associations 2021-02-09 18:14:35 +01:00
Gwendal Roué ae6f5dd0f5 Extract ForeignKey 2021-02-09 18:14:35 +01:00
Gwendal Roué 7914805524 Remove TableRecord requirements for QueryInterfaceRequest aggregates 2021-02-09 18:14:35 +01:00
Gwendal Roué 5c2f113631 TODO 2021-02-08 13:07:02 +01:00
Gwendal Roué d3df3ed5ec Makefile: support for Xcode 12.4 and Big Sur
Bump min iOS and tvOS versions to 11.4 because Big Sur does not support older simulators:

$ xcrun simctl list runtimes
iOS 10.3 (10.3.1 - 14E8301) - com.apple.CoreSimulator.SimRuntime.iOS-10-3 (unavailable, The iOS 10.3 simulator runtime is not supported on hosts after macOS 10.15.99.)
tvOS 10.2 (10.2 - 14W260) - com.apple.CoreSimulator.SimRuntime.tvOS-10-2 (unavailable, The tvOS 10.2 simulator runtime is not supported on hosts after macOS 10.15.99.)
2021-02-07 17:23:10 +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é edc8c2aeea Fix sample code 2021-01-30 09:52:35 +01:00
Gwendal Roué f9ad87e54f Documentation 2021-01-29 19:49:55 +01:00
Gwendal Roué a6a10270a0 TODO 2021-01-29 08:11:16 +01:00
Gwendal Roué 9a1ff5e9a0 BRAG 2021-01-28 19:09:46 +01:00
Gwendal Roué 7151648279 Cleanup demo apps 2021-01-28 08:44:34 +01:00
Gwendal Roué 921c629a5e Documentation: Adding support for missing SQL functions or operators 2021-01-28 08:43:14 +01:00
Gwendal Roué 25b2a0392d SQL interpolation supports embedding collations into SQL literals 2021-01-28 08:39:40 +01:00
Gwendal Roué cb7aa3c14f TODO 2021-01-28 08:36:14 +01:00
Gwendal Roué 6ea56060a2 Merge branch 'master' into development 2021-01-27 19:46:16 +01:00
Gwendal Roué 3733648598 [skip travis] Remove all details about SPM installation (#913) 2021-01-27 14:05:08 +01:00
Gwendal Roué 40341d4e98 Merge branch 'master' into development 2021-01-23 17:47:04 +01:00
Gwendal Roué 5393d97033 [skip travis] Update BRAG.md 2021-01-23 17:45:54 +01:00
Gwendal Roué 8bf9e5e30f Decouple associations from TableRecord
Associations is generic for type safety, not for defining the association (just as QueryInterfaceRequest)
2021-01-23 09:48:18 +01:00
Gwendal Roué bc5ba1fda5 Merge branch 'development' 2021-01-21 08:23:18 +01:00
Gwendal Roué 034cf065c1 Merge pull request #912 from groue/dev/demo-test
Add tests to the demo apps
2021-01-21 08:22:47 +01:00
Gwendal Roué d7743d0a56 Documentation 2021-01-21 08:21:48 +01:00
Gwendal Roué 5ed0a4a6ed Test that the SwiftUI demo app feeds on immediate publishers 2021-01-21 08:17:02 +01:00
Gwendal Roué dd2e8bb063 Documentation 2021-01-21 08:04:19 +01:00
Gwendal Roué 790b678c74 Documentation 2021-01-20 19:51:03 +01:00
Gwendal Roué abb50a0786 Restore fileprivate Player.Columns 2021-01-20 19:47:04 +01:00
Gwendal Roué 2862edcea8 Documentation 2021-01-20 19:42:32 +01:00
Gwendal Roué 91c17aca41 GRDBCombineDemo tests 2021-01-20 19:14:27 +01:00
Gwendal Roué fc546e25e2 GRDBDemoiOS tests 2021-01-20 19:14:02 +01:00
Gwendal Roué a5b6a0a51f [skip travis] Merge branch 'development' 2021-01-20 07:52:24 +01:00
Gwendal Roué befeb07234 Clarify FTS5Pattern(matchingPrefixPhrase:) behavior 2021-01-20 07:51:00 +01:00
Gwendal Roué 8fe3d41d18 Cleanup and harmonize demo apps 2021-01-20 07:48:05 +01:00
Gwendal Roué 9628eaffb9 Documentation improvement 2021-01-09 17:55:15 +01:00
Gwendal Roué 7be7e1cade Merge branch 'development' 2021-01-09 17:10:55 +01:00
Gwendal Roué db54c567de Performance tests: upgrade Realm, and set deployment target to macOS 10.15 2021-01-09 16:59:34 +01:00
Gwendal Roué db6ea3b85e Change demo app bundle ID
Xcode would no longer accept the previous one.
2021-01-09 16:33:12 +01:00
Gwendal Roué 33f3e868da v5.3.0 2021-01-09 15:47:00 +01:00
Gwendal Roué d4e380c35b Update thank you notice 2021-01-09 14:44:23 +01:00
Gwendal Roué 0dd78f1580 CHANGELOG 2021-01-09 14:43:40 +01:00
Gwendal Roué 267bfb29fe Merge pull request #892 from eburns-vmware/dev/data_passphrase
Provide SQLCipher passphrase as Data
2021-01-09 14:33:46 +01:00
Gwendal Roué 4e551c8c6e Fix Swiftlint errors 2021-01-09 13:09:44 +01:00
Gwendal Roué 554a84cf28 CHANGELOG 2021-01-09 12:57:26 +01:00
Gwendal Roué 2cfd51401a Merge pull request #903 from chrisballinger/patch-2
Fix SPM installation instructions
2021-01-06 09:06:06 +01:00
Chris Ballinger 948f9d3f22 Fix SPM installation instructions 2021-01-05 14:00:20 -08:00
Gwendal Roué 728efd3d67 Update the thank you notice 2021-01-01 13:59:42 +01:00
Gwendal Roué 1b0dd4ae25 CHANGELOG 2021-01-01 13:59:32 +01:00
Gwendal Roué e1b91e0642 Makefile documentation 2021-01-01 13:57:52 +01:00
Gwendal Roué 74b71b024b Merge pull request #901 from wuyuehyang/development
Fix creation of FTS5 tokenizer with arguments
2021-01-01 13:55:08 +01:00
wuyueyang c86d2d654f Fix failed to create unicode61 tokenizer as a wrapped tokenizer 2021-01-01 02:13:11 +08:00
wuyueyang ff6bdc38ef Add test case for custom tokenizer with a unicode61 tokenizer of multiple arguments wrapped 2021-01-01 00:44:00 +08:00
Gwendal Roué ef5b284f11 Remove TODO warning 2020-12-23 12:39:57 +01:00
Gwendal Roué 836efb120f Xcode 12.3 formatting 2020-12-23 12:13:05 +01:00
Gwendal Roué 3a76b84eae Documentation 2020-12-23 11:16:09 +01:00
Gwendal Roué ae17e9f893 Documentation 2020-12-23 11:11:27 +01:00
Gwendal Roué 6ea1e6aeaf Test that pragma tables are not tracked 2020-12-23 10:41:03 +01:00
Gwendal Roué ed32e44bc2 DRY 2020-12-23 10:31:16 +01:00
Gwendal Roué 60a9494434 Fix Swiftlint warnings 2020-12-23 10:10:10 +01:00
Gwendal Roué 51991213ef Stop observing pragma tables 2020-12-23 10:09:00 +01:00
Gwendal Roué dc16fae72e Documentation 2020-12-23 10:08:30 +01:00
Gwendal Roué b485d4d3dc forSingleResult is no longer mandatory 2020-12-23 10:08:16 +01:00
Gwendal Roué 7634d3f950 Documentation 2020-12-23 09:23:37 +01:00
Gwendal Roué 6abbf82a89 So long, visitor pattern! 2020-12-23 09:02:17 +01:00
Ed Burns 2de9b2d9ed Cleaned up documentation and addressed review comments. 2020-12-22 11:29:26 -06:00
Gwendal Roué cc0611847d Remove the CocoaPods lint job from Travis
It's too slow, and nearly always fails
2020-12-20 08:52:12 +01:00
Gwendal Roué c844438dd6 Xcode 12.2 touch 2020-12-20 08:51:42 +01:00
Gwendal Roué 0d6f68646c Turn warning into a TODO 2020-12-19 13:07:24 +01:00
Gwendal Roué af55215356 Travis: test with Xcode 12.2 2020-12-19 13:02:24 +01:00
Gwendal Roué f4f44c51d9 Makefile: support for Xcode 12.3 2020-12-19 11:18:46 +01:00
Ed Burns 77a1becba1 Fixed error in README. Sorry. 2020-12-17 17:17:26 -06:00
Ed Burns 5546961c8c Test fixes and cleanup. 2020-12-17 17:10:39 -06:00
Ed Burns d09571c0ad Added option to specify passphrase as a Data object, added section to README. 2020-12-17 11:19:05 -06:00
Gwendal Roué 9b15011f17 Move singularity test to SQLAssociationCardinality 2020-12-13 18:29:48 +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
Gwendal Roué ab502baa20 CommonTableExpression.contains(_:) 2020-12-13 18:29:28 +01:00
Gwendal Roué eb0e0d4cdd Merge pull request #885 from groue/dev/cte+871
Robustness of eager loading of to-many associations based on compound foreign keys
2020-12-12 13:31:28 +01:00
Gwendal Roué c8818c1d44 CTEs are experimental 2020-12-12 12:47:44 +01:00
Gwendal Roué 1ff825c861 CHANGELOG 2020-12-12 12:41:10 +01:00
Gwendal Roué 13946f1d8d Remove unclear recommentation 2020-12-12 12:40:50 +01:00
Gwendal Roué 6a68e31903 Clarify handling of NULL in foreign keys 2020-12-12 12:40:50 +01:00
Gwendal Roué 618be9b5e4 Do not support null in foreign keys more than SQLite itself 2020-12-12 12:40:50 +01:00
Gwendal Roué 4a6a2c5495 Fix typo 2020-12-12 12:40:50 +01:00
Gwendal Roué 6082fc4e54 Tests for nullable compound foreign keys 2020-12-12 12:40:50 +01:00
Gwendal Roué 4e8d129162 Only use the CTE technique if foreign key columns are not null 2020-12-12 12:40:50 +01:00
Gwendal Roué 472b5bc604 Test two levels of include(all:) with compound foreign keys 2020-12-12 12:40:50 +01:00
Gwendal Roué cad788e59e Revert "Prefer CommonTableExpression.contains(_:)"
This reverts commit 87a0921586e319ccd4ee02e991ec555c6a915c13.
2020-12-12 12:40:49 +01:00
Gwendal Roué 2cb4cf51c3 TODO 2020-12-12 12:40:49 +01:00
Gwendal Roué 5eff2448bb Documentation 2020-12-12 12:40:49 +01:00
Gwendal Roué aabf6e6247 Prefer CommonTableExpression.contains(_:) 2020-12-12 12:40:49 +01:00
Gwendal Roué 23c93eebdf Remove fixed caveat from documentation 2020-12-12 12:40:49 +01:00
Gwendal Roué 732ec36b67 Documentation 2020-12-12 12:40:49 +01:00
Gwendal Roué f1196bf924 Limit availability of _SQLRowValue.isAvailable 2020-12-12 12:40:49 +01:00
Gwendal Roué fcd6a453f0 Replace CTE request with its table name 2020-12-12 12:40:49 +01:00
Gwendal Roué 85af2deced Document TODOs with row values 2020-12-12 12:40:49 +01:00
Gwendal Roué b70f85d94b Fix #871 2020-12-12 12:40:49 +01:00
Gwendal Roué b715206502 Row values 2020-12-12 12:40:49 +01:00
Gwendal Roué 18885d4ca1 CHANGELOG 2020-12-12 12:40:32 +01:00
Gwendal Roué 555ed025bc CHANGELOG 2020-12-12 12:30:45 +01:00
Gwendal Roué d0e4d536d9 Merge pull request #880 from groue/dev/cte
Common Table Expressions
2020-12-12 11:56:01 +01:00
Gwendal Roué 8c225105c2 Documentation 2020-12-12 11:21:49 +01:00
Gwendal Roué c36539adb3 CTEs can enter UPDATE and DELETE queries 2020-12-12 11:06:51 +01:00
Gwendal Roué b636c391df Fix typo 2020-12-11 08:33:13 +01:00
Gwendal Roué 659af2cd2a Documentation 2020-12-11 08:28:44 +01:00
Gwendal Roué f70e2b4e37 Mention that recursive CTEs require SQL 2020-12-11 08:24:05 +01:00
Gwendal Roué b16e12cb6e Documentation 2020-12-11 08:18:33 +01:00
Gwendal Roué df5c62d2d9 Documentation
Mention the CTE blog post found by @bellebethcooper
2020-12-11 08:17:12 +01:00
Gwendal Roué b89d11f8ec TODO 2020-12-09 09:23:42 +01:00
Gwendal Roué 992f2a2d83 Revert "CommonTableExpression.contains(_:)"
This reverts commit f94cecb329.

We can't expose a raw table name like that, because it may be used several times, and need an alias.
2020-12-08 18:36:51 +01:00
Gwendal Roué f94cecb329 CommonTableExpression.contains(_:) 2020-12-06 19:22:30 +01:00
Gwendal Roué 89c117425e Mention minimal SQLite version in README 2020-12-06 16:40:40 +01:00
Gwendal Roué 26c7441b49 Documentation 2020-12-06 13:16:27 +01:00
Gwendal Roué a6d80ce208 Update Makefile for Xcode 12.2 2020-12-06 13:11:36 +01:00
Gwendal Roué c287449258 Documentation 2020-12-05 20:50:58 +01:00
Gwendal Roué f9c98b4a1f Fix documentation typo 2020-12-05 20:47:59 +01:00
Gwendal Roué 86cfee4e23 Fix typo 2020-12-05 19:57:54 +01:00
Gwendal Roué a3351513ce Optimize inclusion of CTE association
In order to count the selected columns of a CTE, we do not need to have SQLite compile the whole CTE request when we have information about the selected columns.
2020-12-05 19:50:47 +01:00
Gwendal Roué 95be9b7bb6 Documentation 2020-12-05 19:17:47 +01:00
Gwendal Roué 1c2dd8617b Fix Documentation typo 2020-12-05 19:15:20 +01:00
Gwendal Roué 7f71174159 Fix typo 2020-12-05 18:26:46 +01:00
Gwendal Roué 098ddf27ec Documentation 2020-12-05 18:25:51 +01:00
Gwendal Roué bbce741688 Documentation 2020-12-05 18:22:26 +01:00
Gwendal Roué c56382f04a Documentation 2020-12-05 18:19:01 +01:00
Gwendal Roué 71841f0a07 Documentation 2020-12-05 18:16:20 +01:00
Gwendal Roué e43fae2a63 Fix sample code 2020-12-05 18:13:42 +01:00
Gwendal Roué 022a06b4bc Documentation 2020-12-05 18:10:13 +01:00
Gwendal Roué 7df77aa2d0 Documentation 2020-12-05 18:05:52 +01:00
Gwendal Roué f18bcb67e4 Documentation 2020-12-05 17:56:39 +01:00
Gwendal Roué cc68ef5872 Caveat documentation 2020-12-05 16:13:48 +01:00
Gwendal Roué 5b3eee53c2 SQL interpolation of CTEs 2020-12-05 16:13:24 +01:00
Gwendal Roué 63255cabf8 SQL interpolation of CTEs 2020-12-05 13:40:56 +01:00
Gwendal Roué 9d1bcec132 Cleanup filtering of trivially true joining conditions 2020-12-05 12:49:31 +01:00
Gwendal Roué b60f39e7cc Merge branch 'development' into dev/cte
# Conflicts:
#	GRDB/QueryInterface/Request/Association/Association.swift
#	GRDB/QueryInterface/Request/QueryInterfaceRequest.swift
#	GRDB/QueryInterface/SQL/SQLQuery.swift
#	GRDB/QueryInterface/SQLGeneration/SQLGenerationContext.swift
#	GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift
2020-12-05 12:31:52 +01:00
Gwendal Roué 5464d64180 Prevent an infinite loop of self-proxying TableAlias I saw once 2020-12-05 12:24:05 +01:00
Gwendal Roué 1e2d07a16f Simplify SQLSource
SQLSource used to be more or less able to deal with subqueries, as in SELECT ... FROM (SELECT ...).

But we had only one use case for it, the "trivial count query": SELECT COUNT(*) FROM (SELECT ...). And many opportunities for fatal errors, because such subqueries were not generally supported.

So we simplify SQLSource, and implement the trivial count query in another way.
2020-12-05 12:21:14 +01:00
Gwendal Roué 66b23d423f Cleanup JoinAssociation 2020-12-05 10:54:31 +01:00
Gwendal Roué 3094c274df Enhance error message 2020-12-05 10:34:32 +01:00
Gwendal Roué 378279ee1a Move the isRecursive flag where it belongs 2020-12-05 10:32:46 +01:00
Gwendal Roué e509d7af65 Merge branch 'development' into dev/cte 2020-12-04 07:10:12 +01:00
Gwendal Roué 9da4bc09c3 Fix typos 2020-12-04 07:09:54 +01:00
Gwendal Roué 462461c1c9 Merge pull request #883 from professordeng/patch-1
Update README.md
2020-12-04 05:34:41 +01:00
peofessordeng 7ded56dfc4 Update README.md 2020-12-04 11:07:37 +08:00
Gwendal Roué 836a0a5e37 Documentation 2020-12-03 19:15:57 +01:00
Gwendal Roué 91dd13e2be Merge cte support into AllColumns 2020-12-03 18:51:26 +01:00
Gwendal Roué a1f0f2c9b7 TODO 2020-12-03 09:24:56 +01:00
Gwendal Roué 6f409f2140 Fix typo 2020-12-03 09:22:15 +01:00
Gwendal Roué 64776682fe Drop USING clause until actually needed 2020-12-03 09:21:19 +01:00
Gwendal Roué a21e6575d8 _AllCTEColumns delegates to AllColumns and _SQLQualifiedAllColumns 2020-12-03 08:37:55 +01:00
Gwendal Roué 4ee6f3293a CTE columns are provided as strings 2020-12-03 08:34:43 +01:00
Gwendal Roué 17b884b3dc Recursive CTEs 2020-12-03 08:28:14 +01:00
Gwendal Roué 0f6d36bfc2 Cleanup 2020-12-03 07:07:39 +01:00
Gwendal Roué 0dc9215df6 Documentation 2020-12-02 22:15:50 +01:00
Gwendal Roué 333ffc1ebe Documentation 2020-12-02 21:55:51 +01:00
Gwendal Roué 181c930e39 Cleanup 2020-12-02 19:29:35 +01:00
Gwendal Roué 65337e74d9 Solve #856 with a CTE :-) 2020-12-02 19:14:53 +01:00
Gwendal Roué 69c116507b Fetch straight from a CTE 2020-12-02 18:40:58 +01:00
Gwendal Roué 2b82de42d8 Merge branch 'development' into dev/cte 2020-12-02 18:30:31 +01:00
Gwendal Roué 10dfa3fba9 Merge pull request #881 from felixscheinost/patch-1
Fix try-catch blocks in documentation
2020-12-02 10:41:06 +01:00
Felix Scheinost 339062f01f Fix try-catch blocks in documentation 2020-12-02 10:08:55 +01:00
Gwendal Roué eb2346dfce Couting requests with CTE uses trivial SQL 2020-12-02 08:26:35 +01:00
Gwendal Roué 1d0adaacf6 including(all:) accepts associations based on the .using condition 2020-12-02 08:20:50 +01:00
Gwendal Roué 5e8f95ca09 Improve CTE columns counting 2020-12-02 08:09:07 +01:00
Gwendal Roué b085a29c8c Cleanup 2020-12-02 08:02:42 +01:00
Gwendal Roué 992e8f3423 Remove header 2020-12-02 06:25:18 +01:00
Gwendal Roué 49e6923156 Prepare recursive CTEs 2020-12-02 06:22:55 +01:00
Gwendal Roué a7a4858364 Refactor CommonTableExpression initializers 2020-12-02 06:12:55 +01:00
Gwendal Roué 3a38cbe87f Create CTE without request 2020-12-02 06:00:04 +01:00
Gwendal Roué 2c42d0129c CTE columns: WITH cte(a, b) AS ... 2020-12-02 05:36:56 +01:00
Gwendal Roué da5ef961d6 Expose CTE creation method at a documented level 2020-12-02 05:14:26 +01:00
Gwendal Roué d35373dcdf Fix typo 2020-12-01 20:48:40 +01:00
Gwendal Roué adc6ba1226 Delete dead code 2020-12-01 20:45:11 +01:00
Gwendal Roué b1d162c14e Filter, order, alias CTE 2020-12-01 20:38:37 +01:00
Gwendal Roué 2b6c3fb868 Remove misleading comment 2020-12-01 20:38:19 +01:00
Gwendal Roué a70b42cbf5 Extract SQLAssociationCondition.using 2020-12-01 20:30:36 +01:00
Gwendal Roué 06000abbfd Type-safe CTE associations, part 2 2020-12-01 20:04:35 +01:00
Gwendal Roué 67bc47c3b5 Type-safe CTE associations 2020-12-01 20:00:04 +01:00
Gwendal Roué 5c34ab19e2 API rationalization 2020-12-01 19:50:16 +01:00
Gwendal Roué 6d14f792e6 Remove dead code 2020-12-01 19:36:50 +01:00
Gwendal Roué 1238843a44 Cleanup 2020-12-01 19:33:43 +01:00
Gwendal Roué 8000332ec4 Gather CTE methods 2020-12-01 19:29:39 +01:00
Gwendal Roué 9896607dff Test for filtered CTE 2020-12-01 19:17:47 +01:00
Gwendal Roué 1be0a6cd5c Add JoinAssociation to GRDBCustom 2020-12-01 19:17:34 +01:00
Gwendal Roué 0191676063 Using clause for CTE associations 2020-12-01 09:17:05 +01:00
Gwendal Roué c16da693df More cte association api experiments 2020-12-01 08:38:39 +01:00
Gwendal Roué f31dd0033c Remove non-composable cte association methods 2020-12-01 08:21:04 +01:00
Gwendal Roué b7b89c5fa9 CTE associations 2020-11-30 21:51:17 +01:00
Gwendal Roué c776ee8d47 Association: remove TableRecord requirement 2020-11-30 21:50:18 +01:00
Gwendal Roué c36fc2813b Include a raw SQL CTE 2020-11-30 19:29:54 +01:00
Gwendal Roué ec2640a459 CommonTableExpression is a table, after all 2020-11-30 19:21:46 +01:00
Gwendal Roué 755782759a Cleanup 2020-11-30 18:14:03 +01:00
Gwendal Roué 9275d4ddf8 Need to deal with CTE subqueries 2020-11-30 18:10:21 +01:00
Gwendal Roué 96951b3d4e Remove dead code 2020-11-30 18:10:06 +01:00
Gwendal Roué 36a8cd1352 CTE merging WIP: we need to postpone TableAlias creation 2020-11-29 19:33:46 +01:00
Gwendal Roué 2bb9f5ce0d First joins with CommonTableExpression 2020-11-29 19:05:12 +01:00
Gwendal Roué e1d3c1d7dc Give CommonTableExpression a key, for joins 2020-11-29 18:23:41 +01:00
Gwendal Roué 00a7eb53e8 First successful SQL generation with CTE 2020-11-29 16:51:52 +01:00
Gwendal Roué e7dcf25063 CTE aliases 2020-11-29 15:49:55 +01:00
Gwendal Roué d2b7b4240a CTE basis 2020-11-29 15:06:45 +01:00
Gwendal Roué b6ef89c116 Prefetch cleanup 2020-11-29 11:58:15 +01:00
Gwendal Roué 2a917823ed Merge branch 'development' 2020-11-29 06:59:23 +01:00
Gwendal Roué 2135f8e768 v5.2.0 2020-11-28 13:46:26 +01:00
Gwendal Roué 2c45ecf56c CHANGELOG 2020-11-28 13:41:50 +01:00
Gwendal Roué 52f831936e Document the including(all:) caveat with compound foreign keys 2020-11-28 13:26:21 +01:00
Gwendal Roué 28f6b64f67 Document the including(all:) caveat with compound foreign keys 2020-11-28 13:24:25 +01:00
Gwendal Roué cc0365d794 Document the including(all:) caveat with compound foreign keys 2020-11-28 13:21:12 +01:00
Gwendal Roué 59ad47d640 Merge pull request #872 from groue/dev/timezone
Parse time zones
2020-11-14 18:33:42 +01:00
Gwendal Roué 27662f99b0 [skip travis] profile date parsing 2020-11-14 13:18:21 +01:00
Gwendal Roué 4c5c2dfb6c [skip travis] CHANGELOG 2020-11-14 13:16:38 +01:00
Gwendal Roué 517a7b2984 Update documentation 2020-11-14 11:16:47 +01:00
Gwendal Roué 10bb596b7c Update documentation 2020-11-14 11:15:09 +01:00
Gwendal Roué 6913f1e39b Update documentation 2020-11-14 10:51:30 +01:00
Gwendal Roué fe8e32586b Parse time zones 2020-11-14 10:35:04 +01:00
Gwendal Roué e0c91ed2ee Merge pull request #868 from groue/dev/varying-region
ValueObservation optimization is opt-in
2020-11-08 11:15:41 +01:00
Gwendal Roué 428433672c Documentation 2020-11-07 13:55:57 +01:00
Gwendal Roué f71a2f7cd8 CHANGELOG 2020-11-07 13:39:49 +01:00
Gwendal Roué 102b037c7d Update documentation 2020-11-07 13:02:47 +01:00
Gwendal Roué 46c3839ea0 ValueObservation tracks a varying database region by defaut 2020-11-07 13:01:51 +01:00
Gwendal Roué 2c51c04708 Merge branch 'development' 2020-11-01 13:27:29 +01:00
Gwendal Roué d0a7a49c19 v5.1.0 2020-11-01 13:27:04 +01:00
Gwendal Roué 0024a4e654 Merge pull request #864 from groue/dev/filter-ergonomics
Prevent filter misuse with a deprecation warning
2020-11-01 13:18:05 +01:00
Gwendal Roué d66a3f4ab3 Fix Swiftlint warning 2020-11-01 10:39:48 +01:00
Gwendal Roué 645aa1d67b CHANGELOG 2020-11-01 10:34:21 +01:00
Gwendal Roué 06db4af649 Enhance warning 2020-11-01 10:33:05 +01:00
Gwendal Roué baf1ef32d1 Document why filter(_:) prefers SQLSpecificExpressible over SQLExpressible 2020-11-01 10:29:07 +01:00
Gwendal Roué d5638f8e53 Update tests and replace filter(value) with filter(databaseValue) 2020-11-01 09:44:13 +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é 1301e16f6e Update tests and replace filter(false) with none() 2020-11-01 09:42:00 +01:00
Gwendal Roué caa382f41b Deprecate filter(value)
Some people use Player.filter(id) instead of Player.filter(key: id). This is what this commit prevents.
2020-11-01 09:41:16 +01:00
Gwendal Roué 24fd69a9be [skip travis] CHANGELOG 2020-10-31 19:56:25 +01:00
Gwendal Roué 2389ec691b Merge pull request #855 from mallman/generated_columns
SQLite 3.33.0 + Support for generated columns
2020-10-31 18:56:34 +01:00
Gwendal Roué b8dd2ce2f4 Generate columns from query interface expressions
This allows to avoid SQL injection
2020-10-31 14:16:04 +01:00
Gwendal Roué 5114cc4d6d Fix documentation 2020-10-31 13:56:22 +01:00
Gwendal Roué 57036c4470 Use SQLite ergonomics, and create virtual generated columns by default 2020-10-31 13:55:07 +01:00
Gwendal Roué 81166432a8 Documentation for generatedAs(sql:) 2020-10-31 13:45:58 +01:00
Gwendal Roué 5dc8502c8b Test that update(_:) and insert(_:) throw when persisting generated columns 2020-10-31 13:23:42 +01:00
Gwendal Roué 67e10926db Restore logic 2020-10-31 13:09:49 +01:00
Gwendal Roué e971e210a3 Update documentation about PRAGMA table_info and table_xinfo 2020-10-31 13:09:05 +01:00
Gwendal Roué f7e6169c23 Test that TableRecord.numberOfSelectedColumns(_:) includes generated columns 2020-10-31 13:07:58 +01:00
Gwendal Roué 6fc4e31dfb Test that Database.columns(in:) returns generated columns 2020-10-31 12:55:56 +01:00
Gwendal Roué dfc22bdf00 Skip tests for generated columns unless custom SQLite build 2020-10-31 12:14:52 +01:00
Gwendal Roué 54b5f47ffa Upgrade custom SQLite builds to v3.33.0 2020-10-31 12:09:49 +01:00
Gwendal Roué 62a4251f90 Merge pull request #862 from groue/dev/fix-861
Improve documentation of observations of varying regions
2020-10-31 11:34:07 +01:00
Gwendal Roué a41c12252a Documentation 2020-10-30 09:12:47 +01:00
Gwendal Roué e7cf816062 Documentation 2020-10-30 06:25:20 +01:00
Gwendal Roué ff28cadd57 More tests for optimized regions 2020-10-30 06:20:50 +01:00
Gwendal Roué 9039b18b84 Documentation 2020-10-30 06:05:52 +01:00
Gwendal Roué 480381deb5 Documentation 2020-10-30 05:59:20 +01:00
Gwendal Roué 84dbace4af Documentation 2020-10-30 05:56:58 +01:00
Gwendal Roué 44f80f4c7c Wording 2020-10-30 05:49:42 +01:00
Gwendal Roué 1cb9e52123 Legibility 2020-10-29 19:12:29 +01:00
Gwendal Roué 4d7ddb9c26 Wording 2020-10-29 19:07:31 +01:00
Gwendal Roué 1b29d7eca3 CHANGELOG 2020-10-29 19:02:00 +01:00
Gwendal Roué 5c779b11db Improve documentation of observations of a varying region 2020-10-29 18:47:34 +01:00
Gwendal Roué dc344c07de Wording 2020-10-29 18:16:37 +01:00
Gwendal Roué b7b3c3ab32 Wording 2020-10-29 18:15:23 +01:00
Gwendal Roué 6fa20284ec Wording 2020-10-29 18:14:14 +01:00
Gwendal Roué 978b570826 FAQ: Why is ValueObservation not publishing value changes? 2020-10-29 18:13:06 +01:00
Gwendal Roué 688e393ed1 Don't track prefetched associations when the parent is provably empty 2020-10-29 17:05:26 +01:00
Gwendal Roué 8ede868068 More tests for empty regions of empty requests 2020-10-29 16:05:35 +01:00
Gwendal Roué 667d42eeb4 [skip travis] Fix release date 2020-10-28 07:43:01 +01:00
Michael Allman 1f87d5a375 Add rudimentary tests for the generated column table definition API 2020-10-25 12:19:01 -07:00
Michael Allman 4f0a6cf9e1 Extract common filter predicate in AssociationPrefetchingSQLTests into a
reusable method
2020-10-25 11:55:49 -07:00
Michael Allman 3318858b80 Wrap the generatedAs column definition API with the GRDBCUSTOMSQLITE
Swift compiler flag
2020-10-25 11:44:09 -07:00
Michael Allman 9c6f19f55f Condition table column info query on SQLite version 2020-10-25 11:42:43 -07:00
Gwendal Roué 48ee93c244 CHANGELOG 2020-10-25 10:38:22 +01:00
Gwendal Roué ee4197bcc0 Merge branch 'development' 2020-10-25 10:33:57 +01:00
Gwendal Roué 079c476148 v5.0.3 2020-10-25 10:33:32 +01:00
Gwendal Roué aa909b7635 Merge branch 'master' into development 2020-10-25 10:33:21 +01:00
Gwendal Roué 9167ebda98 Merge pull request #859 from groue/dev/deinit-change
Database.close() is idempotent
2020-10-25 10:15:49 +01:00
Gwendal Roué 38682c69da CHANGELOG 2020-10-25 10:15:27 +01:00
Gwendal Roué 2a7f41c494 Database.close() is idempotent
This change addresses https://bugs.swift.org/browse/SR-13746
2020-10-25 10:12:42 +01:00
Michael Allman 071bbc7905 Initial commit for generated column support 2020-10-19 21:25:36 -07:00
Gwendal Roué ca18f509e7 Merge pull request #850 from DiligentRobot/development
Add buildActiveScheme to playground settings so they'll build under Xcode 12
2020-10-15 17:57:34 +02:00
Matt Tancock 5e2bb1d57a Add buildActiveScheme to playground settings so they'll build under Xcode 12 2020-10-15 15:10:28 +01:00
Gwendal Roué dd2950e4ca [skip travis] Merge pull request #849 from MarshalGeazipp/MarshalGeazipp-fix-grammar
Fix grammar mistake AssociationsBasics.md
2020-10-08 17:42:40 +02:00
Sebastian Nicklas 34f3097616 Update AssociationsBasics.md 2020-10-08 17:19:17 +02:00
Gwendal Roué 948e91126a Merge branch 'development' 2020-10-06 19:21:43 +02:00
Gwendal Roué 85b781bf0e v5.0.2 2020-10-06 14:10:06 +02:00
Gwendal Roué bd853a8bc0 CHANGELOG 2020-10-06 14:08:21 +02:00
Gwendal Roué bfc76b96f3 Fix #844 2020-10-06 14:03:41 +02:00
Gwendal Roué 99ea59ee06 Demo app builds in Debug configuration 2020-10-06 14:03:41 +02:00
Gwendal Roué f8a0e8e4b5 Merge pull request #847 from groue/dev/remove-snapshots
Remove dependency on SQLITE_ENABLE_SNAPSHOT
2020-10-06 13:32:26 +02:00
Gwendal Roué 14e32a2bd1 [skip travis] CHANGELOG 2020-10-06 13:31:52 +02:00
Gwendal Roué f84e25f929 Remove dependency on SQLITE_ENABLE_SNAPSHOT
Address #845 and #846
2020-10-06 08:30:41 +02:00
Gwendal Roué 6884bf10b0 Merge branch 'development' 2020-09-27 15:52:03 +02:00
Gwendal Roué 8803eafe31 v5.0.1 2020-09-27 15:20:42 +02:00
Gwendal Roué 9909ca4c96 [skip travis] CHANGELOG 2020-09-27 15:17:12 +02:00
Gwendal Roué 5d36d5735d [skip travis] Update GRDBCombineDemo for iOS 14
Address both #842 and #843
2020-09-27 14:46:43 +02:00
Gwendal Roué ef368a2bc2 Merge pull request #841 from groue/dev/840
Fix GRDB 5 regression with indexes on expressions
2020-09-27 12:06:02 +02:00
Gwendal Roué 8433b09650 [skip travis] CHANGELOG 2020-09-27 12:04:40 +02:00
Gwendal Roué d2eb92d1a2 Travis: test Xcode 12 2020-09-26 15:27:49 +02:00
Gwendal Roué ba98aab046 Fix failing test for #840 2020-09-26 14:46:39 +02:00
Gwendal Roué 00d15339b6 Failing test for #840 2020-09-26 14:45:49 +02:00
Gwendal Roué 1ea4a44bb8 Merge branch 'development' 2020-09-20 16:47:45 +02:00
Gwendal Roué 5119c065bd v5.0.0 2020-09-20 15:54:56 +02:00
Gwendal Roué 8be6aa7358 Fix GRDBCombineDemo on the device 2020-09-20 15:35:25 +02:00
Gwendal Roué 438f99deff GRDBCombineDemo Xcode 12 changes 2020-09-20 15:27:52 +02:00
Gwendal Roué c556c056d8 GRDBCombineDemo: animate list changes 2020-09-20 15:27:36 +02:00
Gwendal Roué 613baf30f9 GRDBCombineDemo: fix compiler error 2020-09-20 15:27:10 +02:00
Gwendal Roué 0ac7e2d299 Xcode 12 2020-09-20 15:05:20 +02:00
Gwendal Roué 929465eb52 UIKit demo: use UITableViewDiffableDataSource 2020-09-20 15:05:07 +02:00
Gwendal Roué 13de0a5cce Demo apps: move from unfamiliar World-based dependency injection to plain shared global 2020-09-20 14:37:01 +02:00
Gwendal Roué c12f42b385 Fix warnings 2020-09-20 14:11:29 +02:00
Gwendal Roué 2ccd01299c In performance report, the hardware model and Xcode version are dynamic 2020-09-20 14:05:08 +02:00
Gwendal Roué fb2efb8df9 Upgrade Realm 2020-09-20 14:04:24 +02:00
Gwendal Roué 795daf284f Remove performance database resources 2020-09-20 13:31:11 +02:00
Gwendal Roué 354b815835 Remove obsolete todos 2020-09-20 11:38:37 +02:00
Gwendal Roué 7d8e20685d CHANGELOG 2020-09-20 11:19:11 +02:00
Gwendal Roué 5050c36c4e Fix wording of root key decoding error 2020-09-19 15:52:50 +02:00
Gwendal Roué 6348c6f151 Merge branch 'dev/decodingErrorAmbiguity' into development 2020-09-19 15:50:35 +02:00
Gwendal Roué 8cb468cf05 Fix failing test for #836 2020-09-19 15:50:21 +02:00
Gwendal Roué 55c9e48a21 Failing test for #836 2020-09-19 15:50:07 +02:00
Gwendal Roué db3ae357ea Merge branch 'dev/indexIfNotExists' into development 2020-09-19 13:12:30 +02:00
Gwendal Roué f62b952d70 Fix failing test for #838 2020-09-19 13:11:44 +02:00
Gwendal Roué bf1c025612 Failing test for #838 2020-09-19 13:11:30 +02:00
Gwendal Roué ba253dcbf2 [skip travis] fix indentation 2020-09-11 14:36:41 +02:00
Gwendal Roué 1829706faa [skip travis] don’t talk about "misuse" when it’s all about an SQLite misfeature 2020-09-11 14:34:55 +02:00
Gwendal Roué f9f16df065 [skip travis] don’t talk about "misuse" when it’s all about an SQLite misfeature 2020-09-11 14:33:40 +02:00
Gwendal Roué 66173b345f [skip travis] wording 2020-09-11 14:30:25 +02:00
Gwendal Roué ac54c808c5 [skip travis] fix documentation layout 2020-09-11 13:37:52 +02:00
Gwendal Roué 7761b137ba Fix wording 2020-09-11 13:37:04 +02:00
Gwendal Roué 3d144b9e5d [skip travis] FAQ about SQLite error 1 "no such column" 2020-09-11 13:27:30 +02:00
Gwendal Roué b2f5d425b6 Merge branch 'development' 2020-09-07 13:42:58 +02:00
Gwendal Roué 64028e03dc v5.0.0-beta.11 2020-09-07 13:36:44 +02:00
Gwendal Roué e52047d82e Fix #828 2020-09-07 13:29:13 +02:00
Gwendal Roué 5adbd9b3e3 Merge pull request #831 from groue/dev/more-preparation
Improve Configuration.prepareDatabase
2020-09-07 13:26:50 +02:00
Gwendal Roué fd21f97007 Update migration guide 2020-09-06 18:40:15 +02:00
Gwendal Roué d74c5264d3 Update documentation for functions, collations, and tokenizers 2020-09-06 18:28:22 +02:00
Gwendal Roué 654611c365 Fix OTHER_SWIFT_FLAGS 2020-09-06 14:38:30 +02:00
Gwendal Roué 18e09ec061 Configuration.prepareDatabase updates 2020-09-06 14:06:25 +02:00
Gwendal Roué 8e2fb1fb22 Update tests 2020-09-06 13:57:16 +02:00
Gwendal Roué 7a2c1413fe Fix DatabaseSnapshot 2020-09-06 13:40:03 +02:00
Gwendal Roué 3c38aa1996 Functions, Collations, and tokenizers are no longer available on DatabaseQueue, Pool, and Snapshot 2020-09-06 13:18:58 +02:00
Gwendal Roué 886f75bbea Configuration.prepareDatabase in now a method 2020-09-06 13:15:51 +02:00
Gwendal Roué 5820b30cc6 DatabaseError.description: output SQLite message before statement #820 2020-08-25 19:48:00 +02:00
Gwendal Roué ce4bfb9df6 [skip travis] Explain that date and uuid strategies do not apply to requests (#821) 2020-08-23 11:07:02 +02:00
Gwendal Roué be787d3e8a [skip travis] Tell that demo apps are not templates. Addresses #823 2020-08-23 10:36:44 +02:00
Gwendal Roué ededd8668a Merge branch 'development' 2020-07-30 08:29:47 +02:00
Gwendal Roué 7b788e3988 v5.0.0-beta.10 2020-07-30 08:29:27 +02:00
Gwendal Roué 0eb854cebd Merge pull request #817 from groue/dev/boolean-checks
Allow query planner to optimize some boolean tests
2020-07-30 08:24:36 +02:00
Gwendal Roué 9529939262 Documentation 2020-07-27 06:40:18 +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é 8cc82ae2b7 Update migration guide 2020-07-26 15:16:19 +02:00
Gwendal Roué 474c2c3a76 Thank you notice 2020-07-26 15:09:43 +02:00
Gwendal Roué 843624044c CHANGELOG 2020-07-26 15:08:21 +02:00
Gwendal Roué 454b9d5546 More tests for boolean tests 2020-07-26 14:19:46 +02:00
Gwendal Roué c532b8709c Refactor boolean tests (fix #816) 2020-07-26 14:19:31 +02:00
Gwendal Roué bf1d6038e1 Failing tests for #816 2020-07-26 13:33:35 +02:00
Gwendal Roué 86b9616dd7 DatabasePool readers don't invalidate their database schema cache until schema is actually changed. 2020-07-25 18:20:43 +02:00
Gwendal Roué bc993f63f5 Merge branch 'development' 2020-07-24 06:07:54 +02:00
Gwendal Roué 531d732437 Travis: bump to Xcode 11.6 2020-07-23 20:38:19 +02:00
Gwendal Roué 24f9b2c01b Makefile: add support for Xcode 11.6 2020-07-23 20:27:05 +02:00
Gwendal Roué c4991176f4 v5.0.0-beta.9 2020-07-23 19:04:58 +02:00
Gwendal Roué 0ea70d6bfc CHANGELOG 2020-07-23 19:00:58 +02:00
Gwendal Roué 845ae7e0e4 Merge pull request #814 from groue/dev/views
Fix regression with views
2020-07-23 18:59:16 +02:00
Gwendal Roué dc8d74b609 Merge pull request #813 from groue/dev/SQLite3.31.1
Expose SQLite 3.31.1 APIs to iOS, macOS, tvOS, watchOS
2020-07-23 18:58:56 +02:00
Gwendal Roué 2f54eda08a Fix #812 2020-07-23 08:46:05 +02:00
Gwendal Roué a526351b4c Failing test for #812 2020-07-23 08:31:53 +02:00
Gwendal Roué d08d3b311f Fix for GRDB+SQLCipher 2020-07-23 07:55:34 +02:00
Gwendal Roué 25baecdc39 CHANGELOG 2020-07-22 20:36:32 +02:00
Gwendal Roué e2816905bb OSX 11 is OSX 10.16 2020-07-22 20:22:03 +02:00
Gwendal Roué ee2d8eae50 Expose ascNullLast and descNullFirst
This is because iOS 14 runs SQLite 3.31.1
2020-07-22 20:17:52 +02:00
Gwendal Roué 1823e11090 Expose remove_diacritics=2 option of unicode61 FTS5 tokenizer
This is because iOS 14 runs SQLite 3.31.1
2020-07-22 20:07:27 +02:00
Gwendal Roué 294ed772c1 Expose remove_diacritics=2 option of unicode61 FTS tokenizer
This is because iOS 14 runs SQLite 3.31.1
2020-07-22 20:07:27 +02:00
Gwendal Roué 62f33e1d55 Dictionary(grouping:by:) with Cursor 2020-07-22 08:39:45 +02:00
Gwendal Roué e3f1992536 [skip travis] Mention update with primary key 2020-07-19 13:42:12 +02:00
Gwendal Roué baf3a8ec26 [skip travis] Simplify introduction to record protocols 2020-07-19 13:26:56 +02:00
Gwendal Roué a9ca4450f8 [skip travis] Mention unadapted 2020-07-19 13:09:27 +02:00
Gwendal Roué 54ceba6dfa [skip travis] Update observation usage 2020-07-19 13:00:29 +02:00
Gwendal Roué fc64d868ef [skip travis] Update observation usage 2020-07-19 12:53:48 +02:00
Gwendal Roué 45fdb50dc2 [skip travis] Mention RenameColumnAdapter in the migration guide 2020-07-19 12:27:49 +02:00
Gwendal Roué e704ffeba1 Merge branch 'development' 2020-07-19 12:09:50 +02:00
Gwendal Roué 2fb2cee5db v5.0.0-beta.8 2020-07-19 10:04:05 +02:00
Gwendal Roué 3fa8c15c33 Merge pull request #811 from groue/dev/RenameColumAdapter
Introduce RenameColumAdapter
2020-07-19 09:59:05 +02:00
Gwendal Roué 70b70a069a Fix typo 2020-07-19 09:54:39 +02:00
Gwendal Roué f16dcc56ae Add SQLLiteral.isEmpty 2020-07-19 09:41:45 +02:00
Gwendal Roué 4bf21cc5ce Introduce RenameColumAdapter 2020-07-19 09:33:13 +02:00
Gwendal Roué b9bb514709 Merge branch 'development' 2020-07-14 20:44:11 +02:00
Gwendal Roué 67db8a0f3e v5.0.0-beta.7 2020-07-14 20:43:38 +02:00
Gwendal Roué 606cc2cb37 Give more time to SQLCipher4 Travis tests 2020-07-14 18:25:31 +02:00
Gwendal Roué bed1f28b30 Give more time to SQLCipher4 Travis tests 2020-07-14 16:41:05 +02:00
Gwendal Roué 5c6130fbed More Xcode 12 adaptation 2020-07-14 14:02:24 +02:00
Gwendal Roué c1079ac1a9 Remove xcconfig-based settings from target 2020-07-14 13:55:37 +02:00
Gwendal Roué ef7d2e06f6 Restore FTS5 tests from GRDB.xcodeproj 2020-07-14 09:35:03 +02:00
Gwendal Roué 08d235bdc3 Documentation 2020-07-14 09:34:19 +02:00
Gwendal Roué ac8af6bbf0 CHANGELOG 2020-07-14 09:34:05 +02:00
Gwendal Roué 1729c0b967 Merge pull request #802 from GetToSet/development
Add tokenchars support for ascii tokenizer in FTS5.
2020-07-14 09:24:09 +02:00
Gwendal Roué b02b995b76 Give more time to SQLCipher4 Travis tests 2020-07-13 20:15:27 +02:00
Gwendal Roué 7f229468d2 Documentation 2020-07-12 15:12:04 +02:00
Gwendal Roué ebae30342b Defining custom RowAdapter types is no longer supported. 2020-07-12 14:22:53 +02:00
Gwendal Roué 07092169bf Documentation 2020-07-12 14:17:58 +02:00
Bunny Wong 838a03c0ef Added tests for ascii tokenizer. 2020-07-12 19:43:23 +08:00
Bunny Wong 4565c1fff9 Add tokenchars support for ascii tokenizer in FTS5. 2020-07-12 19:43:23 +08:00
Gwendal Roué 519410fc3a Fix availability 2020-07-12 12:03:46 +02:00
Gwendal Roué 9743c89c56 Documentation 2020-07-12 11:59:01 +02:00
Gwendal Roué 94d1134ec2 fetchSet 2020-07-12 10:49:47 +02:00
Gwendal Roué df92e350c0 Documentation 2020-07-11 20:29:47 +02:00
Gwendal Roué 065913f6ab Remove useless makeSelectStatement(literal:) 2020-07-11 19:52:33 +02:00
Gwendal Roué a75a7b82ce Work around an SQLite bug which prevents rollbacking a transaction with sqlite3_commit_hook 2020-07-11 19:47:12 +02:00
Gwendal Roué 90e7449d6a Documentation 2020-07-11 19:21:33 +02:00
Gwendal Roué f9bd457cbd Cleanup 2020-07-11 18:33:43 +02:00
Gwendal Roué 2f6f8f88f8 Cleanup 2020-07-11 17:43:51 +02:00
Gwendal Roué 604ac92a6d Move PreparedRequest where it belongs 2020-07-11 17:40:22 +02:00
Gwendal Roué 4718de0f6c CHANGELOG 2020-07-11 17:36:41 +02:00
Gwendal Roué 002287ca28 Close FetchRequest, make it visitable 2020-07-11 17:30:11 +02:00
Gwendal Roué 31e8d926a8 Remove _SQLExpressionVisitor default handling of _SQLExpressionCollate 2020-07-11 13:41:44 +02:00
Gwendal Roué 99ed742555 "row id" -> "rowid" 2020-07-11 13:21:14 +02:00
Gwendal Roué 67d3fa1e68 Document removal of query interface internals from public interface 2020-07-11 11:44:50 +02:00
Gwendal Roué 8a8518a961 Update playgrounds 2020-07-11 11:17:23 +02:00
Gwendal Roué ae41859bbb Cleanup 2020-07-11 10:57:24 +02:00
Gwendal Roué 813950f832 Avoid SQLITE_BUSY when opening a DatabaseSnapshot. 2020-07-09 17:45:57 +02:00
Gwendal Roué cce8c832c7 [nil].contains(expr) now generates expr = NULL 2020-07-06 20:40:37 +02:00
Gwendal Roué fc3e64989d Cleanup _SQLExpressionContains 2020-07-06 20:18:21 +02:00
Gwendal Roué d05f11293e NULL is falsey 2020-07-06 15:14:43 +02:00
Gwendal Roué b36a92c853 Towards increased SQLCollection.contains robustness 2020-07-06 15:13:55 +02:00
Gwendal Roué 995d90ae86 Cleanup SQLExpression.identifyingRowIDs(_:for:) 2020-07-06 12:01:18 +02:00
Gwendal Roué 229fb36074 Fix test 2020-07-05 16:23:19 +02:00
Gwendal Roué 68785d1c2d Hide _SQLAssociation 2020-07-05 16:21:28 +02:00
Gwendal Roué ed7faa3714 Documentation 2020-07-05 16:14:44 +02:00
Gwendal Roué 90f2642ec6 Make good use of the visitor pattern 2020-07-05 15:07:52 +02:00
Gwendal Roué 4c3029e5c1 Not a bug after all
But add comments, and an extra test for compound primary keys
2020-07-02 19:09:46 +02:00
Gwendal Roué 46e9e28a3f Spot a bug in JoinMapping.joinExpression(leftRows:) 2020-07-02 08:49:55 +02:00
Gwendal Roué effdc8df6c Remove a debugging print() 2020-07-02 08:31:25 +02:00
Gwendal Roué 268a45a635 Prepare for different kinds of SQLAssociationCondition 2020-07-02 08:29:49 +02:00
Gwendal Roué 97cb1d595e Improve groupByPrimaryKey()
Using the rowID when possible yields better performance
2020-07-01 21:25:33 +02:00
Gwendal Roué a328faa834 Allow grouping by FastPrimaryKeyExpression 2020-07-01 21:24:27 +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é bd4a76d5de TODO 2020-06-30 19:31:03 +02:00
Gwendal Roué 63d5fb1d2b Merge pull request #803 from groue/dev/RemoveFetchedRecordsController
Remove FetchedRecordsController
2020-06-29 19:15:38 +02:00
Gwendal Roué cea8c1708f BRAG 2020-06-29 19:15:08 +02:00
Gwendal Roué ad7b044e20 CHANGELOG 2020-06-29 18:49:40 +02:00
Gwendal Roué 1123fdbb23 Mention that FetchedRecordsController is removed in the Migration Guide 2020-06-29 18:49:32 +02:00
Gwendal Roué baa86102ff Fix typo 2020-06-29 18:49:07 +02:00
Gwendal Roué 0d514b56f6 Remove more references to FetchedRecordsController 2020-06-29 18:45:58 +02:00
Gwendal Roué 138cc752a6 Remove FetchedRecordsController 2020-06-29 18:29:29 +02:00
Gwendal Roué 924a596873 Merge branch 'development' 2020-06-29 08:18:06 +02:00
Gwendal Roué 4266b1fb45 v5.0.0-beta.6 2020-06-29 08:17:17 +02:00
Gwendal Roué f58c7f6701 Documentation tweaks 2020-06-29 08:13:00 +02:00
Gwendal Roué a9b02a2d2e Merge pull request #801 from groue/dev/Combine
Combine support
2020-06-29 08:04:47 +02:00
Gwendal Roué 74459be4f7 Delete obsolete file 2020-06-28 23:40:37 +02:00
Gwendal Roué bcf912079b Merge branch 'development' into dev/Combine
# Conflicts:
#	CHANGELOG.md
2020-06-28 23:18:22 +02:00
Gwendal Roué 2a640823c7 Backport https://github.com/groue/GRDBCombine/pull/42 2020-06-28 22:50:37 +02:00
Gwendal Roué 9e77083d40 Relax profiling test 2020-06-28 21:53:34 +02:00
Gwendal Roué e4fbeb1c81 CHANGELOG 2020-06-28 21:23:45 +02:00
Gwendal Roué 733b405f79 Combine + SwiftUI demo 2020-06-28 21:23:39 +02:00
Gwendal Roué 66f0314542 CHANGELOG 2020-06-27 16:08:01 +02:00
Gwendal Roué 039f2661b6 2x faster SQLiteDateParser
GRDBPerformance > DateParsingTests

testParseDateComponents
old 0.296
new 0.073

testParseDate
old 0.431
new 0.181
2020-06-27 16:04:37 +02:00
Gwendal Roué 48bc859801 Add Xcode 12 to Makefile 2020-06-27 14:38:11 +02:00
Gwendal Roué 672e10a0ff Add missing imports for SPM 2020-06-26 06:36:22 +02:00
Gwendal Roué 0fe7b2985b Cleanup SQLCipher test projects 2020-06-25 22:53:09 +02:00
Gwendal Roué 9b24c8213e Skip unavailable tests 2020-06-25 22:16:51 +02:00
Gwendal Roué a193ac1474 Documentation for Combine support 2020-06-25 21:24:17 +02:00
Gwendal Roué 7066980f7b CHANGELOG 2020-06-25 20:11:31 +02:00
Gwendal Roué f27a297e95 Run GRDBCombine tests 2020-06-25 20:08:11 +02:00
Gwendal Roué 11fcb4c749 Embed GRDBCombine tests 2020-06-25 19:25:30 +02:00
Gwendal Roué 22bb800f2e Embed CombineExpectations 2020-06-25 19:25:30 +02:00
Gwendal Roué a0ce362197 Combine publishers 2020-06-25 19:25:29 +02:00
Gwendal Roué 329b010bfa Merge pull request #800 from groue/dev/Xcode12
Xcode 12 support
2020-06-25 19:24:57 +02:00
Gwendal Roué 6470141f17 CHANGELOG 2020-06-25 19:24:36 +02:00
Gwendal Roué 994893951d Temporary disable savepoint tests 2020-06-25 18:52:15 +02:00
Gwendal Roué 4573e80e1c #file vs. #filePath dance 2020-06-25 18:49:58 +02:00
Gwendal Roué 4cdb71bfda Thread-safe SQLite error logging 2020-06-25 08:32:07 +02:00
Gwendal Roué 7820b59996 Fix Swift 5.3 warnings 2020-06-25 08:27:57 +02:00
Gwendal Roué 8be9acf9a6 Fix Xcode 12 project warnings 2020-06-25 08:27:05 +02:00
Gwendal Roué 3a4ab7a6aa ValueObservation.print() tweaks 2020-06-22 19:01:29 +02:00
Gwendal Roué 115f293e26 Merge pull request #798 from groue/dev/ValueObservation-debug
Debugging operators for ValueObservation
2020-06-22 18:43:13 +02:00
Gwendal Roué 4e8b231c42 Rename handleEvents arguments 2020-06-22 14:23:33 +02:00
Gwendal Roué 54adc18988 Fix buggy test 2020-06-21 12:15:43 +02:00
Gwendal Roué e7b17ea0a9 Fix typo 2020-06-21 11:38:40 +02:00
Gwendal Roué 0e12a9acba Fix typo 2020-06-21 11:36:46 +02:00
Gwendal Roué 099d5a311e Cleanup 2020-06-21 11:32:43 +02:00
Gwendal Roué d199f0da83 Cleanup 2020-06-21 11:30:50 +02:00
Gwendal Roué 9e37b6b68e CHANGELOG 2020-06-21 11:20:07 +02:00
Gwendal Roué 006492a02c CHANGELOG 2020-06-21 11:17:34 +02:00
Gwendal Roué 07de1d0105 More ValueObservation event tests 2020-06-21 11:13:59 +02:00
Gwendal Roué 42cd8881a2 ValueObserver.observedRegion can now be private 2020-06-21 10:14:41 +02:00
Gwendal Roué 5c4b282e27 Refactor ValueObservation events handling 2020-06-21 09:17:12 +02:00
Gwendal Roué 7e7c232fc0 Tests for ValueObservation.print() 2020-06-20 22:09:28 +02:00
Gwendal Roué 2c90820f0f ValueObservation.handleEvents and .print documentation 2020-06-20 20:15:07 +02:00
Gwendal Roué dd76cdffec ValueObservation.handleEvents 2020-06-20 19:57:51 +02:00
Gwendal Roué 276c6a4acf Merge pull request #796 from Timac/setupMemoryManagementDocumentation
Fix inline documentation for the setupMemoryManagement() function
2020-06-20 13:17:44 +02:00
Alexandre Colucci f97e0cc540 Fix inline documentation for the setupMemoryManagement() function. In GRDB 5.0.0 and later, the parameter 'application' has been removed. 2020-06-20 12:09:59 +02:00
Gwendal Roué 0fedc0cdbb TODO 2020-06-16 08:59:33 +02:00
Gwendal Roué 0390c3ae93 Documentation 2020-06-16 08:56:48 +02:00
Gwendal Roué 4cdb45e012 Merge branch 'development' 2020-06-15 20:06:34 +02:00
Gwendal Roué 4e182a511f v5.0.0-beta.5 2020-06-15 20:05:13 +02:00
Gwendal Roué a4443b8ebb FAQ Navigation 2020-06-15 19:57:50 +02:00
Gwendal Roué 0f55f76caa Demo app tweaks 2020-06-15 19:45:00 +02:00
Gwendal Roué e3e1feee2b Demo app tweaks 2020-06-15 19:36:43 +02:00
Gwendal Roué 1a1c0cd3d1 Demo app tweaks 2020-06-15 19:23:21 +02:00
Gwendal Roué dd63ddf7f2 CHANGELOG 2020-06-15 17:04:16 +02:00
Gwendal Roué c4ab23761e QueryInterfaceRequest.selectPrimaryKey(as:) 2020-06-15 17:02:00 +02:00
Gwendal Roué 86a8439473 Fix typo 2020-06-15 14:14:09 +02:00
Gwendal Roué 47cf3b0108 Update FAQ sample code with TableRecord.primaryKey, and add tests for FAQ 2020-06-15 14:09:15 +02:00
Gwendal Roué ab97ceb784 TableRecord.primaryKey 2020-06-15 14:08:50 +02:00
Gwendal Roué ae7cdb1f5b Precision 2020-06-14 20:58:04 +02:00
Gwendal Roué c0cf3c0525 Fix wording 2020-06-14 20:51:38 +02:00
Gwendal Roué 82feed42c2 Fix wording 2020-06-14 20:50:46 +02:00
Gwendal Roué 5c697659b4 Foster SQLITE_ENABLE_SNAPSHOT in the "Custom SQLite Builds" guide 2020-06-14 20:49:22 +02:00
Gwendal Roué efc12c2ef9 CHANGELOG 2020-06-14 20:39:31 +02:00
Gwendal Roué 280c9f0155 Fix sample code 2020-06-14 20:33:49 +02:00
Gwendal Roué 9608b5edd5 Fix typo 2020-06-14 20:32:36 +02:00
Gwendal Roué 7662e53dce Fix typo 2020-06-14 20:31:29 +02:00
Gwendal Roué 1f5cc801e1 Fix typos 2020-06-14 20:29:38 +02:00
Gwendal Roué 2c6ca91985 Fix inner links 2020-06-14 20:28:16 +02:00
Gwendal Roué 023a04aff9 Associations FAQ 2020-06-14 20:25:22 +02:00
Gwendal Roué ffe40dbf79 Fix indentation 2020-06-14 17:10:24 +02:00
Gwendal Roué cf9b9206bd Fix typo 2020-06-14 17:06:36 +02:00
Gwendal Roué 0f70af7a22 Fix typo 2020-06-14 17:05:56 +02:00
Gwendal Roué 7068a4f149 Update the demo app for better alignment with "Good Practices for Designing Record Types" 2020-06-14 17:03:24 +02:00
Gwendal Roué 70714768d9 Always use snapshots apis through grdb_xxx shims 2020-06-14 15:38:16 +02:00
Gwendal Roué ec0e8672be Documentation, cleanup 2020-06-14 11:03:24 +02:00
Gwendal Roué 9215f88e7f Documentation, cleanup, and checkpoint prevention 2020-06-14 10:47:27 +02:00
Gwendal Roué 510daa84a7 This is hard 2020-06-14 06:36:53 +02:00
Gwendal Roué eacf48fef3 More snapshot-based optimization of ValueObservation with DatabasePool
This time, for the .immediate scheduler.
2020-06-14 06:34:08 +02:00
Gwendal Roué 0dee6425d1 Fix free function 2020-06-14 05:36:33 +02:00
Gwendal Roué 842846dbc4 Documentation 2020-06-14 05:36:12 +02:00
Gwendal Roué 8b800ecbe1 CHANGELOG 2020-06-13 20:19:00 +02:00
Gwendal Roué f1e65fbb2c Optimization of ValueObservation with DatabasePool thanks to SQLITE_ENABLE_SNAPSHOT
The difficulty is that system <sqlite3.h> does not contain the expected declarations, even when SQLite is compiled with SQLITE_ENABLE_SNAPSHOT :-(

Since snapshots are not exposed in any public API, we don't bother dealing with availability checks. We just add the missing declarations, and rely on the linker in order to spot eventual errors.

This commit is likely to break Linux builds, though.
2020-06-13 20:14:40 +02:00
Gwendal Roué 372996deb3 TODO
# Conflicts:
#	TODO.md
2020-06-13 13:36:51 +02:00
Gwendal Roué 45f5ece534 CHANGELOG 2020-06-12 14:22:47 +02:00
Gwendal Roué a95b3264de Fix documentation 2020-06-12 14:20:29 +02:00
Gwendal Roué 8d44ad7256 Database.maximumStatementArgumentCount 2020-06-12 14:19:31 +02:00
Gwendal Roué a136384c7d Merge pull request #795 from groue/dev/more-checkpoint
Enhanced support for WAL Checkpoints
2020-06-12 12:46:52 +02:00
Gwendal Roué b15999e4c9 TODO 2020-06-12 12:45:12 +02:00
Gwendal Roué e8235f8d6a Database.columnsForUniqueKey(_:in:) does not hit the database for empty column sequences 2020-06-11 12:49:22 +02:00
Gwendal Roué e31f7a4763 CHANGELOG 2020-06-07 17:07:31 +02:00
Gwendal Roué 3103e6e373 Fix Swiftlint warning 2020-06-07 17:07:31 +02:00
Gwendal Roué 3a42a4bf9f Rename checkpoint tuple members 2020-06-07 17:07:31 +02:00
Gwendal Roué 3e5a21b49b Tests for Database.checkpoint(_🔛) 2020-06-07 17:07:31 +02:00
Gwendal Roué 6f3ec89bcd Update checkpointing tests 2020-06-07 17:07:31 +02:00
Gwendal Roué 56f6984f9d Introduce Database.checkpoint(_🔛) 2020-06-07 17:07:31 +02:00
Gwendal Roué 5f88a400d5 DatabasePool.checkpoint(_:) is unavailable 2020-06-07 17:07:31 +02:00
Gwendal Roué 91ed7d762b Setup busy handler as soon as possible 2020-06-07 17:07:30 +02:00
Gwendal Roué 668c1d632e f67f9ebd4b did spot an oddity
This is a temp fix
2020-06-07 17:07:02 +02:00
Gwendal Roué 20f693c508 Disable two SQLCipher tests until we understand what is happening 2020-06-07 16:36:55 +02:00
Gwendal Roué f67f9ebd4b Add a sanity transaction assertion 2020-06-07 15:57:50 +02:00
Gwendal Roué 53dade2740 Merge branch 'development' 2020-06-06 15:12:27 +02:00
Gwendal Roué 9ec9880889 v5.0.0-beta.4 2020-06-06 15:11:56 +02:00
Gwendal Roué eb27b0cfc5 BRAG 2020-06-06 15:11:28 +02:00
Gwendal Roué d3cc23d5a3 Harmonize GRDB, GRDBCombine, RxGRDB for next beta 2020-06-06 15:04:13 +02:00
Gwendal Roué e129463bae Maybe fix a broken link in the generated jazzy doc 2020-06-06 13:46:32 +02:00
Gwendal Roué b567d64489 fix typo 2020-06-05 20:49:21 +02:00
Gwendal Roué d94fcc398b Date modifiers, more julianDay(), and dateTime() 2020-06-05 20:48:12 +02:00
Gwendal Roué 3c48a434f1 Tests for default SQLExpressible conformance for RawRepresentable 2020-06-05 12:27:58 +02:00
Gwendal Roué d04dda1888 Default SQLExpressible conformance for RawRepresentable 2020-06-05 12:27:42 +02:00
Gwendal Roué 842c6ced0c Documentation for julianDay function 2020-06-05 12:14:46 +02:00
Gwendal Roué 59c5d2e43b test for julianDay function 2020-06-05 12:14:40 +02:00
Gwendal Roué 2aeddda77d julianDay function 2020-06-05 12:14:34 +02:00
Gwendal Roué 9aeccce227 Makefile: support for Xcode 11.5 2020-06-05 08:33:20 +02:00
Gwendal Roué 45e5333c2c Test optimized SQLCipher 2020-06-05 08:32:05 +02:00
Gwendal Roué f4581b993b Merge pull request #794 from groue/dev/Database-description
Name of Database Connections
2020-06-04 18:20:18 +02:00
Gwendal Roué d2b1853b7b Database.debugDescription 2020-06-04 18:15:48 +02:00
Gwendal Roué 800b9ffc3d Name the temporary database used by DatabaseMigrator.eraseDatabaseOnSchemaChange 2020-06-03 20:09:22 +02:00
Gwendal Roué a93f75a6fc CHANGELOG 2020-06-03 20:01:59 +02:00
Gwendal Roué 04df4ba157 Documentation 2020-06-03 19:57:43 +02:00
Gwendal Roué d55e16de3c Database.description tests 2020-06-03 19:37:34 +02:00
Gwendal Roué 780ba744f1 Database.description 2020-06-03 19:37:24 +02:00
Gwendal Roué 8027925ae6 TODO 2020-06-03 19:07:03 +02:00
Gwendal Roué b29695b024 Link to statement profiling FAQ from SharingADatabase.md 2020-06-03 19:06:09 +02:00
Gwendal Roué d98904727f Thank you 2020-06-01 21:12:53 +02:00
Gwendal Roué 4cd421ff7c Merge branch 'development' 2020-06-01 20:21:22 +02:00
Gwendal Roué a8b58cb7e7 v5.0.0-beta.3 2020-06-01 20:20:52 +02:00
Gwendal Roué 578fa162f1 Merge pull request #791 from groue/dev/trace
Extend tracing of statement execution
2020-06-01 20:14:35 +02:00
Gwendal Roué 7333b1a080 Travis: no more stages 2020-06-01 18:20:02 +02:00
Gwendal Roué 961e5e46c1 Fix SQLCipher tests 2020-06-01 14:09:22 +02:00
Gwendal Roué a2dce4a238 Come on, Travis 2020-06-01 09:02:25 +02:00
Gwendal Roué 996c1c994f Documentation 2020-06-01 07:41:46 +02:00
Gwendal Roué 9540df84cf Documentation 2020-06-01 07:39:43 +02:00
Gwendal Roué b47680638d Trace statements by default 2020-06-01 07:16:48 +02:00
Gwendal Roué 5f7a9de8a5 Fix statement profiling test for slow setups 2020-06-01 06:28:46 +02:00
Gwendal Roué b80814a77e CHANGELOG 2020-05-31 20:16:00 +02:00
Gwendal Roué b95d7cb647 More Tests for Database.trace(options:_:) 2020-05-31 20:13:45 +02:00
Gwendal Roué 3e25faabba Update the migration guide 2020-05-31 19:16:35 +02:00
Gwendal Roué 2677cf8de8 Update documentation 2020-05-31 19:16:23 +02:00
Gwendal Roué 81213f2649 Tests for Database.trace(options:_:) 2020-05-31 19:08:42 +02:00
Gwendal Roué 30f619ca2c Refactor database tracing
- Make it possible to log the database label along with the executed SQL
- Make it possible to avoid arguments expansion
- Make it possible to profile statements
2020-05-31 19:08:08 +02:00
Gwendal Roué 9552a5ce40 Merge pull request #790 from groue/dev/iOS10
Bump required iOS version to 10.0
2020-05-31 14:20:33 +02:00
Gwendal Roué 318564a13c CHANGELOG 2020-05-31 14:02:18 +02:00
Gwendal Roué 9ee3fd38b5 Remove mentions of unsupported iOS versions 2020-05-31 13:54:02 +02:00
Gwendal Roué 03a66af35e Bump iOS requirement to iOS10+
iOS9 simulator is no longer available with the Xcode 11.4+ requirement. https://twitter.com/xenadu02/status/1140093901438689280
2020-05-31 13:48:59 +02:00
Gwendal Roué 00c2f61535 TODO 2020-05-30 13:54:45 +02:00
Gwendal Roué 289394c7ac Turn LockedBox and ReadWriteBox into property wrappers.
Also fix an old concurrency bug in tests, regarding query recording
2020-05-30 13:52:39 +02:00
Gwendal Roué a5de2b9288 Breaking: AnyFetchRequest.asRequest(of:) 2020-05-30 10:30:07 +02:00
Gwendal Roué e0266bdde3 Merge pull request #784 from groue/dev/fix-783
Fix observation of eager-loaded to-many associations
2020-05-25 18:34:30 +02:00
Gwendal Roué e82ecfee9f CHANGELOG 2020-05-25 13:41:41 +02:00
Gwendal Roué 80f0379d71 Remove database content unused by test 2020-05-25 13:39:35 +02:00
Gwendal Roué 449c0e37b1 Update regression tests for #783 2020-05-25 13:24:25 +02:00
Gwendal Roué f825c52ecf Update request region tests for both DatabaseRegionConvertible and statement region 2020-05-25 13:04:48 +02:00
Gwendal Roué 4c2042c3ce Cleanup 2bb53026ef 2020-05-25 13:04:10 +02:00
Gwendal Roué af0946fd21 Regression tests for #783 (WIP) 2020-05-25 09:34:35 +02:00
Gwendal Roué 2bb53026ef Fix #783 2020-05-25 09:34:11 +02:00
Gwendal Roué 0929fe72b8 Cleanup detection of queries that return a single row 2020-05-14 12:28:52 +02:00
Gwendal Roué e0a40776ee Makefile update for Travis 2020-05-12 07:21:13 +02:00
Gwendal Roué e99015bcff Merge branch 'development' 2020-05-11 18:50:35 +02:00
Gwendal Roué abd7ee9f17 v5.0.0-beta.2 2020-05-11 18:49:57 +02:00
Gwendal Roué 364c624a37 Update sample code for sharing databases 2020-05-11 18:44:38 +02:00
Gwendal Roué 00e10324d8 Merge pull request #775 from groue/dev/superseded-migrator
DatabaseMigrator can check if it has been superseded
2020-05-11 13:35:10 +02:00
Gwendal Roué 0539c41d17 CHANGELOG 2020-05-11 09:10:14 +02:00
Gwendal Roué 212a6f7e53 Documentation 2020-05-11 09:06:04 +02:00
Gwendal Roué cff769ddd5 Documentation 2020-05-11 08:54:31 +02:00
Gwendal Roué ed6ad9d373 Clean up DatabaseMigrator tests 2020-05-11 08:50:04 +02:00
Gwendal Roué 44772f89d7 More tests for DatabaseMigrator.hasBeenSuperseded(_:) 2020-05-11 08:46:41 +02:00
Gwendal Roué 2aa61c3403 Tests for DatabaseMigrator.hasBeenSuperseded(_:) 2020-05-11 08:28:02 +02:00
Gwendal Roué 3fea5db763 DatabaseMigrator.hasBeenSuperseded(_:) 2020-05-11 08:27:41 +02:00
Gwendal Roué b2bc0e7941 Merge pull request #774 from groue/dev/request-as-expression-and-collection
All requests are usable as SQL expressions and collections
2020-05-11 08:10:45 +02:00
Gwendal Roué c7d98e0231 CHANGELOG 2020-05-10 15:34:38 +02:00
Gwendal Roué 6fcf4f565a Relax test for various SQLite versions 2020-05-10 15:34:38 +02:00
Gwendal Roué 8c11a751ff TODO 2020-05-10 15:34:38 +02:00
Gwendal Roué c0217d56ca Remove doubt about how SQLRequest uses singleResult 2020-05-10 15:34:38 +02:00
Gwendal Roué 89ba8c3398 Remove unclear rationale 2020-05-10 15:34:38 +02:00
Gwendal Roué d814ab216d Documentation 2020-05-10 15:34:38 +02:00
Gwendal Roué 284ec22dd5 Documentation 2020-05-10 15:34:38 +02:00
Gwendal Roué 57e5735e9a Documentation 2020-05-10 15:34:38 +02:00
Gwendal Roué 5786d19ff4 Documentation 2020-05-10 15:34:38 +02:00
Gwendal Roué c73872549a Fix typo 2020-05-10 15:34:38 +02:00
Gwendal Roué f799d5f30c Documentation 2020-05-10 15:34:38 +02:00
Gwendal Roué e94be4a06e Upgrade path for FetchRequest 2020-05-10 15:34:38 +02:00
Gwendal Roué e9a68d82e6 Remove FetchRequest documentation from the main README 2020-05-10 15:34:38 +02:00
Gwendal Roué b16a0da88c Documentation 2020-05-10 15:34:37 +02:00
Gwendal Roué a318d4cc82 Test upgrade path from GRDB4 to GRDB5 2020-05-10 15:34:37 +02:00
Gwendal Roué 4f500de04b Expose SQLLiteral.sql(_:)
This is needed for custom FetchRequest types
2020-05-10 15:34:37 +02:00
Gwendal Roué a77b195c7c Reopen FetchRequest 2020-05-10 15:34:37 +02:00
Gwendal Roué d2928a9929 requestSQL(_:forSingleResult:) is experimental 2020-05-10 15:34:37 +02:00
Gwendal Roué 476e72cca2 requestSQL(_:forSingleResult:) is experimental 2020-05-10 15:34:37 +02:00
Gwendal Roué 375ed0135c PreparedRequest is still documented 2020-05-10 15:34:37 +02:00
Gwendal Roué 17e745f52b SQLRequestProtocol, close FetchRequest 2020-05-10 15:34:37 +02:00
Gwendal Roué a3cc5745ac Revert "Test for the immutable flag"
This reverts commit 8a595be54f.
2020-05-10 15:31:56 +02:00
Gwendal Roué 8a595be54f Test for the immutable flag
https://sqlite.org/uri.html#uriimmutable
2020-05-10 12:38:04 +02:00
Gwendal Roué 68203b5373 Merge pull request #773 from groue/dev/subqueries-and-aliases
Allow subqueries to refer to outer tables
2020-05-09 08:20:49 +02:00
Gwendal Roué a79fc34071 CHANGELOG 2020-05-08 20:57:50 +02:00
Gwendal Roué 7f66f41026 TODO 2020-05-08 20:43:10 +02:00
Gwendal Roué 956f419b20 TODO 2020-05-08 20:41:21 +02:00
Gwendal Roué e414aca05b Cleanup 2020-05-08 20:41:18 +02:00
Gwendal Roué 76e0a9f6b6 AnyFetchRequest is now generic on RowDecoder 2020-05-08 16:43:02 +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é a4d7f39ad8 Merge pull request #772 from groue/dev/SQLITE_FCNTL_PERSIST_WAL
Update the Database Sharing Guide with mention of the persistent WAL mode
2020-05-06 19:39:53 +02:00
Gwendal Roué 6f02a90a7a Remove link to deleted chapter 2020-05-06 19:38:24 +02:00
Gwendal Roué ae3c06f761 Remove the obsolete "Performance" chapter
It contained outdated information, and removing it helps GitHub preserve Markdown rendering of our looooong README.
2020-05-06 19:37:08 +02:00
Gwendal Roué f29a98aac3 Fix inner documentation links 2020-05-06 19:33:39 +02:00
Gwendal Roué a641b1efd4 Documentation 2020-05-06 19:29:48 +02:00
Gwendal Roué fc6c46e628 CHANGELOG 2020-05-06 19:25:11 +02:00
Gwendal Roué cb8c9f5ba3 SQLITE_FCNTL_PERSIST_WAL is always recommended 2020-05-06 19:13:16 +02:00
Gwendal Roué a8122b44f1 Wording 2020-05-06 18:52:39 +02:00
Gwendal Roué 6b86e61056 Cool URIs don't change 2020-05-06 18:38:36 +02:00
Gwendal Roué 97bbb5bced Rename AppGroupContainers.md to SharingADatabase.md 2020-05-06 18:34:45 +02:00
Gwendal Roué b3b155459f Document the "persistent WAL mode" and SQLITE_FCNTL_PERSIST_WAL 2020-05-06 18:24:06 +02:00
Gwendal Roué e4803c1e0c Cleanup SQLITE_FCNTL_PERSIST_WAL tests 2020-05-06 13:25:59 +02:00
Gwendal Roué db7fb96142 Tests for persistent WAL mode
Tests for SQLITE_FCNTL_PERSIST_WAL: https://www.sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpersistwal
2020-05-06 08:55:27 +02:00
Gwendal Roué 3eb7d57754 [skip travis] Documentation 2020-05-04 12:57:42 +02:00
Gwendal Roué 7af96a69a0 Merge pull request #753 from groue/GRDB5
GRDB 5
2020-05-02 18:07:54 +02:00
Gwendal Roué 00e6d4ed0e Give *even* more time to tests 2020-05-02 16:23:31 +02:00
Gwendal Roué f4b2c2d40a [skip travis] Bump release date 2020-05-02 15:36:10 +02:00
Gwendal Roué 75e9056ac8 [skip travis] Fix inner links 2020-05-02 15:22:19 +02:00
Gwendal Roué a69be48066 Give more time to tests 2020-05-02 15:13:02 +02:00
Gwendal Roué 420fb93356 Fix testErrorCompletesTheObservation 2020-05-02 12:30:54 +02:00
Gwendal Roué 425e506862 Make all ValueObservation tests deterministic (avoid inverted expectations)
Inverted expectations were just too flaky on Travis
2020-05-02 12:19:23 +02:00
Gwendal Roué f09a62415d Restore disabled Travis jobs
We'll need some stronger cure. All timeout-based tests are flaky on Travis :-(
2020-05-02 09:04:51 +02:00
Gwendal Roué 90028ee9f5 Give more time for Travis 2020-05-02 08:41:56 +02:00
Gwendal Roué e37d2ae18c [skip travis] Fix inner links 2020-05-02 05:51:14 +02:00
Gwendal Roué 0322537b63 [skip travis] Fix inner links 2020-05-02 05:42:33 +02:00
Gwendal Roué 7b6bd84ac2 Disable flaky tvOS tests
https://travis-ci.org/github/groue/GRDB.swift/jobs/682070292
2020-05-02 05:28:42 +02:00
Gwendal Roué 6a98a46c85 Speed up slow tests 2020-05-01 20:11:02 +02:00
Gwendal Roué 0ab974e1b7 [skip travis] Rename Travis jobs 2020-05-01 19:47:46 +02:00
Gwendal Roué 85b84f217d Fix for Travis 2020-05-01 19:27:17 +02:00
Gwendal Roué 5e9cbf41a5 Let people find the non-beta version 2020-05-01 19:02:24 +02:00
Gwendal Roué 773db56d79 Sort the section of moved chapters 2020-05-01 18:59:28 +02:00
Gwendal Roué f68cbb03ee Update link to migration guide 2020-05-01 18:57:32 +02:00
Gwendal Roué 15f1e5259d Extract the Migration guide from the main README
README is too big, and Github stops rendering Markdown
2020-05-01 18:56:05 +02:00
Gwendal Roué 7ede3edf0c v5.0.0-beta 2020-05-01 18:44:13 +02:00
Gwendal Roué 14d16ffd20 My 🦋 keyboard is 💩 2020-05-01 17:34:08 +02:00
Gwendal Roué a7df6cc7df CHANGELOG 2020-05-01 17:30:11 +02:00
Gwendal Roué aaa5986e33 CHANGELOG 2020-05-01 17:26:43 +02:00
Gwendal Roué 3173dd20fe CHANGELOG 2020-05-01 17:18:14 +02:00
Gwendal Roué a29ca8348f CHANGELOG: documentation diff 2020-05-01 17:15:44 +02:00
Gwendal Roué 278e72ecc8 Fix typo 2020-05-01 17:15:35 +02:00
Gwendal Roué cf738588f2 Fix typo 2020-05-01 16:30:41 +02:00
Gwendal Roué 146b06f27a bugfix 2020-05-01 16:15:54 +02:00
Gwendal Roué fa4a90f720 Improve SQLQueryGenerator.expectsSingleResult 2020-05-01 16:06:56 +02:00
Gwendal Roué 93f4d43ee6 Cleanup 2020-05-01 15:43:57 +02:00
Gwendal Roué da4b96c2ca Cleanup handling of subquery sources 2020-05-01 15:42:01 +02:00
Gwendal Roué 420a257650 Test for case insensitivity in association requests 2020-05-01 15:07:40 +02:00
Gwendal Roué 39f327fcb3 Optimize SQLAssociationCondition.filteringExpression(_:leftRows:)
And make sure we compute a correct database region for association requests
2020-05-01 15:06:47 +02:00
Gwendal Roué 27ffb2a418 Rename index(ofColumn:) to index(forColumn:) 2020-05-01 15:01:01 +02:00
Gwendal Roué 0dc18cdaab CHANGELOG 2020-05-01 13:17:23 +02:00
Gwendal Roué 1ac9051384 Merge pull request #770 from groue/dev/subqueries
Subqueries
2020-05-01 12:36:19 +02:00
Gwendal Roué 691bb73d3e Bump iOS version in Makefile 2020-05-01 12:07:32 +02:00
Gwendal Roué 61d7740767 Fix FTS5 2020-05-01 11:27:08 +02:00
Gwendal Roué 7f7554f601 Document support for subqueries 2020-05-01 11:12:44 +02:00
Gwendal Roué ee68550052 Fix typo 2020-05-01 10:59:10 +02:00
Gwendal Roué 4de63ca9a2 Documentation fix 2020-05-01 10:47:23 +02:00
Gwendal Roué ef42035fe4 Documentation 2020-05-01 10:36:36 +02:00
Gwendal Roué eb93b25301 Fix typo 2020-05-01 10:28:19 +02:00
Gwendal Roué 2502747a7b Update the "Joined Queries Support" chapter 2020-05-01 10:25:44 +02:00
Gwendal Roué de5477d8f0 Documentation 2020-05-01 09:47:27 +02:00
Gwendal Roué fae562f20d Documentation 2020-05-01 09:43:48 +02:00
Gwendal Roué 307c3d5a13 Documentation 2020-05-01 09:01:10 +02:00
Gwendal Roué 7a1afba26e Documentation 2020-05-01 08:59:00 +02:00
Gwendal Roué b2370dd597 TODO 2020-05-01 08:58:52 +02:00
Gwendal Roué 513b7e9379 Tests for interpolation of TableRecord selection 2020-05-01 08:58:46 +02:00
Gwendal Roué 9392722bab Restore and fix test for TableRecord selection interpolation 2020-04-30 19:47:35 +02:00
Gwendal Roué 321b6a3488 Fixits for renamed generic parameter 2020-04-30 19:37:02 +02:00
Gwendal Roué 443d44cc7a Restore TableRecord.selectionSQL in the form of SQL interpolation 2020-04-30 19:33:33 +02:00
Gwendal Roué df2cc0af36 Test for SQLCollection qualification 2020-04-30 19:01:14 +02:00
Gwendal Roué dfcc6f99a5 SQLCollection can be qualified, now 2020-04-30 18:49:20 +02:00
Gwendal Roué 664c1ed281 Documentation 2020-04-30 18:35:05 +02:00
Gwendal Roué 057679a2ba We don't need to prevent requests that select several columns 2020-04-30 18:22:59 +02:00
Gwendal Roué e05b8b2b47 Unify SQLGenerationContext 2020-04-30 17:56:15 +02:00
Gwendal Roué d67f4802d3 Documentation 2020-04-30 15:21:41 +02:00
Gwendal Roué 72e4fc620b Remove LIMIT 1 from aggregated requests 2020-04-30 15:16:00 +02:00
Gwendal Roué 9c53ed94a7 Documentation 2020-04-30 15:13:33 +02:00
Gwendal Roué cac605749d Cleanup SQLExpressionBinaryReduce.truthComponents 2020-04-30 14:21:25 +02:00
Gwendal Roué 9006c701b3 Replace the expectsSingleResult hint with an analysis of the query 2020-04-30 14:14:07 +02:00
Gwendal Roué 05c001865b Cleanup 2020-04-30 09:12:57 +02:00
Gwendal Roué cb7a7633b1 TODO 2020-04-30 09:04:17 +02:00
Gwendal Roué 1e92b98165 TODO 2020-04-30 08:40:35 +02:00
Gwendal Roué 0bf23477f8 Less TODO 2020-04-30 08:36:10 +02:00
Gwendal Roué 359df39b7e Make it easier to look for subquery tests 2020-04-30 08:36:04 +02:00
Gwendal Roué cfd4141469 CHANGELOG 2020-04-30 08:32:51 +02:00
Gwendal Roué 90415fa936 Documentation 2020-04-30 08:31:59 +02:00
Gwendal Roué 1d89d184fd Fix subqueries semantics 2020-04-30 08:19:00 +02:00
Gwendal Roué 026e5b288f Documentation 2020-04-29 23:46:42 +02:00
Gwendal Roué be249bc697 SQLRequestExpressible is a sub protocol of SQLSpecificExpressible 2020-04-29 23:40:37 +02:00
Gwendal Roué 69641ff7d6 Undo undesired change 2020-04-29 22:29:53 +02:00
Gwendal Roué 4245e8f09e Cleanup 2020-04-29 22:24:58 +02:00
Gwendal Roué 94fed7965b Cleanup 2020-04-29 22:16:19 +02:00
Gwendal Roué a15233eff1 SQLGenerationContext no longer needs to be mutated 2020-04-29 21:59:04 +02:00
Gwendal Roué e47a584c3e TableRecord.selectionSQL can no longer be implemented 🤷 2020-04-29 21:51:02 +02:00
Gwendal Roué 188f51c513 Refactor handling of arguments during SQL generation 2020-04-29 21:27:14 +02:00
Gwendal Roué e800c71cbc Refactor SQLLiteral so that subqueries are no longer a special case 2020-04-29 20:20:13 +02:00
Gwendal Roué 3d86f45aa2 SQLRequestExpressible
This protocol makes it possible to write request.filter(column == subRequest)
2020-04-29 20:18:00 +02:00
Gwendal Roué 473bc3a88e SQLQueryGenerator handles the single result optimization. Make sure a single column is selected for expression/collection requests 2020-04-29 18:30:46 +02:00
Gwendal Roué 4b9336f5c5 TODO 2020-04-29 15:21:22 +02:00
Gwendal Roué 8bcf9257f6 TODO 2020-04-29 14:32:53 +02:00
Gwendal Roué ca59d706e9 Cleanup 2020-04-29 14:27:58 +02:00
Gwendal Roué 82ff6cb4c5 Cleanup 2020-04-29 14:24:25 +02:00
Gwendal Roué 21552d8838 SQLRequest & QueryInterfaceRequest are SQLExpression 2020-04-29 14:24:18 +02:00
Gwendal Roué 26f40efece TODO 2020-04-29 13:54:00 +02:00
Gwendal Roué c82dbb35ad SQLLiteral and SQLRequest no longer have sql and arguments properties 2020-04-29 13:52:29 +02:00
Gwendal Roué 84ca69d27c Value quoting can now require a database connection 2020-04-29 11:03:51 +02:00
Gwendal Roué 6dca9e1068 Cleanup 2020-04-29 09:49:24 +02:00
Gwendal Roué 8cb75dd814 Subqueries wip 2020-04-28 21:03:58 +02:00
Gwendal Roué 59e81f70bd Cleanup aggregates 2020-04-28 19:49:41 +02:00
Gwendal Roué 399766fe10 Fix #739 2020-04-28 19:19:30 +02:00
Gwendal Roué f543784241 TODO 2020-04-28 14:20:05 +02:00
Gwendal Roué 0b0f0e53da TODO 2020-04-26 18:04:57 +02:00
Gwendal Roué f738fdfa8e Cleanup Decodable behavior regarding missing keys and optionals 2020-04-26 14:19:29 +02:00
Gwendal Roué a8f7978ec4 Update documention after d0ba9e342c 2020-04-26 11:55:53 +02:00
Gwendal Roué d1af9dbdf1 Fix documentation comment 2020-04-25 20:27:25 +02:00
Gwendal Roué d0ba9e342c Turn selection and having clauses into promises. Give association aggregates access to the actual primary key, for better support for WITHOUT ROW ID tables. 2020-04-25 19:51:03 +02:00
Gwendal Roué b38ccb5f40 TODO 2020-04-25 15:15:06 +02:00
Gwendal Roué 605aad79ad Replace use of rowid by primary key when possible. Cleanup management of association cardinality
This is a backport of enhancements brought by the failed pull request https://github.com/groue/GRDB.swift/pull/767
2020-04-25 15:15:01 +02:00
Gwendal Roué 6fd3a7b225 Merge branch 'development' into GRDB5
# Conflicts:
#	CHANGELOG.md
#	README.md
2020-04-25 13:21:20 +02:00
Gwendal Roué 6b1910fce7 [skip travis] fix typo in CHANGELOG 2020-04-23 09:08:27 +02:00
Gwendal Roué a715c6328d Merge branch 'master' into GRDB5
# Conflicts:
#	CHANGELOG.md
#	GRDB/QueryInterface/Request/QueryInterfaceRequest.swift
#	Makefile
#	README.md
#	Tests/Performance/GRDBPerformance/GRDBPerformance.xcodeproj/project.pbxproj
2020-04-18 16:36:26 +02:00
Gwendal Roué 3fd00012d1 Update obsolete observation usage in README 2020-04-17 09:03:03 +02:00
Gwendal Roué 6d901b06e9 TODO 2020-04-16 19:27:09 +02:00
Gwendal Roué 5760b9c0cc Migration Guide 2020-04-12 20:10:03 +02:00
Gwendal Roué 75525bdb56 Migration Guide 2020-04-12 17:33:04 +02:00
Gwendal Roué 2fa57cdafa Make CSQLite a system module
Attempt at fixing this GRDBCombine error:

$ swift build
...
'CSQLite' /.../GRDBCombine/.build/checkouts/CSQLite: error: configuration of package 'CSQLite' is invalid; the 'providers' property can only be used with a System Module Package
2020-04-12 15:07:39 +02:00
Gwendal Roué 2319572552 Remove unused file 2020-04-12 13:04:45 +02:00
Gwendal Roué 5f26a71c5b Migration Guide 2020-04-12 10:24:44 +02:00
Gwendal Roué d0558ee2f0 Migration Guide 2020-04-12 10:15:09 +02:00
Gwendal Roué fc09fd6654 Merge pull request #756 from groue/dev/export-SQLite
Export the underlying SQLite library
2020-04-12 10:05:19 +02:00
Gwendal Roué 1ea5d1713a Cleanup 2020-04-12 10:04:09 +02:00
Gwendal Roué aa0ae00c56 CHANGELOG 2020-04-12 09:44:11 +02:00
Gwendal Roué 0372c1dd63 Complete #747: export the underlying SQLite library 2020-04-12 07:27:50 +02:00
Gwendal Roué c052b44999 Cleanup 2020-04-11 20:56:36 +02:00
Gwendal Roué f27d6b07c0 Cleanup 2020-04-11 20:45:00 +02:00
Gwendal Roué 4f8b681737 Documentation 2020-04-11 18:26:42 +02:00
Gwendal Roué 5b9ae9371b Documentation 2020-04-11 17:37:12 +02:00
Gwendal Roué 68f4db468a Documentation 2020-04-11 17:25:16 +02:00
Gwendal Roué 62dbc78090 More migration guide 2020-04-11 13:57:19 +02:00
Gwendal Roué bd7bec22a1 More migration guide 2020-04-11 13:52:36 +02:00
Gwendal Roué 722e74db6a More migration guide 2020-04-11 13:49:26 +02:00
Gwendal Roué e9439a1d58 Fix typo 2020-04-11 13:39:02 +02:00
Gwendal Roué 3c70814cdc More ValueObservation migration doc 2020-04-11 13:38:01 +02:00
Gwendal Roué fea89100d9 Improve ValueObservation.trackingVaryingRegion example 2020-04-11 13:10:15 +02:00
Gwendal Roué 2c3d0b1e17 Organize migration guide 2020-04-11 13:05:11 +02:00
Gwendal Roué 478ae7bc24 Improve migration guide 2020-04-11 12:43:28 +02:00
Gwendal Roué da81c8b87c Fix typo 2020-04-11 10:33:12 +02:00
Gwendal Roué 4088a477ec Improve migration guide 2020-04-10 20:07:19 +02:00
Gwendal Roué 85dcd32c8d Improve the description of ValueObservation change 2020-04-10 18:52:24 +02:00
Gwendal Roué 62c72c20e9 CHANGELOG 2020-04-10 18:38:16 +02:00
Gwendal Roué 1b4e26f61c Cleanup 2020-04-10 12:35:33 +02:00
Gwendal Roué 474310e00b More inspiration from CocoaError 2020-04-10 09:30:34 +02:00
Gwendal Roué 7a475ad476 Cleanup 2020-04-10 08:58:29 +02:00
Gwendal Roué 65ac210dfb Merge pull request #754 from groue/dev/ResultCode-match
Match DatabaseError on ResultCode
2020-04-09 20:42:23 +02:00
Gwendal Roué f19e5bf67c CHANGELOG 2020-04-09 19:56:12 +02:00
Gwendal Roué 419bedd73b Update documentation for DatabaseError catching 2020-04-09 19:53:21 +02:00
Gwendal Roué 8eb58926a4 Test for ResultCode error matching 2020-04-09 19:53:02 +02:00
Gwendal Roué ccacbc9706 ResultCode match errors 2020-04-09 19:52:39 +02:00
Gwendal Roué 7db59867cb Documentation 2020-04-09 19:08:53 +02:00
Gwendal Roué 37aa7feee9 Rename KeyPathRefining to Refinable 2020-04-09 18:50:36 +02:00
Gwendal Roué e49800d21d Fix build warnings 2020-04-09 17:55:49 +02:00
Gwendal Roué 078aa83e3b Rename count(where:) to countElements(where:) 2020-04-09 17:47:07 +02:00
Gwendal Roué 8ef4c9b241 Remove convenience Result.tryMap 2020-04-09 17:45:12 +02:00
Gwendal Roué f9157da590 TODO 2020-04-09 17:44:41 +02:00
Gwendal Roué 27120643b9 SE-0255: Implicit returns from single-expression functions 2020-04-09 17:16:23 +02:00
Gwendal Roué 306033b63b Update Migration Guide 2020-04-09 13:43:56 +02:00
Gwendal Roué d988be49a6 Revert #748 2020-04-09 13:42:37 +02:00
Gwendal Roué 1a5661c890 Lift resolved attention point about custom SQLite builds 2020-04-09 08:55:40 +02:00
Gwendal Roué ccaad8d860 Restore backward compatibility for setup of custom SQLite builds
User only has to rename the `import` Swift statement
2020-04-09 08:50:24 +02:00
Gwendal Roué c9d95af646 Merge pull request #752 from groue/dev/drop-observation-combination
Remove ValueObservation.combine
2020-04-08 19:55:18 +02:00
Gwendal Roué 3e081f0dd6 Remove GRDBPerformance project from workspace
This avoids painful Xcode management of SPM packages
2020-04-08 19:13:08 +02:00
Gwendal Roué 444525d748 CHANGELOG 2020-04-08 18:54:08 +02:00
Gwendal Roué c778e1ac0c Add fixits 2020-04-08 18:53:08 +02:00
Gwendal Roué bfe037c61d Update documentation 2020-04-08 18:33:56 +02:00
Gwendal Roué e2790c863f Remove ValueObservation combine operator 2020-04-08 18:16:05 +02:00
Gwendal Roué 3c3df9ad24 Miigration Guide WIP 2020-04-08 08:40:54 +02:00
Gwendal Roué 3c30e6d0c1 Miigration Guide WIP 2020-04-08 08:30:10 +02:00
Gwendal Roué a5ad4dd23d Miigration Guide WIP 2020-04-07 22:24:25 +02:00
Gwendal Roué 0505b1cef9 Miigration Guide WIP 2020-04-07 22:20:35 +02:00
Gwendal Roué 2ac6f9766a Miigration Guide WIP 2020-04-07 22:16:44 +02:00
Gwendal Roué 10fcd1092f Miigration Guide WIP 2020-04-07 22:08:17 +02:00
Gwendal Roué cbcbbe9c8f Miigration Guide WIP 2020-04-07 22:04:47 +02:00
Gwendal Roué 2b7b03846e Miigration Guide WIP 2020-04-07 22:00:00 +02:00
Gwendal Roué 05f9854cea Miigration Guide WIP 2020-04-07 20:59:34 +02:00
Gwendal Roué 8cb67f1c22 Miigration Guide WIP 2020-04-07 20:47:56 +02:00
Gwendal Roué 48987f39c3 Miigration Guide WIP 2020-04-07 20:17:11 +02:00
Gwendal Roué e5f711f68c Miigration Guide WIP 2020-04-07 20:01:55 +02:00
Gwendal Roué ac92fc95e3 Merge branch 'development' into GRDB5 2020-04-06 20:16:53 +02:00
Gwendal Roué bf07c49171 Merge pull request #750 from groue/dev/assignment-without-operator
Batch updates do not need any operator
2020-04-05 17:24:09 +02:00
Gwendal Roué c59d42dfca CHANGELOG 2020-04-05 16:43:00 +02:00
Gwendal Roué 80b15f7f07 Ignore GRDB.xcworkspace spm stuff 2020-04-05 16:28:04 +02:00
Gwendal Roué 9647a78ed6 Update documentation 2020-04-05 16:26:29 +02:00
Gwendal Roué 2c743531d0 Operator <- was ill-advised 2020-04-05 16:25:18 +02:00
Gwendal Roué 9e967ccc93 Merge pull request #749 from groue/dev/submodules
Drop submodules used by performance tests
2020-04-05 14:07:49 +02:00
Gwendal Roué 86330000db CHANGELOG 2020-04-05 13:36:41 +02:00
Gwendal Roué af597736f6 Wait before we look into the Xcode checkouts 2020-04-05 13:14:09 +02:00
Gwendal Roué 119ce30ad1 Pin versions GRDBPerformance of dependencies 2020-04-05 12:29:03 +02:00
Gwendal Roué 85c3f12b86 Extract versions of GRDBPerformance dependencies from Xcode SPM checkouts 2020-04-05 11:57:55 +02:00
Gwendal Roué f95e01cbd5 Remove submodule dependencies from Makefile 2020-04-05 10:34:21 +02:00
Gwendal Roué 21eb87fa49 Use SPM for GRDBPerformance dependencies 2020-04-05 10:25:54 +02:00
Gwendal Roué 4614cfda06 Removed test submodules 2020-04-05 09:58:53 +02:00
Gwendal Roué a4bda6da96 Merge pull request #748 from groue/dev/Request
Rename QueryInterfaceRequest to Request
2020-04-04 20:55:18 +02:00
Gwendal Roué 2d2b8494d0 CHANGELOG 2020-04-04 20:13:50 +02:00
Gwendal Roué 7ce6a8a094 Rename QueryInterfaceRequest to Request 2020-04-04 20:12:03 +02:00
Gwendal Roué 3756c43691 Merge pull request #747 from groue/dev/fix-743
Rename GRDBCustomSQLite to GRDB
2020-04-04 18:52:14 +02:00
Gwendal Roué bfc4738097 CHANGELOG 2020-04-04 18:48:35 +02:00
Gwendal Roué afcb9183ad Rename GRDBCustom schemes 2020-04-04 18:37:36 +02:00
Gwendal Roué c3474471f7 Don't include <sqlite3.h> for custom SQLite builds 2020-04-04 18:03:29 +02:00
Gwendal Roué 65c009a018 Rename GRDBCustomSQLite module to GRDB 2020-04-04 17:42:00 +02:00
Gwendal Roué d60fe3c22f Replace import GRDBCustomSQLite with import GRDB 2020-04-04 16:44:01 +02:00
Gwendal Roué 5727163966 SPM: export CSQLite package 2020-04-04 14:20:07 +02:00
Gwendal Roué d72000c6a3 Use scheduling paramater name for consistency with GRDBCombine and RxGRDB 2020-03-31 20:25:36 +02:00
Gwendal Roué 381f716e4b AnyDatabaseCancellable is public
This helps GRDBCombine defaulting to a default cancellable when database connection has been closed before the ValueObservation publisher has been subscribed to.
2020-03-29 20:31:02 +02:00
Gwendal Roué eee2c65c14 Merge branch 'development' into GRDB5
# Conflicts:
#	CHANGELOG.md
#	README.md
2020-03-29 18:55:06 +02:00
Gwendal Roué 73aada9194 Merge pull request #745 from groue/dev/ValueObservation-cancellation
Explicit ValueObservation cancellation
2020-03-29 17:30:09 +02:00
Gwendal Roué 5665a2428a CHANGELOG 2020-03-29 16:49:21 +02:00
Gwendal Roué 66dc482b02 Don't pretend database deallocation is a cancel event 2020-03-29 16:30:29 +02:00
Gwendal Roué 3c20adb0c6 Add test for explicit cancellation 2020-03-29 16:11:54 +02:00
Gwendal Roué 1bffc4f628 ValueObservation is cancellable 2020-03-29 16:06:24 +02:00
Gwendal Roué ccd73bf63d Don't parallelize SQLCipher tests 2020-03-29 11:45:52 +02:00
Gwendal Roué d4327faf0a Merge pull request #742 from groue/dev/ValueObservation-scheduling
ValueObservation scheduling is no longer an attribute of the observation
2020-03-29 11:14:48 +02:00
Gwendal Roué 87b54f5da2 Protect ValueObserver state behind a lock 2020-03-29 10:28:37 +02:00
Gwendal Roué a28ae9a523 Stronger tests 2020-03-28 20:50:40 +01:00
Gwendal Roué 055a4882f8 Fix compilation error 2020-03-28 20:14:30 +01:00
Gwendal Roué 90d5316781 Hide ValueObservationScheduler implementation 2020-03-28 19:53:18 +01:00
Gwendal Roué 303a0cc150 immediateInitialValue is a better name 2020-03-28 19:49:07 +01:00
Gwendal Roué 08ef740002 Optimize ValueObservation tests 2020-03-28 19:31:27 +01:00
Gwendal Roué 5d196c449d Value Observation does no longer retain DatabaseWriter 2020-03-28 17:11:57 +01:00
Gwendal Roué fdb2f63e60 Add missing file to iOS/tvOS/watchOS compilation 2020-03-28 14:26:08 +01:00
Gwendal Roué c83d390e60 More test rationalization 2020-03-28 14:07:36 +01:00
Gwendal Roué a6ac69eded Move view optimization test 2020-03-28 13:54:18 +01:00
Gwendal Roué 1914ace5f9 Test as much as possible value observations 2020-03-28 13:43:18 +01:00
Gwendal Roué 88ddce5fac Make sure the observer is cancelled on error 2020-03-28 11:42:53 +01:00
Gwendal Roué 23d428290b Assume that error ends the observation, and have database pool always perform a concurrent initial fetch 2020-03-28 10:30:36 +01:00
Gwendal Roué ff104686f6 Read-only observation: support for cancellation 2020-03-28 07:45:55 +01:00
Gwendal Roué a9ea6dd8bf CHANGELOG 2020-03-27 21:06:13 +01:00
Gwendal Roué 9866ed1dfc Remove useless change 2020-03-27 21:04:23 +01:00
Gwendal Roué 65a347fd98 Fix obsolete comment 2020-03-27 21:03:01 +01:00
Gwendal Roué 7e50869d39 Remove useless change 2020-03-27 21:01:34 +01:00
Gwendal Roué 703ce643b5 Remove useless change 2020-03-27 20:59:38 +01:00
Gwendal Roué 42d2891df8 Fix typo 2020-03-27 20:53:16 +01:00
Gwendal Roué f0effaa4fa Fix typo 2020-03-27 20:51:42 +01:00
Gwendal Roué 022fee8788 Remove dead code 2020-03-27 20:48:12 +01:00
Gwendal Roué 25a2bd653c Fix compiler warning 2020-03-27 20:48:03 +01:00
Gwendal Roué c03de9cc16 Fix documentation 2020-03-27 20:45:24 +01:00
Gwendal Roué 97d06a0fae Fix typo 2020-03-27 20:36:29 +01:00
Gwendal Roué 154125d3ae Update documentation 2020-03-27 20:19:55 +01:00
Gwendal Roué c4b7e0017b The main thread is enough 2020-03-27 20:19:44 +01:00
Gwendal Roué 469814985e Decrease nesting 2020-03-27 19:55:36 +01:00
Gwendal Roué f16105ad03 Add missing cancellation checks 2020-03-27 19:53:01 +01:00
Gwendal Roué 4309eaba64 Scheduling of fresh values is no longer an attribute of ValueObservation 2020-03-27 19:49:11 +01:00
Gwendal Roué 1580be3883 Update tests 2020-03-27 08:27:46 +01:00
Gwendal Roué b4b5d9b602 Simplify ValueObservation scheduling 2020-03-27 08:27:30 +01:00
Gwendal Roué 27dd08f945 Merge pull request #738 from groue/dev/drop-ObservationFor
Remove all observationForCount/All/First methods
2020-03-25 22:53:08 +01:00
Gwendal Roué b9c4d26731 Documentation 2020-03-25 22:36:33 +01:00
Gwendal Roué 7217f696b6 More row comparison technique 2020-03-25 22:23:12 +01:00
Gwendal Roué 880f8c8bdd More row comparison technique 2020-03-25 22:21:52 +01:00
Gwendal Roué 6f7efa2b9a CHANGELOG 2020-03-25 22:08:03 +01:00
Gwendal Roué 3a11d94bee Document the row comparison technique 2020-03-25 22:07:12 +01:00
Gwendal Roué e68bd077ee Remove all observationForCount/All/First methods 2020-03-25 21:44:10 +01:00
Gwendal Roué e84e984c23 Merge pull request #737 from groue/dev/ValueObservation-recording
Force implicit database region for ValueObservation
2020-03-25 19:41:12 +01:00
Gwendal Roué 12de05dc9b ValueObservation.trackingVaryingRegion documentation 2020-03-25 19:19:22 +01:00
Gwendal Roué ea8110110c Remove obsolete documentation 2020-03-25 14:04:42 +01:00
Gwendal Roué 79d6b02a2f Cleanup 2020-03-25 13:57:49 +01:00
Gwendal Roué 1195439226 Cleanup 2020-03-25 13:53:22 +01:00
Gwendal Roué ff2629a31c Cleanup 2020-03-25 13:05:39 +01:00
Gwendal Roué 61e74f9ad4 ValueObservation.trackingVaryingRegion documentation 2020-03-25 08:48:34 +01:00
Gwendal Roué f711978145 Documentation 2020-03-25 08:25:05 +01:00
Gwendal Roué a647e200d9 Replace Never with ValueReducers.Auto 2020-03-25 08:19:47 +01:00
Gwendal Roué 294a04e9f6 Rename tracking(value:) to tracking(_:) 2020-03-25 08:11:43 +01:00
Gwendal Roué 9792edc008 Rename trackingVolatile to trackingVaryingRegion 2020-03-25 00:13:51 +01:00
Gwendal Roué 143f3d1673 CHANGELOG 2020-03-25 00:03:09 +01:00
Gwendal Roué 121f7be847 ValueObservation is now fully based on region recording
And we introduce ValueObservation.trackingVolatile
2020-03-24 23:52:05 +01:00
Gwendal Roué 4af7fda4f2 Fix outdated documentation 2020-03-24 23:49:24 +01:00
Gwendal Roué 56f332122d The observed region is always recorded 2020-03-24 22:59:07 +01:00
Gwendal Roué d494d12293 Fix typo 2020-03-24 22:59:07 +01:00
Gwendal Roué ce6afd680d Merge pull request #736 from groue/dev/relax-ValueObservation
Relax ValueObservation Guarantees
2020-03-24 22:56:16 +01:00
Gwendal Roué dfd5dd2478 Add missing import for SPM 2020-03-24 22:55:18 +01:00
Gwendal Roué 327f07422f Add missing FailableTestCase.swift to custom SQLite tests 2020-03-24 22:35:32 +01:00
Gwendal Roué 6b33e656be CHANGELOG 2020-03-24 17:01:14 +01:00
Gwendal Roué 97a7117564 Rewrite ValueObservation documentation 2020-03-24 16:58:59 +01:00
Gwendal Roué e8fefc82a1 Drop obsolete warning against DatabaseRegionObservation 2020-03-24 16:29:56 +01:00
Gwendal Roué 0963b162e7 Rewrite ValueObservation documentation 2020-03-24 14:57:23 +01:00
Gwendal Roué 5210ae8385 Rewrite ValueObservation documentation 2020-03-24 14:36:29 +01:00
Gwendal Roué 78dc7aee15 Rewrite ValueObservation documentation 2020-03-24 14:35:43 +01:00
Gwendal Roué cf1360701c Rewrite ValueObservation documentation 2020-03-24 14:09:45 +01:00
Gwendal Roué b3fb61858a Rewrite ValueObservation documentation 2020-03-24 13:52:43 +01:00
Gwendal Roué 8d6708a12e Rewrite ValueObservation documentation 2020-03-24 13:49:09 +01:00
Gwendal Roué 06f6b31368 Rewrite ValueObservation documentation 2020-03-24 13:04:25 +01:00
Gwendal Roué 9562e8eac4 Rewrite ValueObservation documentation 2020-03-24 13:01:58 +01:00
Gwendal Roué 1325a3a6a2 Rewrite ValueObservation documentation 2020-03-24 11:47:55 +01:00
Gwendal Roué 89058f4447 Rewrite ValueObservation documentation 2020-03-24 11:39:21 +01:00
Gwendal Roué f6da862145 Rewrite ValueObservation documentation 2020-03-24 08:54:46 +01:00
Gwendal Roué 0c464def7f Fix documentation 2020-03-23 18:00:45 +01:00
Gwendal Roué e824c70e7d Fix SQLCipher tests 2020-03-22 13:46:34 +01:00
Gwendal Roué 7a583e02e8 Refactor ValueObservation tests around a common pattern 2020-03-22 13:31:05 +01:00
Gwendal Roué 98d381ed67 Cleanup 2020-03-22 10:27:10 +01:00
Gwendal Roué e16d29f277 More test refactoring with assertValueObservationRecordingMatch 2020-03-21 18:44:02 +01:00
Gwendal Roué 6bf322f79e More test refactoring with assertValueObservationRecordingMatch 2020-03-21 18:16:35 +01:00
Gwendal Roué c42aab26e3 Remove redundant test 2020-03-21 17:48:24 +01:00
Gwendal Roué e16b320cda More test refactoring with assertValueObservationRecordingMatch 2020-03-21 17:42:22 +01:00
Gwendal Roué 9d4bef1c9a More test refactoring with assertValueObservationRecordingMatch 2020-03-21 17:04:18 +01:00
Gwendal Roué b392458c1c More test refactoring with assertValueObservationRecordingMatch 2020-03-21 16:23:41 +01:00
Gwendal Roué 031b55eca6 More test refactoring with assertValueObservationRecordingMatch 2020-03-21 15:50:36 +01:00
Gwendal Roué 3e0486743b More test refactoring with assertValueObservationRecordingMatch 2020-03-21 15:21:24 +01:00
Gwendal Roué 7ab9a8b29a More test refactoring with assertValueObservationRecordingMatch 2020-03-21 14:36:48 +01:00
Gwendal Roué 22086c088f More test refactoring with assertValueObservationRecordingMatch 2020-03-21 14:36:48 +01:00
Gwendal Roué 3ee231afd3 Cleanup _OptionalProtocol 2020-03-21 14:36:48 +01:00
Gwendal Roué 4ffced0b7b assertValueObservationRecordingMatch 2020-03-21 14:36:48 +01:00
Gwendal Roué ed6673f2f5 ValueObservation test refactoring WIP 2020-03-21 14:36:48 +01:00
Gwendal Roué 7935168379 ValueObservation test refactoring WIP 2020-03-21 14:36:48 +01:00
Gwendal Roué 3c891b7ebd ValueObservationRecorder cleanup 2020-03-21 14:36:48 +01:00
Gwendal Roué 8f5c7985e5 ValueObservationRecorder 2020-03-21 14:36:48 +01:00
Gwendal Roué 2150b6688a Fix ValueObserver cancellation 2020-03-21 14:36:48 +01:00
Gwendal Roué 65b8fbb361 Remove useless print() statements 2020-03-21 14:36:48 +01:00
Gwendal Roué 2bb894108c Use the prependingConcurrentFetch flag 2020-03-21 14:36:48 +01:00
Gwendal Roué 26d2245ae8 Asynchronouslu remove observer when it is cancelled 2020-03-21 14:36:48 +01:00
Gwendal Roué 2b78a646ed Mor preparation for initiial concurrent fetch of ValueObservation in a DatabasePool 2020-03-21 14:36:48 +01:00
Gwendal Roué 1c59278115 Prefer dbResult argument name for async read closures 2020-03-21 14:36:48 +01:00
Gwendal Roué 2824636650 Prepare for initiial concurrent fetch of ValueObservation in a DatabasePool 2020-03-21 14:36:48 +01:00
Gwendal Roué 5a884ad93d Common ValueObservation code for all read-only database accessors 2020-03-21 14:36:48 +01:00
Gwendal Roué dab8e28f6d Merge branch 'master' into GRDB5
# Conflicts:
#	GRDB/Migration/DatabaseMigrator.swift
#	GRDB/QueryInterface/Request/QueryInterfaceRequest.swift
#	README.md
2020-03-21 14:35:57 +01:00
Gwendal Roué c6db8962b3 Merge pull request #732 from groue/dev/ValueObservation-mandatory-first-element
Remove ValueObservation.compactMap
2020-03-12 08:37:16 +01:00
Gwendal Roué 5a9085c34d CHANGELOG 2020-03-12 07:46:04 +01:00
Gwendal Roué c698b30c0a Add fixits 2020-03-12 07:43:57 +01:00
Gwendal Roué dfa40ea18f Rename ValueObservation.fetchFirst to fetchValue
"First", in Swift, hints that the result is optional. But the result of this function is no longer optional.
2020-03-12 07:34:43 +01:00
Gwendal Roué 936c92eba6 All value reducers must emit an initial value
This disqualifies compactMap as a valid ValueObservation transformation: it has been removed.

This simplifies implementation as well.
2020-03-12 07:18:40 +01:00
Gwendal Roué b0155b8aca Merge branch 'development' into GRDB5 2020-03-11 22:44:20 +01:00
Gwendal Roué 46fba47efb Merge pull request #731 from groue/dev/private-ValueReducer
Hide ValueObservation implementation details
2020-03-11 22:43:10 +01:00
Gwendal Roué bf3f97b64d Fix compiler warning 2020-03-11 22:42:48 +01:00
Gwendal Roué b605076bd0 Remove value reducers from README 2020-03-11 22:15:04 +01:00
Gwendal Roué 329b034423 CHANGELOG 2020-03-11 22:13:51 +01:00
Gwendal Roué 5e0535d511 ValueReducer creation does not need database access 2020-03-11 22:00:07 +01:00
Gwendal Roué b96d71d937 Remove public ValueObservation factory methods that accept a _ValueReducer 2020-03-11 21:38:48 +01:00
Gwendal Roué 28c32c6af8 _ValueReducer is the only protocol accepted by ValueObservation
Also, we now use Never as the bottom reducer which helps us define the ValueObservation factory methods.
2020-03-11 21:38:41 +01:00
Gwendal Roué f80c5ce348 Make the ValueReducer protocol unavailable
# Conflicts:
#	GRDB/ValueObservation/ValueReducer/ValueReducer.swift
2020-03-11 21:38:20 +01:00
Gwendal Roué cc16a00f5a Merge pull request #729 from groue/dev/ValueObservation-initial-value
ValueObservation always emits an initial value
2020-03-10 23:03:39 +01:00
Gwendal Roué 4f74997235 Restore old disabled tests for cancelled ValueObservation 2020-03-10 22:06:41 +01:00
Gwendal Roué 2f4187b084 DatabaseWriter.remove(transactionObserver:) can run from the writer queue 2020-03-10 22:06:08 +01:00
Gwendal Roué 9a6d6cf9c0 Update documentation for ValueObservation scheduling 2020-03-10 22:04:58 +01:00
Gwendal Roué 26e2db02aa CHANGELOG 2020-03-10 21:04:38 +01:00
Gwendal Roué d66f2c8cfd Simplify ValueObservation starting process 2020-03-10 20:50:06 +01:00
Gwendal Roué 6f239a5ad3 All ValueObservationScheduling cases now trigger an initial fetch 2020-03-10 19:42:58 +01:00
Gwendal Roué 2224042114 Rename ValueScheduling to ValueObservationScheduling 2020-03-10 19:10:38 +01:00
Gwendal Roué 4fe201f8aa Merge branch 'development' into GRDB5 2020-03-10 19:05:29 +01:00
Gwendal Roué e48b654ad6 Merge pull request #728 from groue/dev/ValueObservation-error-handling
Make ValueObservation error handling mandatory
2020-03-10 08:26:09 +01:00
Gwendal Roué 3467376d7a Remove unused ErrorCatcher 2020-03-10 08:19:27 +01:00
Gwendal Roué 1b6f9f9971 CHANGELOG 2020-03-10 08:12:17 +01:00
Gwendal Roué c70b627f92 ValueObservation.start(in:onChange:) is unavailable
Hiding errors from user's sight was not a good idea
2020-03-10 08:09:53 +01:00
Gwendal Roué 0b34ad55b6 Merge pull request #724 from groue/dev/SE-0242
SE-0242: Synthesize default values for the memberwise initializer
2020-03-09 09:02:03 +01:00
Gwendal Roué 262cdc5b9a CHANGELOG 2020-03-09 08:50:43 +01:00
Gwendal Roué 19061934ce SE-0242: Synthesize default values for the memberwise initializer
...and more initializers cleanup
2020-03-09 08:49:06 +01:00
Gwendal Roué 7614f36bbd Merge pull request #723 from groue/dev/SE-0255
SE-0255: Implicit returns from single-expression functions
2020-03-09 08:17:24 +01:00
Gwendal Roué f48180549d make smokeTest
For "quick" sanity checks
2020-03-09 08:03:26 +01:00
Gwendal Roué 93aa9bf3e5 Comment out debugging configuration 2020-03-09 07:56:02 +01:00
Gwendal Roué 4d60dc6cbb Remove more redundant return keywords 2020-03-09 07:52:35 +01:00
Gwendal Roué 1698afadb9 CHANGELOG 2020-03-09 07:33:30 +01:00
Gwendal Roué 9aa67f9db9 SE-0255: Implicit returns from single-expression functions 2020-03-08 23:12:46 +01:00
Gwendal Roué 57d12e6c47 Merge pull request #722 from groue/dev/SE-0253
SE-0253: Callable values of user-defined nominal types
2020-03-08 20:40:17 +01:00
Gwendal Roué cc9fbed07e CHANGELOG 2020-03-08 20:39:54 +01:00
Gwendal Roué 8718d525d4 SE-0253: Callable values of user-defined nominal types 2020-03-08 20:36:49 +01:00
Gwendal Roué 3beba2b578 Merge pull request #721 from groue/dev/SE-0249
SE-0249: Key Path Expressions as Functions
2020-03-08 20:10:27 +01:00
Gwendal Roué 1b08a822ee CHANGELOG 2020-03-08 20:09:15 +01:00
Gwendal Roué 7865b0a2ee SE-0249: Key Path Expressions as Functions 2020-03-08 19:58:51 +01:00
Gwendal Roué a31984724e Merge pull request #720 from groue/dev/GRDB5-removeDeprecated
Turn deprecated APIs into unavailable ones
2020-03-08 19:15:41 +01:00
Gwendal Roué a504452846 CHANGELOG 2020-03-08 19:10:48 +01:00
Gwendal Roué 00b0dc2a04 Remove availability checks for macOS 10.10 (forgotten in #719) 2020-03-08 19:08:15 +01:00
Gwendal Roué 41e0885bce Fix deprecation warning 2020-03-08 18:10:02 +01:00
Gwendal Roué 694adcec64 Remove other deprecated methods 2020-03-08 18:03:11 +01:00
Gwendal Roué 5dd86d2453 Remove deprecated ValueObservation methods 2020-03-08 17:53:39 +01:00
Gwendal Roué b9d4a5215a Remove deprecated DatabaseMigrator methods 2020-03-08 17:13:31 +01:00
Gwendal Roué 456d2aee75 Remove deprecated SQLExpressionLiteral 2020-03-08 16:57:29 +01:00
Gwendal Roué 02890a6d3a Remove deprecated SQLLiteral.mapSQL(_:) 2020-03-08 16:28:44 +01:00
Gwendal Roué 0f503fe0db Remove deprecated FetchRequest.prepare(_: forSingleResult:) 2020-03-08 16:18:55 +01:00
Gwendal Roué bfdd0696da Remove deprecated setupMemoryManagement methods 2020-03-08 16:08:12 +01:00
Gwendal Roué 130e510f8c Remove deprecated passphrase methods 2020-03-08 16:00:19 +01:00
Gwendal Roué 512764403f Prepare for fixits for removed deprecated methods 2020-03-08 15:39:40 +01:00
Gwendal Roué b85eca3260 Merge pull request #719 from groue/dev/swift5.2
Bump required Swift version to 5.2
2020-03-08 14:59:53 +01:00
Gwendal Roué 73975e4462 CHANGELOG 2020-03-08 14:53:35 +01:00
Gwendal Roué 816887b811 Fix typo in README 2020-03-08 14:53:27 +01:00
Gwendal Roué 20baaf9a7f Update README for the new requirements 2020-03-08 13:54:00 +01:00
Gwendal Roué 9578f984ec Remove useless #if compiler/swift checks 2020-03-08 13:42:44 +01:00
Gwendal Roué 3b7f232aef WIP 2020-03-08 13:01:15 +01:00
Gwendal Roué df1ed3cf2f Apply requirements to .travis.yml
osx_image xcode11.4 is not yet shipped, according to https://docs.travis-ci.com/user/reference/osx/#xcode-version
2020-03-08 12:59:33 +01:00
Gwendal Roué 59eceb9af1 Apply requirements to Makefile 2020-03-08 12:57:09 +01:00
Gwendal Roué d7e821785d Fix podfiles of CocoaPods tests 2020-03-08 12:35:59 +01:00
Gwendal Roué b264087a3b Fixes for GRDBDemoWatchOS
Hide WKRefreshBackgroundTask use behind an availability check

Bump IPHONEOS_DEPLOYMENT_TARGET = 13.0, so that we can use CollectionDifference
2020-03-08 12:22:09 +01:00
Gwendal Roué 759bb8cd25 Fix dependencies of GRDBtvOSTests
It used to depend on the iOS version of GRDB - WTF
2020-03-08 11:28:04 +01:00
Gwendal Roué 4486f73432 Apply requirements to podspec and podfiles 2020-03-08 10:55:48 +01:00
Gwendal Roué 224e0b7d58 Apply requirements to Xcode projects
Update:
SWIFT_VERSION
IPHONEOS_DEPLOYMENT_TARGET
MACOSX_DEPLOYMENT_TARGET
TVOS_DEPLOYMENT_TARGET
WATCHOS_DEPLOYMENT_TARGET
2020-03-08 10:55:26 +01:00
Gwendal Roué 9db86ff2d6 Apply Swift version requirement to Tests/SPM/PlainPackage 2020-03-08 10:45:40 +01:00
Gwendal Roué f3af89cb6a Apply requirements to Package.swift 2020-03-08 10:26:01 +01:00
Gwendal Roué 98e9cc7861 Bump required macOS version to 10.10
This guarantees SQLite 3.7.16+, so that all migrations can recreate tables when needed
2020-03-08 10:24:27 +01:00
Gwendal Roué 30f7b39a42 Update requirements for Swift 5.2 2020-03-08 09:54:13 +01:00
Gwendal Roué 6b9e7e7eb3 Kick off GRDB5 2020-03-08 09:50:08 +01:00
856 changed files with 154784 additions and 73013 deletions

No files matched your search

-5
View File
@@ -1,5 +0,0 @@
source 'https://rubygems.org'
gem 'xcpretty'
gem 'xcpretty-travis-formatter'
gem 'cocoapods', '~> 1.7'
+8
View File
@@ -0,0 +1,8 @@
[*.swift]
indent_style = space
indent_size = 4
tab_width = 4
end_of_line = lf
insert_final_newline = true
max_line_length = 76
trim_trailing_whitespace = true
+7 -5
View File
@@ -3,10 +3,12 @@
### Pull Request Checklist
<!--
Please verify that your pull request checks those boxes:
Please check the boxes that apply to your pull request:
-->
- [ ] This pull request is submitted against the `development` branch.
- [ ] Inline documentation has been updated.
- [ ] README.md or another dedicated guide has been updated.
- [ ] Changes are tested.
- [ ] CONTRIBUTING: You have read https://github.com/groue/GRDB.swift/blob/master/CONTRIBUTING.md
- [ ] BRANCH: This pull request is submitted against the `development` branch.
- [ ] DOCUMENTATION: Inline documentation has been updated.
- [ ] DOCUMENTATION: README.md or another dedicated guide has been updated.
- [ ] TESTS: Changes are tested.
- [ ] TESTS: The `make smokeTest` terminal command runs without failure.
+6
View File
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
+144
View File
@@ -0,0 +1,144 @@
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
name: "GRDB CI"
on:
push:
branches:
- master
- development
paths:
- 'GRDB/**'
- 'Tests/**'
- '.github/workflows/**'
- 'Makefile'
- 'Package.swift'
- 'SQLiteCustom/src'
pull_request:
paths:
- 'GRDB/**'
- 'Tests/**'
- '.github/workflows/**'
- 'Makefile'
- 'Package.swift'
- 'SQLiteCustom/src'
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true
permissions:
contents: read
jobs:
Framework:
name: Framework
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- xcode: "Xcode_16.4.app"
runsOn: macOS-15
destination: "platform=macOS"
name: "macOS"
- xcode: "Xcode_16.4.app"
runsOn: macOS-15
destination: "OS=18.5,name=iPhone 16 Pro"
name: "iOS"
- xcode: "Xcode_16.4.app"
runsOn: macOS-15
destination: "OS=18.5,name=Apple TV"
name: "tvOS"
steps:
- uses: actions/checkout@v5
- name: ${{ matrix.name }}
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project GRDB.xcodeproj -scheme GRDB -destination "${{ matrix.destination }}" OTHER_SWIFT_FLAGS='$(inherited) -D SQLITE_ENABLE_FTS5 -D SQLITE_ENABLE_PREUPDATE_HOOK' GCC_PREPROCESSOR_DEFINITIONS='$(inherited) GRDB_SQLITE_ENABLE_PREUPDATE_HOOK=1' clean test
SPM:
name: SPM
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- xcode: "Xcode_16.4.app"
runsOn: macOS-15
name: "Xcode 16.4"
steps:
- uses: actions/checkout@v5
- name: ${{ matrix.name }}
run: make test_SPM test_install_SPM
SQLCipher3:
name: SQLCipher3
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- xcode: "Xcode_16.4.app"
runsOn: macOS-15
name: "Xcode 16.4"
steps:
- uses: actions/checkout@v5
- name: ${{ matrix.name }}
run: make test_framework_SQLCipher3Encrypted
SQLCipher4:
name: SQLCipher4
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- xcode: "Xcode_16.4.app"
runsOn: macOS-15
name: "Xcode 16.4"
steps:
- uses: actions/checkout@v5
- name: ${{ matrix.name }}
run: make test_framework_SQLCipher4Encrypted
# CustomSQLite:
# name: CustomSQLite
# runs-on: ${{ matrix.runsOn }}
# env:
# DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
# timeout-minutes: 60
# strategy:
# fail-fast: false
# matrix:
# include:
# - xcode: "Xcode_16.4.app"
# runsOn: macOS-15
# name: "Xcode 16.4"
# steps:
# - uses: actions/checkout@v5
# - name: ${{ matrix.name }}
# run: make test_framework_GRDBCustomSQLiteOSX
XCFramework:
name: XCFramework
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- xcode: "Xcode_16.4.app"
runsOn: macOS-15
name: "Xcode 16.4"
steps:
- uses: actions/checkout@v5
- name: ${{ matrix.name }}
run: make test_universal_xcframework
+6 -2
View File
@@ -1,4 +1,4 @@
## https://github.com/github/gitignore/blob/master/Global/OSX.gitignore
## https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
.DS_Store
.AppleDouble
@@ -106,8 +106,12 @@ Podfile.lock
# SPM
.build
Package.resolved
GRDB.xcworkspace/xcshareddata/swiftpm
#Package.resolved
Tests/SPM/Packages
# Ruby
.ruby-version
# Test products
Tests/products
-9
View File
@@ -1,12 +1,3 @@
[submodule "Tests/Performance/fmdb"]
path = Tests/Performance/fmdb
url = https://github.com/ccgus/fmdb.git
[submodule "Tests/Performance/SQLite.swift"]
path = Tests/Performance/SQLite.swift
url = https://github.com/stephencelis/SQLite.swift.git
[submodule "Tests/Performance/Realm"]
path = Tests/Performance/Realm
url = https://github.com/realm/realm-cocoa.git
[submodule "SQLiteCustom/src"]
path = SQLiteCustom/src
url = https://github.com/swiftlyfalling/SQLiteLib.git
+5
View File
@@ -0,0 +1,5 @@
version: 1
builder:
configs:
- documentation_targets: [GRDB]
swift_version: 6.1
+74 -353
View File
@@ -26,415 +26,136 @@ git:
jobs:
include:
###########################################
## Test GRDB Xcode 11
## Test GRDB Xcode 11.4
- stage: Test GRDB Xcode 11
- name: "Test GRDB Xcode 11.4 - GRDBiOS iOS maxTarget"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=GRDBOSX (Swift 5.1, macOS)
script: make test_framework_GRDBOSX_maxSwift
- stage: Test GRDB Xcode 11
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=GRDBOSX (Swift 4.2, macOS)
script: make test_framework_GRDBOSX_minSwift
- stage: Test GRDB Xcode 11
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=GRDBWatchOS (watchOS)
script: make test_framework_GRDBWatchOS
- stage: Test GRDB Xcode 11
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=GRDBiOS (Swift 5.1, iOS <MAX>)
osx_image: xcode11.4
script: make test_framework_GRDBiOS_maxTarget_maxSwift
- stage: Test GRDB Xcode 11
- name: "Test GRDB Xcode 11.4 - GRDBiOS iOS minTarget"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=GRDBiOS (Swift 4.2, iOS <MAX>)
script: make test_framework_GRDBiOS_maxTarget_minSwift
osx_image: xcode11.4
script: make test_framework_GRDBiOS_minTarget
###########################################
## Test GRDB Xcode 12.5
# - stage: Test GRDB Xcode 11
# gemfile: .ci/gemfiles/Gemfile.travis
# osx_image: xcode11
# env:
# - TID=GRDBiOS (Swift 5.1, iOS <MIN>)
# script: make test_framework_GRDBiOS_minTarget
- stage: Test GRDB Xcode 11
- name: "Test GRDB Xcode 12.5 - GRDBOSX - Swift 5.3"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=GRDBtvOS (Swift 5.1, tvOS <MAX>)
osx_image: xcode12.5
script: make test_framework_GRDBOSX_maxSwift
- name: "Test GRDB Xcode 12.5 - GRDBOSX - Swift 5.2"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode12.5
script: make test_framework_GRDBOSX_minSwift
- name: "Test GRDB Xcode 12.5 - GRDBWatchOS"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode12.5
script: make test_framework_GRDBWatchOS
- name: "Test GRDB Xcode 12.5 - GRDBiOS iOS maxTarget"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode12.5
script: make test_framework_GRDBiOS_maxTarget_maxSwift
- name: "Test GRDB Xcode 12.5 - GRDBiOS iOS minTarget"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode12.5
script: make test_framework_GRDBiOS_minTarget
- name: "Test GRDB Xcode 12.5 - GRDBtvOS maxTarget"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode12.5
script: make test_framework_GRDBtvOS_maxTarget_maxSwift
- stage: Test GRDB Xcode 11
- name: "Test GRDB Xcode 12.5 - GRDBtvOS minTarget"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=GRDBtvOS (Swift 4.2, tvOS <MAX>)
script: make test_framework_GRDBtvOS_maxTarget_minSwift
osx_image: xcode12.5
script: make test_framework_GRDBtvOS_minTarget
# - stage: Test GRDB Xcode 11
# gemfile: .ci/gemfiles/Gemfile.travis
# osx_image: xcode11
# env:
# - TID=GRDBtvOS (Swift 5.1, tvOS <MIN>)
# script: make test_framework_GRDBtvOS_minTarget
- stage: Test GRDB Xcode 11
- name: "Test GRDB Xcode 12.5 - SPM"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=GRDB [SPM] (macOS)
osx_image: xcode12.5
script: make test_SPM
###########################################
## Test GRDBCustom Xcode 11
## Test GRDBCustom Xcode 12.5
- stage: Test GRDBCustom Xcode 11
- name: "Test GRDBCustom Xcode 12.5 - GRDBOSX"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=GRDBOSX (Swift 5.1, macOS)
osx_image: xcode12.5
script: make test_framework_GRDBCustomSQLiteOSX
- stage: Test GRDBCustom Xcode 11
- name: "Test GRDBCustom Xcode 12.5 - GRDBiOS maxTarget"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=GRDBiOS (Swift 5.1, iOS <MAX>)
osx_image: xcode12.5
script: make test_framework_GRDBCustomSQLiteiOS_maxTarget_maxSwift
- stage: Test GRDBCustom Xcode 11
- name: "Test GRDBCustom Xcode 12.5 - GRDBiOS minTarget"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=GRDBiOS (Swift 4.2, iOS <MAX>)
script: make test_framework_GRDBCustomSQLiteiOS_maxTarget_minSwift
# - stage: Test GRDBCustom Xcode 11
# gemfile: .ci/gemfiles/Gemfile.travis
# osx_image: xcode11
# env:
# - TID=GRDBiOS (Swift 5.1, iOS <MIN>)
# script: make test_framework_GRDBCustomSQLiteiOS_minTarget
osx_image: xcode12.5
script: make test_framework_GRDBCustomSQLiteiOS_minTarget
###########################################
## Test SQLCipher Xcode 11
## Test SQLCipher Xcode 12.5
- stage: Test SQLCipher Xcode 11
- name: "Test SQLCipher Xcode 12.5 - SQLCipher 3"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=SQLCipher 3
osx_image: xcode12.5
script: make test_framework_SQLCipher3
- stage: Test SQLCipher Xcode 11
- name: "Test SQLCipher Xcode 12.5 - SQLCipher 4"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=SQLCipher 4
osx_image: xcode12.5
script: make test_framework_SQLCipher4
###########################################
## Test Installation Xcode 11
## Test Installation Xcode 12.5
# Manual Install
- stage: Test Installation Xcode 11
- name: "Test Installation Xcode 12.5 - Manual Install"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=Manual Install
osx_image: xcode12.5
script: make test_install_manual
# CocoaPods Lint
- stage: Test Installation Xcode 11
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=CocoaPods Lint
script: make test_CocoaPodsLint_GRDB
# Travis is much too slow, and always fail this job
# # CocoaPods Lint
# - name: "Test Installation Xcode 12.5 - CocoaPods Lint"
# gemfile: .ci/gemfiles/Gemfile.travis
# osx_image: xcode12.5
# script: make test_CocoaPodsLint_GRDB
# CocoaPods Install GRDB
- stage: Test Installation Xcode 11
- name: "Test Installation Xcode 12.5 - CocoaPods Framework"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=CocoaPods GRDB (framework)
osx_image: xcode12.5
script: make test_install_GRDB_CocoaPods_framework
# CocoaPods Install GRDB
- stage: Test Installation Xcode 11
- name: "Test Installation Xcode 12.5 - CocoaPods Static"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=CocoaPods GRDB (static)
osx_image: xcode12.5
script: make test_install_GRDB_CocoaPods_static
# SPM Install
- stage: Test Installation Xcode 11
- name: "Test Installation Xcode 12.5 - SPM Package"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=SPM Package
osx_image: xcode12.5
script: make test_install_SPM_Package
# SPM Install
- stage: Test Installation Xcode 11
- name: "Test Installation Xcode 12.5 - SPM Package in Xcode Project"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=SPM Package in Xcode Project
osx_image: xcode12.5
script: make test_install_SPM_Project
# Custom SQLite Install
- stage: Test Installation Xcode 11
- name: "Test Installation Xcode 12.5 - Custom SQLite"
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11
env:
- TID=Custom SQLite
script: make test_install_customSQLite
###########################################
## Test GRDB Xcode 10.3
- stage: Test GRDB Xcode 10.3
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.3
env:
- TID=GRDBOSX (Swift 5, macOS)
script: make test_framework_GRDBOSX_maxSwift
- stage: Test GRDB Xcode 10.3
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.3
env:
- TID=GRDBWatchOS (watchOS)
script: make test_framework_GRDBWatchOS
- stage: Test GRDB Xcode 10.3
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.3
env:
- TID=GRDBiOS (Swift 5, iOS <MAX>)
script: make test_framework_GRDBiOS_maxTarget_maxSwift
- stage: Test GRDB Xcode 10.3
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.3
env:
- TID=GRDBiOS (Swift 5, iOS <MIN>)
script: make test_framework_GRDBiOS_minTarget
- stage: Test GRDB Xcode 10.3
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.3
env:
- TID=GRDBtvOS (Swift 5, tvOS <MAX>)
script: make test_framework_GRDBtvOS_maxTarget_maxSwift
- stage: Test GRDB Xcode 10.3
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.3
env:
- TID=GRDBtvOS (Swift 5, tvOS <MIN>)
script: make test_framework_GRDBtvOS_minTarget
- stage: Test GRDB Xcode 10.3
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.3
env:
- TID=GRDB [SPM] (macOS)
script: make test_SPM
###########################################
## Test GRDB Xcode 10.2
- stage: Test GRDB Xcode 10.2
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.2
env:
- TID=GRDBOSX (Swift 5, macOS)
script: make test_framework_GRDBOSX_maxSwift
- stage: Test GRDB Xcode 10.2
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.2
env:
- TID=GRDBWatchOS (watchOS)
script: make test_framework_GRDBWatchOS
- stage: Test GRDB Xcode 10.2
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.2
env:
- TID=GRDBiOS (Swift 5, iOS <MAX>)
script: make test_framework_GRDBiOS_maxTarget_maxSwift
- stage: Test GRDB Xcode 10.2
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.2
env:
- TID=GRDBiOS (Swift 5, iOS <MIN>)
script: make test_framework_GRDBiOS_minTarget
- stage: Test GRDB Xcode 10.2
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.2
env:
- TID=GRDBtvOS (Swift 5, tvOS <MAX>)
script: make test_framework_GRDBtvOS_maxTarget_maxSwift
- stage: Test GRDB Xcode 10.2
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.2
env:
- TID=GRDBtvOS (Swift 5, tvOS <MIN>)
script: make test_framework_GRDBtvOS_minTarget
- stage: Test GRDB Xcode 10.2
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.2
env:
- TID=GRDB [SPM] (macOS)
script: make test_SPM
###########################################
## Test GRDB Xcode 10.1
- stage: Test GRDB Xcode 10.1
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.1
env:
- TID=GRDBOSX (Swift 4.2, macOS)
script: make test_framework_GRDBOSX_maxSwift
- stage: Test GRDB Xcode 10.1
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.1
env:
- TID=GRDBWatchOS (watchOS)
script: make test_framework_GRDBWatchOS
- stage: Test GRDB Xcode 10.1
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.1
env:
- TID=GRDBiOS (Swift 4.2, iOS <MAX>)
script: make test_framework_GRDBiOS_maxTarget_maxSwift
- stage: Test GRDB Xcode 10.1
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.1
env:
- TID=GRDBiOS (Swift 4.2, iOS <MIN>)
script: make test_framework_GRDBiOS_minTarget
- stage: Test GRDB Xcode 10.1
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.1
env:
- TID=GRDBtvOS (Swift 4.2, tvOS <MAX>)
script: make test_framework_GRDBtvOS_maxTarget_maxSwift
- stage: Test GRDB Xcode 10.1
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.1
env:
- TID=GRDBtvOS (Swift 4.2, tvOS <MIN>)
script: make test_framework_GRDBtvOS_minTarget
- stage: Test GRDB Xcode 10.1
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.1
env:
- TID=GRDB [SPM] (macOS)
script: make test_SPM
###########################################
## Test GRDB Xcode 10
- stage: Test GRDB Xcode 10
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10
env:
- TID=GRDBOSX (Swift 4.2, macOS)
script: make test_framework_GRDBOSX_maxSwift
- stage: Test GRDB Xcode 10
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10
env:
- TID=GRDBWatchOS (watchOS)
script: make test_framework_GRDBWatchOS
- stage: Test GRDB Xcode 10
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10
env:
- TID=GRDBiOS (Swift 4.2, iOS <MAX>)
script: make test_framework_GRDBiOS_maxTarget_maxSwift
- stage: Test GRDB Xcode 10
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10
env:
- TID=GRDBiOS (Swift 4.2, iOS <MIN>)
script: make test_framework_GRDBiOS_minTarget
- stage: Test GRDB Xcode 10
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10
env:
- TID=GRDBtvOS (Swift 4.2, tvOS <MAX>)
script: make test_framework_GRDBtvOS_maxTarget_maxSwift
- stage: Test GRDB Xcode 10
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10
env:
- TID=GRDBtvOS (Swift 4.2, tvOS <MIN>)
script: make test_framework_GRDBtvOS_minTarget
- stage: Test GRDB Xcode 10
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10
env:
- TID=GRDB [SPM] (macOS)
script: make test_SPM
# CocoaPods Install GRDB
- stage: Test Installation Xcode 10
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10
env:
- TID=CocoaPods GRDB (framework)
script: make test_install_GRDB_CocoaPods_framework
# CocoaPods Install GRDB
- stage: Test Installation Xcode 10
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10
env:
- TID=CocoaPods GRDB (static)
script: make test_install_GRDB_CocoaPods_static
# Custom SQLite Install
- stage: Test Installation Xcode 10
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10
env:
- TID=Custom SQLite
osx_image: xcode12.5
script: make test_install_customSQLite
+7
View File
@@ -0,0 +1,7 @@
{
"editor.formatOnSave": false,
"editor.insertSpaces": true,
"editor.tabSize": 4,
"editor.detectIndentation": false,
"editor.trimAutoWhitespace": false
}
+76
View File
@@ -4,6 +4,82 @@ Here is a list of people who were happy to meet GRDB :-)
---
https://twitter.com/DamienPetrilli/status/1623922310976786433
> I can't overstate how much more productive I am since I ditched the obsolete Core Data framework and started to use GRDB instead.
>
> The hard stuff is doable, and the simple stuff is even simpler, as it should be.
---
https://twitter.com/fullqueuedev/status/1603350969357684736
> Yes, I much prefer GRDB. I’ve tested many SQLite wrappers over the years 💜
---
https://twitter.com/cassiuspacheco/status/1574948903857770497
> SQLite using @groue’s GRDB, no brainer! Awesome documentation, support and beautifully designed.
---
https://twitter.com/simrandotdev/status/1552004471122587649
> We get Core Data from Apple which is the worst library to deal with.
> Then there is Realm which is nice but again you do not get the RAW SQL power as it is its own type of Db.
> Then comes the most beautiful library every written which is very close to Room called GRDB.
---
https://twitter.com/bellebcooper/status/1534070340850094080
> When I first started using GRDB I didn't know SQL or much at all about databases 😬 So I've always really liked the query API. But these days I really appreciate that you support raw SQL too, because it gives me more control and freedom when I need it. 👍👍👍
---
https://twitter.com/mikeash/status/1504810545429499909
> Another cool library using SQL interpolation!
---
https://twitter.com/swiftkarim/status/1354753451377483781
> I cannot recommend GRDB enough. It works well with Swift and eliminates whole classes of potential programming errors that can be made with Core Data. Also being able to use raw SQL queries if needed can be extremely useful!
---
https://twitter.com/peres/status/1352219836508729346
> Just the occasional reminder that GRDB and its documentation is the gold standard. That's it.
---
https://twitter.com/steipete/status/1275305583718129664
> This is the future of Core Data
---
https://twitter.com/_maxheld/status/1266509824994553860
> I tried out GRDB since I saw you mention it a few days ago and absolutely love it. It’s so nice and testing the database logic is so much nicer than CoreData
---
https://twitter.com/stephencelis/status/1263518304980918274
> GRDB.swift is great! (I say this as the person that started SQLite.swift long ago.) And @groue’s very helpful and friendly.
---
https://twitter.com/peres/status/1262682199482142720
> GRDB in already in my top3 when it comes to documentation. Clearly and pragmatically explained.
---
https://twitter.com/layoutsubviews/status/1249940744929816582
> Mixing SQLite / GRDB with Combine is my whole world right now, and it is delightful.
+1479 -52
View File
File diff suppressed because it is too large. Load diff
+99 -339
View File
@@ -1,339 +1,99 @@
Contributing to GRDB
====================
**Thank you for coming!**
This guide is a set of tips and guidelines for contributing to the GitHub repository [groue/GRDB.swift](https://github.com/groue/GRDB.swift).
- [Report Bugs]
- [Ask Questions]
- [Suggest an Enhancement]
- [Submit a Pull Request]
- [Sponsoring and Professional Support]
- [Suggested Contributions]
- [Non-Goals]
### Report Bugs
Please make sure the bug is not already reported by searching existing [issues](https://github.com/groue/GRDB.swift/issues).
If you're unable to find an existing issue addressing the problem, [open a new one](https://github.com/groue/GRDB.swift/issues/new). Be sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.
### Ask Questions
The information you are looking for is maybe already available. Check out:
- the [FAQ](README.md#faq)
- the [general documentation](README.md#documentation)
- the [answered questions](https://github.com/groue/GRDB.swift/issues?utf8=✓&q=label%3Aquestion+)
If not, your questions are welcome in the [GRDB forums](https://forums.swift.org/c/related-projects/grdb), or in a new [GitHub issue](https://github.com/groue/GRDB.swift/issues/new).
### Suggest an Enhancement
Your idea may already be listed in [Suggested Contributions], waiting for someone to pick it up.
If not, contact [@groue](http://twitter.com/groue) on Twitter, or [open a new issue](https://github.com/groue/GRDB.swift/issues/new).
### Submit a Pull Request
Discuss your idea first, so that your changes have a good chance of being merged in.
Submit your pull request against the `development` branch.
Pull requests that include tests for modified and new functionalities, inline documentation, and relevant updates to the main README.md are merged faster, because you won't have to wait for somebody else to complete your contribution.
### Sponsoring and Professional Support
GRDB is free. It is openly developed by its contributors, on their free time, according to their will, needs, and availability. It is not controlled by any company.
When you have specific development or support needs, and are willing to financially contribute to GRDB, please send an email to [Gwendal Roué](mailto:gr@pierlis.com) so that we can enter a regular business relationship through the [Pierlis](http://pierlis.com/) company, based in Paris, France.
## Suggested Contributions
You'll find below various ideas for enhancing and extending GRDB, in various areas. Your ideas can be added to this list: [Suggest an Enhancement].
Legend:
- :baby: **Starter Task**: get familiar with GRDB internals
- :muscle: **Hard**: there are implementation challenges
- :pencil: **Documentation**
- :fire: **Experimental**: let's invent the future!
- :bowtie: **Public API Challenge**: we'll need a very good public API
- :hammer: **Tooling**: GRDB and its environment
- :question: **Unknown Difficulty**
The ideas, in alphabetical order:
- [Associations]
- [CloudKit]
- [Concurrency]
- [Custom FTS5 Auxiliary Functions]
- [Date and Time Functions]
- [Decode NSDecimalNumber from Text Columns]
- [Documentation]
- [Full Text Search Demo Application]
- [JSON]
- [Linux]
- [More SQL Generation]
- [Reactive Database Observation]
- [SQL Console in the Debugger]
- [SQLCipher in a Shared App Container]
- [Typed Expressions]
### Associations
:bowtie: Public API Challenge :muscle: Hard :fire: Experimental
Associations can be enhanced in several ways. See the "Known Issues" chapter of the [Associations Guide](Documentation/AssociationsBasics.md)
### CloudKit
:bowtie: Public API Challenge :question: Unknown Difficulty :fire: Experimental
Integration with [CloudKit](https://developer.apple.com/icloud/cloudkit/) is a rich, interesting, and useful topic.
It is likely that CloudKit support would exist in a separate companion library.
Starting points:
- [caiyue1993/IceCream](https://github.com/caiyue1993/IceCream)
- [mentrena/SyncKit](https://github.com/mentrena/SyncKit)
- [nofelmahmood/Seam](https://github.com/nofelmahmood/Seam)
- [Sorix/CloudCore](https://github.com/Sorix/CloudCore)
- [Synchronizing data with CloudKit](https://medium.com/@guilhermerambo/synchronizing-data-with-cloudkit-94c6246a3fda)
- WWDC CloudKit sessions, including [CloudKit Best Practices](https://developer.apple.com/videos/play/wwdc2016/231/)
### Concurrency
:bowtie: Public API Challenge :muscle: Hard :pencil: Documentation
GRDB has a strong focus on safe concurrency. Not only safe as "does not crash", but safe as "actively protects your application data". The topic is discussed in (too) many places:
- [Concurrency Guide](README.md#concurrency)
- [Why Adopt GRDB?](https://github.com/groue/GRDB.swift/blob/master/Documentation/WhyAdoptGRDB.md#strong-and-clear-multi-threading-guarantees)
- [Four different ways to handle SQLite concurrency](https://medium.com/@gwendal.roue/four-different-ways-to-handle-sqlite-concurrency-db3bcc74d00e)
- [Good Practices for Designing Record Types](https://github.com/groue/GRDB.swift/blob/master/Documentation/GoodPracticesForDesigningRecordTypes.md#fetch-in-time)
- [Comparison between GRDB and Core Data concurrency](https://github.com/groue/GRDB.swift/issues/405)
Despite this abundant documention, I regularly meet developers who don't think about eventual multi-threading gotchas, and don't design their application against them.
This can be explained:
- Some developers disregard potential multi-threading bugs such as data races, even if the fix is "easy". Such bugs may never happen during the development of an application. They may only impact a few users in production. It is always easier not to think about them.
- Databases are often seen as plain CRUD tools, and some developers are not familiar with topics like isolation or transactions. This is especially true for developers who have experience in a managed ORM such as Core Data or Realm, or web frameworks like Rails or Django: switching to an unmanaged relational database is not an easy task.
- Not all applications need to be multi-threaded.
And this creates improvement opportunities:
- Better documentation of GRDB concurrency
- The introduction of an "ultra-safe" concurrency mode. Maybe something that restricts all database accesses to the main thread, like [FCModel](https://github.com/marcoarment/FCModel). Maybe in a separate companion library.
### Custom FTS5 Auxiliary Functions
:question: Unknown Difficulty
The SQLite documentation provides [this description](https://www.sqlite.org/fts5.html) of FTS5 auxiliary functions:
> An application may use FTS5 auxiliary functions to retrieve extra information regarding the matched row. For example, an auxiliary function may be used to retrieve a copy of a column value for a matched row with all instances of the matched term surrounded by html <b></b> tags.
Applications can define their own [custom FTS5 auxiliary functions](https://www.sqlite.org/fts5.html#custom_auxiliary_functions) with SQLite, but GRDB does not yet provide any Swift API for that.
See issue [#421](https://github.com/groue/GRDB.swift/issues/421) for more information.
### Date and Time Functions
:baby: Starter Task
Believe it or not, no one has ever asked support for SQLite [Date And Time Functions](https://www.sqlite.org/lang_datefunc.html). There is surely room for a nice Swift API that makes them available.
For more ideas, see:
- [SQLite Core Functions](https://www.sqlite.org/lang_corefunc.html)
- [SQLite Aggregate Functions](https://www.sqlite.org/lang_aggfunc.html)
- [SQLite JSON functions](https://www.sqlite.org/json1.html) and [JSON], below.
Functions are defined in [GRDB/QueryInterface/Support/SQLFunctions.swift](https://github.com/groue/GRDB.swift/blob/master/GRDB/QueryInterface/Support/SQLFunctions.swift).
### Decode NSDecimalNumber from Text Columns
:baby: Starter Task
NSDecimalNumber currently only decodes integer and float decimal values. It would be nice if NSDecimalNumber would decode text values as well:
```swift
let number = try NSDecimalNumber.fetchOne(db, "SELECT '12.3'")!
print(number) // prints 12.3
```
NSNumber and NSDecimalNumber support is found in [GRDB/Core/Support/Foundation/NSNumber.swift](https://github.com/groue/GRDB.swift/blob/master/GRDB/Core/Support/Foundation/NSNumber.swift)
### Documentation
:baby: Starter Task :pencil: Documentation
General documentation can always be improved so that it reaches its goal: helping developers building applications.
- English: the documentation has mostly been written by [@groue](http://github.com/groue) who is not a native English speaker.
- Clarity: any chapter that is not crystal clear should be enhanced.
- Audience: documentation should talk to several populations of developers, from beginners who need positive guidance, to SQLite experts who need to build trust.
- Typos
- Inaccuracies
- etc.
Inline documentation, the one which is embedded right into the source code and is displayed by Xcode when one alt-clicks an identifier, deserves the same care.
If you are a good writer, your help will be very warmly welcomed.
### Full Text Search Demo Application
:baby: Starter Task :pencil: Documentation
There exists a GRDB demo app for the FTS5 full-text engine: [WWDCCompanion](https://github.com/groue/WWDCCompanion).
This application downloads the transcripts of WWDC sessions, and lets its user type keywords and find matching sessions, sorted by relevance.
The problem is that this demo app breaks every year :sweat_smile:
We'd need instead to index a stable corpus, in order to ease the maintenance of this demo app.
### JSON
:bowtie: Public API Challenge :baby: Starter Task
[Codable Records] are granted with automatic JSON encoding and decoding of their complex properties. But there is still room for improvements. For example, could we put the [SQLite JSON1 extension](https://www.sqlite.org/json1.html) to some good use?
### Linux
:muscle: Hard :hammer: Tooling
Swift on Linux is currently focused on the server (Vapor, Perfect, Kitura). While general server support is a [non-goal](#non-goals) of GRDB, there exists read-only servers, and Linux GUI applications, too. Linux is thus a desired platform.
### More SQL Generation
:bowtie: Public API Challenge :question: Unknown Difficulty
There are several SQLite features that GRDB could natively support:
- [ALTER TABLE ... RENAME COLUMN ... TO ...](https://www.sqlite.org/lang_altertable.html)
- [ATTACH DATABASE](https://www.sqlite.org/lang_attach.html)
- [UPSERT](https://www.sqlite.org/lang_UPSERT.html)
- [INSERT INTO ... SELECT ...](https://www.sqlite.org/lang_insert.html)
- [WITH RECURSIVE ...](https://www.sqlite.org/lang_with.html)
- [RTree](https://sqlite.org/rtree.html)
- [Windows Functions](https://www.sqlite.org/windowfunctions.html)
- [More ideas](https://www.sqlite.org/lang.html)
See [issue #575](https://github.com/groue/GRDB.swift/issues/575) for more information and guidance about the implementation of extra table alterations.
### Reactive Database Observation
:baby: Starter Task
We already have the [GRDBCombine](http://github.com/groue/GRDBCombine) and [RxGRDB] companion libraries.
More choices of reactive engines would help more developers enjoy GRDB.
### SQL Console in the Debugger
:question: Unknown Difficulty :hammer: Tooling
Sometimes one needs, in lldb, a console similar to the [Command Line Shell For SQLite](https://www.sqlite.org/cli.html).
### SQLCipher in a Shared App Container
:question: Unknown Difficulty
See issue [#302](https://github.com/groue/GRDB.swift/issues/302).
### Typed Expressions
:bowtie: Public API Challenge :muscle: Hard :fire: Experimental
The compiler currently does not spot type mistakes in query interface requests:
```swift
Player.filter(Column("name") == "Arthur") // OK
Player.filter(Column("name") == 1) // Sure
Player.filter(Column("name") == Date()) // Legit
```
This weak typing also prevents natural-looking Swift code from producing the expected results:
```swift
// Performs arithmetic additions instead of string concatenation
Player.select(Column("firstName") + " " + Column("lastName"))
```
It would be interesting to see what typed expressions could bring to GRDB.
## Non-Goals
GRDB is a "toolkit for SQLite databases, with a focus on application development".
This definition is the reason why GRDB can provide key features such as sharp multi-threading, database observation, and first-class support for raw SQL.
Features that blur this focus are non-goals:
- Support for MySQL, PostgreSQL, or other database engines
- Support for Servers
[Ask Questions]: #ask-questions
[Associations]: #associations
[CloudKit]: #cloudkit
[Codable Records]: README.md#codable-records
[Custom FTS5 Auxiliary Functions]: #custom-fts5-auxiliary-functions
[Database Observation]: #database-observation
[Date and Time Functions]: #date-and-time-functions
[Decode NSDecimalNumber from Text Columns]: #decode-nsdecimalnumber-from-text-columns
[Documentation]: #documentation
[Full Text Search Demo Application]: #full-text-search-demo-application
[How is the Library Organized?]: Documentation/LibraryOrganization.md
[How is the Repository Organized?]: Documentation/RepositoryOrganization.md
[JSON]: #json
[Linux]: #linux
[More SQL Generation]: #more-sql-generation
[Reactive Database Observation]: #reactive-database-observation
[Records: Splitting Database Encoding from Ability to Write in the Database]: #records-splitting-database-encoding-from-ability-to-write-in-the-database
[Non-Goals]: #non-goals
[Report Bugs]: #report-bugs
[RxGRDB]: http://github.com/RxSwiftCommunity/RxGRDB
[Concurrency]: #concurrency
[Sponsoring and Professional Support]: #sponsoring-and-professional-support
[SQL Console in the Debugger]: #sql-console-in-the-debugger
[SQLCipher in a Shared App Container]: #sqlcipher-in-a-shared-app-container
[Submit a Pull Request]: #submit-a-pull-request
[Suggest an Enhancement]: #suggest-an-enhancement
[Suggested Contributions]: #suggested-contributions
[Typed Expressions]: #typed-expressions
[persistence methods]: README.md#persistence-methods
[PersistableRecord]: README.md#persistablerecord-protocol
[Record Comparison]: README.md#record-comparison
[Requesting Associated Records]: Documentation/AssociationsBasics.md#requesting-associated-records
[ValueObservation]: README.md#valueobservation
How you can Contribute
======================
- [Contribute to the GRDB codebase]
- [Answer issues and contribute to discussions]
- [Financial support and sponsoring]
## Contribute to the GRDB codebase
1. **Install** the following tools:
- For running tests:
- Ruby
- [CocoaPods](https://cocoapods.org) (gem)
- [xcpretty](https://github.com/xcpretty/xcpretty) (gem)
- For contributing code:
- [Swiftlint](https://github.com/realm/SwiftLint) (present in the `$PATH` or in `/opt/homebrew/bin/`)
2. **Clone the `development` branch on your machine.**
3. **Run `make SQLiteCustom` in the terminal**, at the root of the repository.
This step is not strictly necessary if you do not plan to work on custom SQLite builds. But it will avoid a lot of warnings in Xcode.
4. **Open `GRDB.xcworkspace`.** This workspace contains six projects:
- `GRDB.xcodeproj`: the project which contains the GRDB framework and test targets. The sources are organized in two groups:
- `GRDB`: GRDB sources
- `Tests`: GRDB tests
- `GRDBCustom.xcodeproj`: the project which builds GRDB with a custom SQLite build.
- `GRDBProfiling.xcodeproj`: a project which helps profile GRDB with Instruments. No code here is really precious.
- `GRDBDemoiOS.xcodeproj`, `GRDBCombineDemo.xcodeproj`, `GRDBAsyncDemo.xcodeproj`: the demo apps.
To work with `GRDBCustom.xcodeproj`:
- Make sure Xcode is installed in `/Applications`.
- Run `make SQLiteCustom` in the terminal so that SQLite sources are present.
5. **Run tests**
You can run tests from `GRDB.xcworkspace`, after selecting your scheme (`GRDB` from `GRDB.xcodeproj` or `GRDBCustom` from `GRDBCustom.xcodeproj`).
Before submitting a pull request, please run in the terminal:
```sh
make smokeTest
```
The "smoke tests" perform minimal testing of the system SQLite, SQLCipher, custom SQLite builds, as well as SPM integration.
Before a release, the full test suite must pass:
```sh
make test
```
The full test suite performs many more checks, such as the ability to archive an XCFramework, various installation methods, the demo apps, etc.
6. **Please respect the existing coding style**
- Get familiar with the [Swift API Design Guidelines](https://www.swift.org/documentation/api-design-guidelines/).
- Spaces, not tabs.
- Whitespace-only lines are not trimmed.
- Documentation comments are hard-wrapped at column 76 (Xcode > Preferences > Text Editing > Display > [X] Page guide at column: 76).
- No Swiftlint warning after a build.
7. **Please provide documentation for your changes**
GRDB documentation is provided as a DocC reference, and guides ([README.md](README.md) and the [Documentation](Documentation) folder).
Please keep the reference and the guides up-to-date. To control the quality of your DocC reference documentation, close the workspace, open `Package.swift` in Xcode, and use Product > Build Documentation.
GRDB is "documentation-driven", which means that nothing ships until it is supported by documentation that makes sense. Documentation makes sense when someone who is not you is able to figure out what the purpose of your contribution is, how to use it, and what its caveats and corner cases are. When the documentation is hard to write, or reveals too many caveats, it is a sign that the api needs to be fixed.
8. **Open a pull request with your changes (targeting the `development` branch)!**
9. **If you are granted push access to the repository**, check [ReleaseProcess.md](Documentation/ReleaseProcess.md) in order to publish a new GRDB version.
## Answer issues and contribute to discussions
Answering [issues](https://github.com/groue/GRDB.swift/issues), participating in [discussions](https://github.com/groue/GRDB.swift/discussions) and in the [forum](https://forums.swift.org/c/related-projects/grdb/36) is a great way to help, get familiar with the library, and shape its direction.
## Financial support and sponsoring
GRDB is free, and openly developed by its contributors, in their free time, according to their will, needs, and availability. It is not controlled by any company.
Support is free as well, as long as it happens publicly, and is available to everyone as well as internet search engines. This excludes the private channels of social networks, closed environments such as Slack, etc.
When you have specific development or support needs, please send an email to [Gwendal Roué](mailto:gr@pierlis.com) so that we can enter a regular business relationship through the [Pierlis](http://pierlis.com/) company, based in Paris, France.
You can also [sponsor @groue via GitHub](https://github.com/sponsors/groue).
[Contribute to the GRDB codebase]: #contribute-to-the-grdb-codebase
[Answer issues and contribute to discussions]: #answer-issues-and-contribute-to-discussions
[Financial support and sponsoring]: #financial-support-and-sponsoring
+1 -247
View File
@@ -1,250 +1,4 @@
Sharing a Database in an App Group Container
============================================
On iOS, you can share database files between multiple processes by storing them in an [App Group Container](https://developer.apple.com/documentation/foundation/nsfilemanager/1412643-containerurlforsecurityapplicati).
A shared database is accessed from several SQLite connections, from several processes. This creates challenges at various levels:
1. **Database setup** may be attempted by multiple processes, concurrently.
2. **SQLite** may throw `SQLITE_BUSY` errors, code 5, "database is locked".
3. **iOS** may kill your application with a `0xDEAD10CC` exception.
4. **GRDB** database observation misses changes performed by external processes.
We'll address all of those challenges below.
- [Use a Database Pool]
- [How to limit the `SQLITE_BUSY` error]
- [How to limit the `0xDEAD10CC` exception]
- [How to perform cross-process database observation]
## Use a Database Pool
In order to access a shared database, use a [Database Pool]. It opens the database in the [WAL mode](https://www.sqlite.org/wal.html), which helps sharing a database.
Since several processes may open the database at the same time, protect the creation of the database pool with an [NSFileCoordinator].
- In a process that can create and write in the database, use this sample code:
```swift
/// Returns an initialized database pool at the shared location databaseURL
func openSharedDatabase(at databaseURL: URL) throws -> DatabasePool {
let coordinator = NSFileCoordinator(filePresenter: nil)
var coordinatorError: NSError?
var dbPool: DatabasePool?
var dbError: Error?
coordinator.coordinate(writingItemAt: databaseURL, options: .forMerging, error: &coordinatorError, byAccessor: { url in
do {
dbPool = try openDatabase(at: url)
} catch {
dbError = error
}
})
if let error = dbError ?? coordinatorError {
throw error
}
return dbPool!
}
private func openDatabase(at databaseURL: URL) throws -> DatabasePool {
let dbPool = try DatabasePool(path: databaseURL.path)
// Perform here other database setups, such as defining
// the database schema with a DatabaseMigrator.
try migrator.migrate(dbPool)
return dbPool
}
```
- In a process that only reads in the database, use this sample code:
```swift
/// Returns an initialized database pool at the shared location databaseURL,
/// or nil if the database is not created yet, or does not have the required
/// schema version.
func openSharedReadOnlyDatabase(at databaseURL: URL) throws -> DatabasePool? {
let coordinator = NSFileCoordinator(filePresenter: nil)
var coordinatorError: NSError?
var dbPool: DatabasePool?
var dbError: Error?
coordinator.coordinate(readingItemAt: databaseURL, options: .withoutChanges, error: &coordinatorError, byAccessor: { url in
do {
dbPool = try openReadOnlyDatabase(at: url)
} catch {
dbError = error
}
})
if let error = dbError ?? coordinatorError {
throw error
}
return dbPool
}
private func openReadOnlyDatabase(at databaseURL: URL) throws -> DatabasePool? {
do {
var configuration = Configuration()
configuration.readonly = true
let dbPool = try DatabasePool(path: databaseURL.path, configuration: configuration)
// Check here if the database schema is correct, for example
// with a DatabaseMigrator.
if try dbPool.read(migrator.hasCompletedMigrations) {
return dbPool
} else {
return nil
}
} catch {
if FileManager.default.fileExists(atPath: databaseURL.path) {
throw error
} else {
return nil
}
}
}
```
## How to limit the `SQLITE_BUSY` error
> The SQLITE_BUSY result code indicates that the database file could not be written (or in some cases read) because of concurrent activity by some other database connection, usually a database connection in a separate process.
See https://www.sqlite.org/rescode.html#busy for more information about this error.
If several processes want to write in the database, configure the database pool of each process that wants to write:
```swift
var configuration = Configuration()
configuration.busyMode = .timeout(/* a TimeInterval */)
configuration.defaultTransactionKind = .immediate
let dbPool = try DatabasePool(path: ..., configuration: configuration)
```
With such a setup, you may still get `SQLITE_BUSY` (5, "database is locked") errors from all write operations. They will occur if the database remains locked by another process for longer than the specified timeout.
```swift
do {
try dbPool.write { db in ... }
} catch let error as DatabaseError where error.resultCode == .SQLITE_BUSY {
// Another process won't let you write. Deal with it.
}
```
> :bulb: **Tip**: In order to be nice to other processes, measure the duration of your longest writes, and attempt at optimizing the ones that last for too long.
## How to limit the `0xDEAD10CC` exception
> The exception code 0xDEAD10CC indicates that an application has been terminated by the OS because it held on to a file lock or sqlite database lock during suspension.
See https://developer.apple.com/library/archive/technotes/tn2151/_index.html for more information about this exception.
1. If you use SQLCipher, use SQLCipher 4+, and call the `cipher_plaintext_header_size` pragma from your database preparation function:
```swift
var configuration = Configuration()
configuration.prepareDatabase = { (db: Database) in
try db.usePassphrase("secret")
try db.execute(sql: "PRAGMA cipher_plaintext_header_size = 32")
}
let dbPool = try DatabasePool(path: ..., configuration: configuration)
```
This will avoid https://github.com/sqlcipher/sqlcipher/issues/255.
2. [**:fire: EXPERIMENTAL**](README.md#what-are-experimental-features) In each process that wants to write in the database:
Set the `observesSuspensionNotifications` configuration flag:
```swift
var configuration = Configuration()
configuration.suspendsOnBackgroundTimeExpiration = true
let dbPool = try DatabasePool(path: ..., configuration: configuration)
```
Post `Database.suspendNotification` when the application is about to be [suspended](https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle). You can for example post this notification from `UIApplicationDelegate.applicationDidEnterBackground(_:)`, or in the expiration handler of a [background task](https://forums.developer.apple.com/thread/85066).
```swift
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func applicationDidEnterBackground(_ application: UIApplication) {
// Suspend databases
NotificationCenter.default.post(name: Database.suspendNotification, object: self)
}
}
```
Post `Database.resumeNotification` from `UIApplicationDelegate.applicationWillEnterForeground(_:)` (or `SceneDelegate.sceneWillEnterForeground(_:)` for scene-based applications):
```swift
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func applicationWillEnterForeground(_ application: UIApplication) {
// Resume databases
NotificationCenter.default.post(name: Database.resumeNotification, object: self)
}
}
```
If the application uses the background modes supported by iOS, post `Database.resumeNotification` method from each and every background mode callback that may use the database. For example, if your application supports background fetches:
```swift
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
// Resume databases
NotificationCenter.default.post(name: Database.resumeNotification, object: self)
// Proceed with background fetch
...
}
}
```
Suspended databases greatly reduce the odds of `0xDEAD10CC` exception are greatly reduced. If you see one in your crash logs, please open an issue!
In exchange, you will get `SQLITE_INTERRUPT` (9) or `SQLITE_ABORT` (4) errors, with messages "Database is suspended", "Transaction was aborted", or "interrupted", for any attempt at writing in the database when it is suspended.
You can catch those errors:
```swift
do {
try dbPool.write { db in ... }
} catch let error as DatabaseError where error.isInterruptionError {
// Oops, the database is suspended.
// Maybe try again after database is resumed?
}
```
## How to perform cross-process database observation
GRDB [Database Observation] features, as well as [GRDBCombine] and [RxGRDB], are not able to notify database changes performed by other processes.
Whenever you need to notify other processes that the database has been changed, you will have to use a cross-process notification mechanism such as [NSFileCoordinator] or [CFNotificationCenterGetDarwinNotifyCenter].
You can trigger those notifications automatically with [DatabaseRegionObservation]:
```swift
// Notify all changes made to the "player" and "team" database tables
let observation = DatabaseRegionObservation(tracking: Player.all(), Team.all())
let observer = try observation.start(in: dbPool) { (db: Database) in
// Notify other processes
}
// Notify all changes made to the database
let observation = DatabaseRegionObservation(tracking: DatabaseRegion.fullDatabase)
let observer = try observation.start(in: dbPool) { (db: Database) in
// Notify other processes
}
```
[Use a Database Pool]: #use-a-database-pool
[How to limit the `SQLITE_BUSY` error]: #how-to-limit-the-sqlite_busy-error
[How to limit the `0xDEAD10CC` exception]: #how-to-limit-the-0xdead10cc-exception
[How to perform cross-process database observation]: #how-to-perform-cross-process-database-observation
[Database Pool]: ../README.md#database-pools
[Database Observation]: ../README.md#database-changes-observation
[GRDBCombine]: http://github.com/groue/GRDBCombine
[RxGRDB]: https://github.com/RxSwiftCommunity/RxGRDB
[NSFileCoordinator]: https://developer.apple.com/documentation/foundation/nsfilecoordinator
[CFNotificationCenterGetDarwinNotifyCenter]: https://developer.apple.com/documentation/corefoundation/1542572-cfnotificationcentergetdarwinnot
[DatabaseRegionObservation]: ../README.md#databaseregionobservation
This guide [has moved](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasesharing).
File diff suppressed because it is too large. Load diff
+403
View File
@@ -0,0 +1,403 @@
GRDB ❤️ Combine
===============
**On systems supporting the Combine framework, GRDB offers the ability to publish database values and events using Combine's publishers.**
- [Usage]
- [Demo Application]
- [Asynchronous Database Access]
- [Database Observation]
- [Combine and Data Consistency]: take care when you combine database publishers together
## Usage
To connect to the database, please refer to [Database Connections].
<details>
<summary><strong>Asynchronously read from the database</strong></summary>
This publisher reads a single value and delivers it.
```swift
// DatabasePublishers.Read<[Player]>
let players = dbQueue.readPublisher { db in
try Player.fetchAll(db)
}
```
</details>
<details>
<summary><strong>Asynchronously write in the database</strong></summary>
This publisher updates the database and delivers a single value.
```swift
// DatabasePublishers.Write<Void>
let write = dbQueue.writePublisher { db in
try Player(...).insert(db)
}
// DatabasePublishers.Write<Int>
let newPlayerCount = dbQueue.writePublisher { db -> Int in
try Player(...).insert(db)
return try Player.fetchCount(db)
}
```
</details>
<details>
<summary><strong>Asynchronously migrate the database</strong></summary>
This publisher migrates a database:
```swift
// DatabasePublishers.Migrate
let migrator: DatabaseMigrator = ...
let publisher = migrator.migratePublisher(dbQueue)
```
</details>
<details>
<summary><strong>Observe changes in database values</strong></summary>
This publisher delivers fresh values whenever the database changes:
```swift
// A publisher with output [Player] and failure Error
let publisher = ValueObservation
.tracking { db in try Player.fetchAll(db) }
.publisher(in: dbQueue)
// A publisher with output Int? and failure Error
let publisher = ValueObservation
.tracking { db in try Int.fetchOne(db, sql: "SELECT MAX(score) FROM player") }
.publisher(in: dbQueue)
```
</details>
<details>
<summary><strong>Observe database transactions</strong></summary>
This publisher delivers database connections whenever a database transaction has impacted an observed region:
```swift
// A publisher with output Database and failure Error
let publisher = DatabaseRegionObservation
.tracking(Player.all())
.publisher(in: dbQueue)
let cancellable = publisher.sink(
receiveCompletion: { completion in ... },
receiveValue: { (db: Database) in
print("Exclusive write access to the database after players have been impacted")
})
// A publisher with output Database and failure Error
let publisher = DatabaseRegionObservation
.tracking(SQLRequest<Int>(sql: "SELECT MAX(score) FROM player"))
.publisher(in: dbQueue)
let cancellable = publisher.sink(
receiveCompletion: { completion in ... },
receiveValue: { (db: Database) in
print("Exclusive write access to the database after maximum score has been impacted")
})
```
</details>
# Asynchronous Database Access
GRDB provides publishers that perform asynchronous database accesses:
- [`readPublisher(receiveOn:value:)`]
- [`writePublisher(receiveOn:updates:)`]
- [`writePublisher(receiveOn:updates:thenRead:)`]
- [`migratePublisher(_:receiveOn:)`]
#### `DatabaseReader.readPublisher(receiveOn:value:)`
This method returns a publisher that completes after database values have been asynchronously fetched.
```swift
// DatabasePublishers.Read<[Player]>
let players = dbQueue.readPublisher { db in
try Player.fetchAll(db)
}
```
Any attempt at modifying the database completes subscriptions with an error.
When you use a [database queue] or a [database snapshot], the read has to wait for any concurrent database access performed by this queue or snapshot to complete.
When you use a [database pool], reads are generally non-blocking, unless the maximum number of concurrent reads has been reached. In this case, a read has to wait for another read to complete. That maximum number can be [configured].
This publisher can be subscribed from any thread. A new database access starts on every subscription.
The fetched value is published on the main queue, unless you provide a specific [scheduler] to the `receiveOn` argument.
#### `DatabaseWriter.writePublisher(receiveOn:updates:)`
This method returns a publisher that completes after database updates have been successfully executed inside a database transaction.
```swift
// DatabasePublishers.Write<Void>
let write = dbQueue.writePublisher { db in
try Player(...).insert(db)
}
// DatabasePublishers.Write<Int>
let newPlayerCount = dbQueue.writePublisher { db -> Int in
try Player(...).insert(db)
return try Player.fetchCount(db)
}
```
This publisher can be subscribed from any thread. A new database access starts on every subscription.
It completes on the main queue, unless you provide a specific [scheduler] to the `receiveOn` argument.
When you use a [database pool], and your app executes some database updates followed by some slow fetches, you may profit from optimized scheduling with [`writePublisher(receiveOn:updates:thenRead:)`]. See below.
#### `DatabaseWriter.writePublisher(receiveOn:updates:thenRead:)`
This method returns a publisher that completes after database updates have been successfully executed inside a database transaction, and values have been subsequently fetched:
```swift
// DatabasePublishers.Write<Int>
let newPlayerCount = dbQueue.writePublisher(
updates: { db in try Player(...).insert(db) },
thenRead: { db, _ in try Player.fetchCount(db) })
```
It publishes exactly the same values as [`writePublisher(receiveOn:updates:)`]:
```swift
// DatabasePublishers.Write<Int>
let newPlayerCount = dbQueue.writePublisher { db -> Int in
try Player(...).insert(db)
return try Player.fetchCount(db)
}
```
The difference is that the last fetches are performed in the `thenRead` function. This function accepts two arguments: a readonly database connection, and the result of the `updates` function. This allows you to pass information from one function to the other (it is ignored in the sample code above).
When you use a [database pool], this method applies a scheduling optimization: the `thenRead` function sees the database in the state left by the `updates` function, and yet does not block any concurrent writes. This can reduce database write contention.
When you use a [database queue], the results are guaranteed to be identical, but no scheduling optimization is applied.
This publisher can be subscribed from any thread. A new database access starts on every subscription.
It completes on the main queue, unless you provide a specific [scheduler] to the `receiveOn` argument.
# Database Observation
Database Observation publishers are based on [ValueObservation] and [DatabaseRegionObservation]. Please refer to their documentation for more information. If your application needs change notifications that are not built as Combine publishers, check the general [Database Changes Observation] chapter.
- [`ValueObservation.publisher(in:scheduling:)`]
- [`SharedValueObservation.publisher()`]
- [`DatabaseRegionObservation.publisher(in:)`]
#### `ValueObservation.publisher(in:scheduling:)`
[ValueObservation] tracks changes in database values. You can turn it into a Combine publisher:
```swift
let observation = ValueObservation.tracking { db in
try Player.fetchAll(db)
}
// A publisher with output [Player] and failure Error
let publisher = observation.publisher(in: dbQueue)
```
This publisher has the same behavior as ValueObservation:
- It notifies an initial value before subsequent changes.
- It may coalesce subsequent changes into a single notification.
- It may notify consecutive identical values. You can filter out the undesired duplicates with the `removeDuplicates()` Combine operator, but we suggest you have a look at the [removeDuplicates()](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation/removeduplicates()) GRDB operator also.
- It only completes when it is cancelled.
- By default, it notifies the initial value, as well as subsequent changes and errors, on the main thread, asynchronously.
This can be configured with the `scheduling` argument. It does not accept a Combine scheduler, but a [ValueObservationScheduler](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservationscheduler).
For example, the `.immediate` scheduler makes sure the initial value is notified immediately when the publisher is subscribed. It can help your application update the user interface without having to wait for any asynchronous notifications:
```swift
// Immediate notification of the initial value
let cancellable = observation
.publisher(
in: dbQueue,
scheduling: .immediate) // <-
.sink(
receiveCompletion: { completion in ... },
receiveValue: { (players: [Player]) in print("Fresh players: \(players)") })
// <- here "fresh players" is already printed.
```
Note that the `.immediate` scheduler requires that the publisher is subscribed from the main thread. It raises a fatal error otherwise.
#### `SharedValueObservation.publisher()`
[SharedValueObservation] tracks changes in database values. You can turn it into a Combine publisher:
```swift
let sharedObservation = ValueObservation
.tracking { db in try Player.fetchAll(db) }
.shared(in: dbQueue)
// A publisher with output [Player] and failure Error
let publisher = sharedObservation.publisher()
```
This publisher has the same behavior as SharedValueObservation.
#### `DatabaseRegionObservation.publisher(in:)`
[DatabaseRegionObservation] notifies all transactions that impact a tracked database region. You can turn it into a Combine publisher:
```swift
let request = Player.all()
let observation = DatabaseRegionObservation.tracking(request)
// A publisher with output Database and failure Error
let publisher = observation.publisher(in: dbQueue)
```
This publisher can be created and subscribed from any thread. It delivers database connections in a "protected dispatch queue", serialized with all database updates. It only completes when a database error happens.
```swift
let request = Player.all()
let cancellable = DatabaseRegionObservation
.tracking(request)
.publisher(in: dbQueue)
.sink(
receiveCompletion: { completion in ... },
receiveValue: { (db: Database) in
print("Players have changed.")
})
try dbQueue.write { db in
try Player(name: "Arthur").insert(db)
try Player(name: "Barbara").insert(db)
}
// Prints "Players have changed."
try dbQueue.write { db in
try Player.deleteAll(db)
}
// Prints "Players have changed."
```
See [DatabaseRegionObservation] for more information.
## Combine and Data Consistency
When you compose database publishers together with Combine operators such as `combineLatest` or `zip`, you lose all guarantees of [data consistency](https://en.wikipedia.org/wiki/Consistency_(database_systems)).
This is because each database publisher is isolated from others: each one of them sees its own state of the database. Whenever some database change is interleaved between publisher operations, publishers will process or publish values that may not fit well together.
In other words, whenever you need to perform some database access or observation that depends on some database invariant, make sure you define one and only one database publisher instead of combining several publishers. This is how you will prevent concurrent database writes from messing with your app, and introducing bugs.
To this end, remember that *all database publishers can perform several requests*.
In the example below, we are totally sure that the published `HallOfFame` values will never contain inconsistent values, because it is produced by one and only one publisher:
```swift
struct HallOfFame {
// Invariant: bestPlayers.count <= totalPlayerCount
var totalPlayerCount: Int
var bestPlayers: [Player]
}
// CORRECT: DATA CONSISTENCY GUARANTEED
let hallOfFamePublisher = ValueObservation
.tracking { db -> HallOfFame in
// 1st request
let totalPlayerCount = try Player.fetchCount(db)
// 2nd request
let bestPlayers = try Player
.order(\.score.desc)
.limit(10)
.fetchAll(db)
// 100% guaranteed
assert(bestPlayers.count <= totalPlayerCount)
// Merge results together
return HallOfFame(
totalPlayerCount: totalPlayerCount,
bestPlayers: bestPlayers)
}
.publisher(in: dbQueue)
```
Compare with the incorrect version that combines two database publishers together:
```swift
// OK
let totalPlayerCountPublisher = ValueObservation
.tracking(Player.fetchCount)
.publisher(in: dbQueue)
// OK
let bestPlayerPublisher = ValueObservation
.tracking(Player
.order(\.score.desc)
.limit(10)
.fetchAll)
.publisher(in: dbQueue)
// NOT OK: DATA CONSISTENCY NOT GUARANTEED
let hallOfFamePublisher = totalPlayerCountPublisher
.combineLatest(bestPlayerPublisher)
.map(HallOfFame.init(totalPlayerCount:bestPlayers))
let cancellable = hallOfFamePublisher.sink(
receiveCompletion: { completion in ... },
receiveValue: { hallOfFame in
// ASSERTION MAY FAIL if some players are deleted
// at the wrong time
assert(hallOfFame.bestPlayers.count <= hallOfFame.totalPlayerCount)
})
```
[Database Connections]: ../README.md#database-connections
[Usage]: #usage
[Asynchronous Database Access]: #asynchronous-database-access
[Combine]: https://developer.apple.com/documentation/combine
[Database Changes Observation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseobservation
[Database Observation]: #database-observation
[Combine and Data Consistency]: #combine-and-data-consistency
[DatabaseRegionObservation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseregionobservation
[Demo Application]: DemoApps/GRDBCombineDemo/README.md
[SQLite]: http://sqlite.org
[ValueObservation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation
[SharedValueObservation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/sharedvalueobservation
[`DatabaseRegionObservation.publisher(in:)`]: #databaseregionobservationpublisherin
[`ValueObservation.publisher(in:scheduling:)`]: #valueobservationpublisherinscheduling
[`SharedValueObservation.publisher()`]: #sharedvalueobservationpublisher
[`readPublisher(receiveOn:value:)`]: #databasereaderreadpublisherreceiveonvalue
[`writePublisher(receiveOn:updates:)`]: #databasewriterwritepublisherreceiveonupdates
[`writePublisher(receiveOn:updates:thenRead:)`]: #databasewriterwritepublisherreceiveonupdatesthenread
[`migratePublisher(_:receiveOn:)`]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasemigrator/migratepublisher(_:receiveon:)
[configured]: ../README.md#databasepool-configuration
[database pool]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasepool
[database queue]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasequeue
[database snapshot]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasesnapshot
[scheduler]: https://developer.apple.com/documentation/combine/scheduler
+420
View File
@@ -0,0 +1,420 @@
Common Table Expressions
========================
[**:fire: EXPERIMENTAL**](../README.md#what-are-experimental-features)
---
**Common table expressions** (CTEs) can generally be seen as *SQL views that you define on the fly*.
A certain level of familiarity with SQL databases is helpful before you dive into this guide. The starting point is obviously the [SQLite documentation](https://sqlite.org/lang_with.html). Many CTE tutorials exist online as well, including [this good one](https://blog.expensify.com/2015/09/25/the-simplest-sqlite-common-table-expression-tutorial/).
In this guide, you will learn how to:
- [Define Common Table Expressions]
- [Embed Common Table Expressions in Requests]
- [Fetch Values From Common Table Expressions]
- Join CTEs with [Associations to Common Table Expressions]
> **Note**: most code examples will be trivial, and not very "useful". This is because the goal of this guide is to stay focused on the GRDB support for CTEs. Rich setup would just be distracting. So bring your own good ideas with you!
## Define Common Table Expressions
You will create a `CommonTableExpression` definition first. Choose a **name**, and a **request** that provides the content of the common table expression.
The CTE name is like a regular table name: pick one that does not conflict with the names of existing tables.
The CTE request can be provided as a [query interface request]:
```swift
// WITH playerName AS (SELECT name FROM player) ...
let playerNameCTE = CommonTableExpression(
named: "playerName",
request: Player.select(\.name))
```
You can feed a CTE with raw SQL as well (second and third examples use [SQL Interpolation]):
```swift
let name = "O'Brien"
// WITH playerName AS (SELECT 'O''Brien') ...
let playerNameCTE = CommonTableExpression(
named: "playerName",
sql: "SELECT ?", arguments: [name])
// WITH playerName AS (SELECT 'O''Brien') ...
let playerNameCTE = CommonTableExpression(
named: "playerName",
literal: "SELECT \(name)")
// WITH playerName AS (SELECT 'O''Brien') ...
let request = SQLRequest("SELECT \(name)")
let playerNameCTE = CommonTableExpression(
named: "playerName",
request: request)
```
All CTEs can be provided with explicit column names:
```swift
// WITH pair(a, b) AS (SELECT 1, 2) ...
let pairCTE = CommonTableExpression(
named: "pair",
columns: ["a", "b"],
sql: "SELECT 1, 2")
```
Recursive CTEs need the `recursive` flag. The example below selects all integers between 1 and 1000:
```swift
// WITH RECURSIVE counter(x) AS
// (VALUES(1) UNION ALL SELECT x+1 FROM counter WHERE x<1000)
let counterCTE = CommonTableExpression(
recursive: true,
named: "counter",
columns: ["x"],
sql: """
VALUES(1)
UNION ALL
SELECT x+1 FROM counter WHERE x<1000
""")
```
> **Note**: many recursive CTEs use the `UNION ALL` SQL operator. The query interface does not provide any Swift support for it, so you'll generally have to write SQL in your definitions of recursive CTEs.
## Embed Common Table Expressions in Requests
A typical SQLite query that uses a common table expression first *defines* the CTE and then *uses* the CTE by mentioning its table name. We'll see below Swift apis that match those two steps.
We will use the (simple) query below as a target. It is the query we'll want to generate in this chapter. It defines a CTE, and uses it in a subquery:
```sql
WITH playerName AS (SELECT 'O''Brien')
SELECT * FROM player
WHERE name = (SELECT * FROM playerName)
```
We first build a `CommonTableExpression`:
```swift
let name = "O'Brien"
let playerNameCTE = CommonTableExpression(
named: "playerName",
literal: "SELECT \(name)")
```
We can then embed the definition of the CTE in a [query interface request] by calling the `with(_:)` method:
```swift
// WITH playerName AS (SELECT 'O''Brien')
// SELECT * FROM player ...
let request = Player
.with(playerNameCTE)...
```
And we can then filter the `player` table with a subquery:
```swift
// WITH playerName AS (SELECT 'O''Brien')
// SELECT * FROM player
// WHERE name = (SELECT * FROM playerName)
let request = Player
.with(playerNameCTE)
.filter { $0.name == playerNameCTE.all() }
```
> **Note**: the `with(_:)` method can be called as many times as there are common table expressions in your request.
>
> **Note**: the `with(_:)` method can be called at any time, like all request methods: `Player.with(...).filter(...).with(...)`.
>
> **Note**: the `with(_:)` method replaces any previously embedded CTE that has the same table name. This allows you to embed the same CTE several times if you feel like it.
>
> **Note**: the `CommonTableExpression.all()` method builds a regular [query interface request] for the content of the CTE (like `SELECT * FROM <cte name>`, not to be confused with the request that was used to define the CTE). You can filter this request, sort it, etc, like all query interface requests:
>
> ```swift
> cte.all().select(...).filter(...).group(...).order(...)
> ```
Common table expressions can also be embedded in [SQLRequest] with [SQL Interpolation]:
```swift
// WITH playerName AS (SELECT 'O''Brien')
// SELECT * FROM player
// WHERE name = (SELECT * FROM playerName)
let request: SQLRequest<Player> = """
WITH \(definitionFor: playerNameCTE)
SELECT * FROM player
WHERE name = (SELECT * FROM \(playerNameCTE))
"""
// WITH playerName AS (SELECT 'O''Brien')
// SELECT * FROM player
// WHERE name = (SELECT * FROM playerName)
let request: SQLRequest<Player> = """
WITH \(definitionFor: playerNameCTE)
SELECT * FROM player
WHERE name = (\(playerNameCTE.all()))
"""
```
Common table expressions can also be used as subqueries, when you update or delete rows in the database:
```swift
// WITH playerName AS (SELECT 'O''Brien')
// UPDATE player SET name = (SELECT * FROM playerName)
try Player
.with(playerNameCTE)
.updateAll(db) { $0.name.set(to: playerNameCTE.all()) }
// WITH playerName AS (SELECT 'O''Brien')
// DELETE FROM player WHERE name = (SELECT * FROM playerName)
try Player
.with(playerNameCTE)
.filter { $0.name == playerNameCTE.all() }
.deleteAll(db)
```
## Fetch Values From Common Table Expressions
In the previous chapter, a common table expression was embedded as a subquery, with the `CommonTableExpression.all()` method.
`cte.all()` builds a regular [query interface request] that you can filter, sort, etc, like all query interface requests.
You can also fetch from `cte.all()`, as long as the request is given the definition of the CTE: `cte.all().with(cte)`. In SQL, this would give: `WITH cte AS (...) SELECT * FROM cte`:
This request, of type `QueryInterfaceRequest<Row>`, can fetch raw database [rows](../README.md#row-queries):
```swift
let cte = CommonTableExpression(...)
let request = cte.all().with(cte)
let rows = try request.fetchAll(db) // [Row]
```
In order to fetch something else, such as simple [values](../README.md#value-queries), or custom [records](../README.md#records), you have two possible options:
1. Use the `asRequest(of:)` method:
```swift
let cte = CommonTableExpression(...)
let request = cte.all().with(cte).asRequest(of: Player.self)
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
let players = try request.fetchAll(db) // [Player]
```
2. Provide the fetched type to the cte itself:
```swift
let cte = CommonTableExpression<Player>(...)
// ~~~~~~~~
let request = cte.all().with(cte)
let players = try request.fetchAll(db) // [Player]
```
## Associations to Common Table Expressions
GRDB [associations] define "to-one" and "to-many" relationships between two database tables. Here we will define associations between regular tables and common table expressions.
We recommend familiarity with the "joining methods", described in [Joining And Prefetching Associated Records]:
```swift
// SELECT parent.* FROM parent LEFT JOIN child ON ...
Parent.joining(optional: childAssociation)
// SELECT parent.* FROM parent JOIN child ON ...
Parent.joining(required: childAssociation)
// SELECT parent.*, child.* FROM parent LEFT JOIN child ON ...
Parent.including(optional: childAssociation)
// SELECT parent.*, child.* FROM parent JOIN child ON ...
Parent.including(required: childAssociation)
```
> **Note**: common table expressions currently only define "to-one" associations, so the `including(all:)` joining method is unavailable.
CTE associations are generally built with the `association(to:on:)` method, which needs:
- The two sides of the association: a `CommonTableExpression` instance, and another CTE or a type that conforms to the [TableRecord] protocol.
- A function that returns the condition that joins the two sides of the association.
The condition function plays the same role as the **foreign key** that defines regular table [associations] such as **BelongsTo** or **HasMany**. It accepts two [TableAlias], from which you can build a joining expression:
For example:
```swift
// An association from LeftRecord to rightCTE
let rightCTE = ...
let association = LeftRecord.association(
to: rightCTE,
on: { left, right in
left[Column("x")] == right[Column("y")]
})
```
Now this association can be used with a joining method:
```swift
// WITH rightCTE AS (...)
// SELECT leftRecord.*, rightCTE.*
// FROM leftRecord
// JOIN rightCTE ON leftRecord.x = rightCTE.y
LeftRecord
.with(rightCTE)
.including(required: association)
```
### CTE Association Example: a Chat App
As an example, let's build the classic main screen of a chat application: a list of all latest messages from all conversations.
The database schema of the chat app contains a `chat` and a `message` table. The application defines the following records:
```swift
struct Chat: Codable, FetchableRecord, PersistableRecord {
var id: Int64
...
}
struct Message: Codable, FetchableRecord, PersistableRecord {
var chatId: Int64
var date: Date
...
enum Columns {
static let chatId = Column("chatId")
static let date = Column("date")
...
}
}
```
To feed the main app screen, we want to fetch a list of `ChatInfo` records:
```swift
struct ChatInfo: Decodable, FetchableRecord {
/// The chat
var chat: Chat
/// The latest chat message, if any
var latestMessage: Message?
}
```
The SQL request that we want to run is below. It uses an SQLite-specific [special processing](https://sqlite.org/lang_select.html) of `MAX()` that helps the selection of latest messages from all chats:
```sql
WITH latestMessage AS
(SELECT *, MAX(date) FROM message GROUP BY chatID)
SELECT chat.*, latestMessage.*
FROM chat
LEFT JOIN latestMessage ON chat.id = latestMessage.chatID
ORDER BY latestMessage.date DESC
```
We start by defining the CTE request, which loads the latest messages of all chats:
```swift
// SELECT *, MAX(date) FROM message GROUP BY chatID
let latestMessageRequest = Message
.annotated { max($0.date) }
.group(\.chatId)
```
We can now define the CTE for the latest messages:
```swift
// WITH latestMessage AS
// (SELECT *, MAX(date) FROM message GROUP BY chatID)
let latestMessageCTE = CommonTableExpression<Message>(
named: "latestMessage",
request: latestMessageRequest)
```
The association from a chat to its latest message follows:
```swift
// ... JOIN latestMessage ON chat.id = latestMessage.chatID
let latestMessage = Chat.association(
to: latestMessageCTE,
on: { chat, latestMessage in
chat.id == latestMessage.chatId
})
.order(\.date.desc)
```
The final request can now be defined:
```swift
// WITH latestMessage AS
// (SELECT *, MAX(date) FROM message GROUP BY chatID)
// SELECT chat.*, latestMessage.*
// FROM chat
// LEFT JOIN latestMessage ON chat.id = latestMessage.chatID
// ORDER BY latestMessage.date DESC
let request = Chat
.with(latestMessageCTE)
.including(optional: latestMessage)
.asRequest(of: ChatInfo.self)
```
And we can fetch the data that feeds our application screen:
```swift
let chatInfos: [ChatInfo] = try dbQueue.read { db in
try request.fetchAll(db)
}
```
> :bulb: **Tip**: the joining methods are generally type-safe: they won't allow you to join apples to oranges. This works when associations have a *precise* type. In this context, anonymous `CommonTableExpression` CTEs can work against type safety. When you want to define associations between several CTEs, and make sure the compiler will notice wrong uses of those associations, tag your common table expressions with an explicit type: `CommonTableExpression<SomeType>`.
>
> To do so, you can use an existing record type, or an ad-hoc enum. For example:
>
> ```swift
> enum CTE1 { }
> let cte1 = CommonTableExpression<CTE1>(...)
>
> enum CTE2 { }
> let cte2 = CommonTableExpression<CTE2>(...)
>
> let assoc1 = BaseRecord.association(to: cte1, on: ...) // from BaseRecord to CTE1
> let assoc2 = cte1.association(to: cte2, on: ...) // from CTE1 to CTE2
> let assoc3 = cte2.association(to: FarRecord.self, on: ...) // from CTE2 to FarRecord
>
> // WITH ...
> // SELECT base.* FROM base
> // JOIN cte1 ON ...
> // JOIN cte2 ON ...
> // JOIN far ON ...
> let request = BaseRecord
> .with(cte1).with(cte2)
> .joining(required: assoc1 // OK
> .joining(required: assoc2 // OK
> .joining(required: assoc3))) // OK
>
> // Compiler error
> let request = BaseRecord
> .joining(required: assoc2) // Not OK
> .joining(required: assoc3) // Not OK
> ```
[query interface request]: ../README.md#requests
[query interface requests]: ../README.md#requests
[SQLRequest]: ../README.md#custom-requests
[SQLiteral]: SQLInterpolation.md
[SQL Interpolation]: SQLInterpolation.md
[associations]: AssociationsBasics.md
[Joining And Prefetching Associated Records]: AssociationsBasics.md#joining-and-prefetching-associated-records
[Define Common Table Expressions]: #define-common-table-expressions
[Embed Common Table Expressions in Requests]: #embed-common-table-expressions-in-requests
[Fetch Values From Common Table Expressions]: #fetch-values-from-common-table-expressions
[Associations to Common Table Expressions]: #associations-to-common-table-expressions
[TableRecord]: ../README.md#tablerecord-protocol
[TableAlias]: AssociationsBasics.md#table-aliases
+4
View File
@@ -0,0 +1,4 @@
:twisted_rightwards_arrows: Concurrency
=======================================
This guide [has moved](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/concurrency).
+43 -35
View File
@@ -3,54 +3,58 @@ Custom SQLite Builds
By default, GRDB uses the version of SQLite that ships with the target operating system.
**You can build GRDB with a custom build of [SQLite 3.28.0](https://www.sqlite.org/changes.html).**
**You can build GRDB with a custom build of [SQLite 3.47.2](https://www.sqlite.org/changes.html).**
A custom SQLite build can activate extra SQLite features, and extra GRDB features as well, such as support for the [FTS5 full-text search engine](../../../#full-text-search), and [SQLite Pre-Update Hooks](../../../#support-for-sqlite-pre-update-hooks).
A custom SQLite build can activate extra SQLite features, and extra GRDB features as well, such as support for the [FTS5 full-text search engine](FullTextSearch.md), and [SQLite Pre-Update Hooks](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/transactionobserver).
GRDB builds SQLite with [swiftlyfalling/SQLiteLib](https://github.com/swiftlyfalling/SQLiteLib), which uses the same SQLite configuration as the one used by Apple in its operating systems, and lets you add extra compilation options that leverage the features you need.
> Warning: The technique described here is not compatible with the Swift Package Manager (SPM). It will create [build issues](https://github.com/groue/GRDB.swift/issues/1709) with SPM companion libraries such as [GRDBQuery](https://github.com/groue/GRDBQuery) or [GRDBSnapshotTesting](https://github.com/groue/GRDBSnapshotTesting).
**To install GRDB with a custom SQLite build:**
1. Clone the GRDB git repository, checkout the latest tagged version:
```sh
cd [GRDB directory]
git checkout [latest tag]
git submodule update --init SQLiteCustom/src
```
2. Choose your [extra compilation options](https://www.sqlite.org/compile.html). For example, `SQLITE_ENABLE_FTS5` and `SQLITE_ENABLE_PREUPDATE_HOOK`.
2. Choose your [extra compilation options](https://www.sqlite.org/compile.html). For example, `SQLITE_ENABLE_FTS5`, `SQLITE_ENABLE_PREUPDATE_HOOK`.
It is recommended that you enable the `SQLITE_ENABLE_SNAPSHOT` option. It allows GRDB to optimize [ValueObservation](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation) when you use a [Database Pool](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasepool).
3. Create a folder named `GRDBCustomSQLite` somewhere in your project directory.
4. Create four files in the `GRDBCustomSQLite` folder:
- `SQLiteLib-USER.xcconfig`: this file sets the extra SQLite compilation flags.
```xcconfig
// As many -D options as there are custom SQLite compilation options
// Note: there is no space between -D and the option name.
CUSTOM_SQLLIBRARY_CFLAGS = -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_PREUPDATE_HOOK
CUSTOM_SQLLIBRARY_CFLAGS = -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_FTS5
```
- `GRDBCustomSQLite-USER.xcconfig`: this file lets GRDB know about extra compilation flags, and enables extra GRDB APIs.
```xcconfig
// As many -D options as there are custom SQLite compilation options
// Note: there is one space between -D and the option name.
CUSTOM_OTHER_SWIFT_FLAGS = -D SQLITE_ENABLE_FTS5 -D SQLITE_ENABLE_PREUPDATE_HOOK
CUSTOM_OTHER_SWIFT_FLAGS = -D SQLITE_ENABLE_SNAPSHOT -D SQLITE_ENABLE_FTS5
```
- `GRDBCustomSQLite-USER.h`: this file lets your application know about extra compilation flags.
```c
// As many #define as there are custom SQLite compilation options
#define SQLITE_ENABLE_SNAPSHOT
#define SQLITE_ENABLE_FTS5
#define SQLITE_ENABLE_PREUPDATE_HOOK
```
- `GRDBCustomSQLite-INSTALL.sh`: this file installs the three other files.
```sh
# License: MIT License
# https://github.com/swiftlyfalling/SQLiteLib/blob/master/LICENSE
@@ -59,76 +63,80 @@ GRDB builds SQLite with [swiftlyfalling/SQLiteLib](https://github.com/swiftlyfal
# PROJECT PATHS
# !! MODIFY THESE TO MATCH YOUR PROJECT HIERARCHY !!
#######################################################
# The path to the folder containing GRDBCustom.xcodeproj:
GRDB_SOURCE_PATH="${PROJECT_DIR}/GRDB"
# The path to your custom "SQLiteLib-USER.xcconfig":
SQLITELIB_XCCONFIG_USER_PATH="${PROJECT_DIR}/GRDBCustomSQLite/SQLiteLib-USER.xcconfig"
# The path to your custom "GRDBCustomSQLite-USER.xcconfig":
CUSTOMSQLITE_XCCONFIG_USER_PATH="${PROJECT_DIR}/GRDBCustomSQLite/GRDBCustomSQLite-USER.xcconfig"
# The path to your custom "GRDBCustomSQLite-USER.h":
CUSTOMSQLITE_H_USER_PATH="${PROJECT_DIR}/GRDBCustomSQLite/GRDBCustomSQLite-USER.h"
#######################################################
#
#######################################################
if [ ! -d "$GRDB_SOURCE_PATH" ];
then
echo "error: Path to GRDB source (GRDB_SOURCE_PATH) missing/incorrect: $GRDB_SOURCE_PATH"
exit 1
fi
SyncFileChanges () {
SOURCE=$1
DESTINATIONPATH=$2
DESTINATIONFILENAME=$3
DESTINATION="${DESTINATIONPATH}/${DESTINATIONFILENAME}"
if [ ! -f "$SOURCE" ];
then
echo "error: Source file missing: $SOURCE"
exit 1
fi
rsync -a "$SOURCE" "$DESTINATION"
}
SyncFileChanges $SQLITELIB_XCCONFIG_USER_PATH "${GRDB_SOURCE_PATH}/SQLiteCustom/src" "SQLiteLib-USER.xcconfig"
SyncFileChanges $CUSTOMSQLITE_XCCONFIG_USER_PATH "${GRDB_SOURCE_PATH}/SQLiteCustom" "GRDBCustomSQLite-USER.xcconfig"
SyncFileChanges $CUSTOMSQLITE_H_USER_PATH "${GRDB_SOURCE_PATH}/SQLiteCustom" "GRDBCustomSQLite-USER.h"
echo "Finished syncing"
```
Modify the top of `GRDBCustomSQLite-INSTALL.sh` file so that it contains correct paths.
Modify the top of the `GRDBCustomSQLite-INSTALL.sh` file so that it contains correct paths.
5. Embed the `GRDBCustom.xcodeproj` project in your own project.
6. Add the `GRDBCustomSQLiteOSX` or `GRDBCustomSQLiteiOS` target in the **Target Dependencies** section of the **Build Phases** tab of your **application target**.
6. Add the `GRDBCustom` target in the **Target Dependencies** section of the **Build Phases** tab of your **application target**.
7. Add the `GRDBCustomSQLite.framework` from the targeted platform to the **Embedded Binaries** section of the **General** tab of your **application target**.
7. Add the `GRDBCustom.framework` from the targeted platform to the **Embedded Binaries** section of the **General** tab of your **application target**.
8. Add a Run Script phase for your target in the **Pre-actions** section of the **Build** tab of your **application scheme**:
```sh
source "${PROJECT_DIR}/GRDBCustomSQLite/GRDBCustomSQLite-INSTALL.sh"
```
The path should be the path to your `GRDBCustomSQLite-INSTALL.sh` file.
Select your application target in the "Provide build settings from" menu.
9. Check the "Shared" checkbox of your application scheme (this lets you commit the pre-action in your Version Control System).
10. If you have enabled "Hardened Runtime" for your target (**Build Settings**/**Signing**) then you may need to check **Disable Library Validation** under the **Hardened Runtime** section of the **Signing & Capabilities** tab.
(The build error without this exception is "Library not loaded ... different Team IDs")
Now you can use GRDB with your custom SQLite build:
```swift
import GRDBCustomSQLite
import GRDB
let dbQueue = try DatabaseQueue(...)
```
@@ -0,0 +1,505 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 77;
objects = {
/* Begin PBXBuildFile section */
56CFC6772C9F1E1B000B5023 /* GRDB in Frameworks */ = {isa = PBXBuildFile; productRef = 56CFC6762C9F1E1B000B5023 /* GRDB */; };
56CFC6E42C9F5AEA000B5023 /* GRDB in Frameworks */ = {isa = PBXBuildFile; productRef = 56CFC6E32C9F5AEA000B5023 /* GRDB */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
56CFC6552C9F1DCA000B5023 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56CFC63C2C9F1DC9000B5023 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 56CFC6432C9F1DC9000B5023;
remoteInfo = GRDBDemo;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
56CFC6442C9F1DC9000B5023 /* GRDBDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GRDBDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
56CFC6542C9F1DCA000B5023 /* GRDBDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GRDBDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
56CFC6B82C9F544D000B5023 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
56CFC6AA2C9F3ADB000B5023 /* Exceptions for "GRDBDemo" folder in "GRDBDemo" target */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
Info.plist,
);
target = 56CFC6432C9F1DC9000B5023 /* GRDBDemo */;
};
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
/* Begin PBXFileSystemSynchronizedRootGroup section */
56CFC6462C9F1DC9000B5023 /* GRDBDemo */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
56CFC6AA2C9F3ADB000B5023 /* Exceptions for "GRDBDemo" folder in "GRDBDemo" target */,
);
path = GRDBDemo;
sourceTree = "<group>";
};
56CFC6572C9F1DCA000B5023 /* GRDBDemoTests */ = {
isa = PBXFileSystemSynchronizedRootGroup;
path = GRDBDemoTests;
sourceTree = "<group>";
};
/* End PBXFileSystemSynchronizedRootGroup section */
/* Begin PBXFrameworksBuildPhase section */
56CFC6412C9F1DC9000B5023 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
56CFC6772C9F1E1B000B5023 /* GRDB in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
56CFC6512C9F1DCA000B5023 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
56CFC6E42C9F5AEA000B5023 /* GRDB in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
56CFC63B2C9F1DC9000B5023 = {
isa = PBXGroup;
children = (
56CFC6B82C9F544D000B5023 /* README.md */,
56CFC6462C9F1DC9000B5023 /* GRDBDemo */,
56CFC6572C9F1DCA000B5023 /* GRDBDemoTests */,
56CFC6E22C9F5AEA000B5023 /* Frameworks */,
56CFC6452C9F1DC9000B5023 /* Products */,
);
sourceTree = "<group>";
};
56CFC6452C9F1DC9000B5023 /* Products */ = {
isa = PBXGroup;
children = (
56CFC6442C9F1DC9000B5023 /* GRDBDemo.app */,
56CFC6542C9F1DCA000B5023 /* GRDBDemoTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
56CFC6E22C9F5AEA000B5023 /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
56CFC6432C9F1DC9000B5023 /* GRDBDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 56CFC6682C9F1DCB000B5023 /* Build configuration list for PBXNativeTarget "GRDBDemo" */;
buildPhases = (
56CFC6402C9F1DC9000B5023 /* Sources */,
56CFC6412C9F1DC9000B5023 /* Frameworks */,
56CFC6422C9F1DC9000B5023 /* Resources */,
);
buildRules = (
);
dependencies = (
);
fileSystemSynchronizedGroups = (
56CFC6462C9F1DC9000B5023 /* GRDBDemo */,
);
name = GRDBDemo;
packageProductDependencies = (
56CFC6762C9F1E1B000B5023 /* GRDB */,
);
productName = GRDBDemo;
productReference = 56CFC6442C9F1DC9000B5023 /* GRDBDemo.app */;
productType = "com.apple.product-type.application";
};
56CFC6532C9F1DCA000B5023 /* GRDBDemoTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 56CFC66B2C9F1DCB000B5023 /* Build configuration list for PBXNativeTarget "GRDBDemoTests" */;
buildPhases = (
56CFC6502C9F1DCA000B5023 /* Sources */,
56CFC6512C9F1DCA000B5023 /* Frameworks */,
56CFC6522C9F1DCA000B5023 /* Resources */,
);
buildRules = (
);
dependencies = (
56CFC6562C9F1DCA000B5023 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
56CFC6572C9F1DCA000B5023 /* GRDBDemoTests */,
);
name = GRDBDemoTests;
packageProductDependencies = (
56CFC6E32C9F5AEA000B5023 /* GRDB */,
);
productName = GRDBDemoTests;
productReference = 56CFC6542C9F1DCA000B5023 /* GRDBDemoTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
56CFC63C2C9F1DC9000B5023 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1600;
LastUpgradeCheck = 2600;
TargetAttributes = {
56CFC6432C9F1DC9000B5023 = {
CreatedOnToolsVersion = 16.0;
};
56CFC6532C9F1DCA000B5023 = {
CreatedOnToolsVersion = 16.0;
TestTargetID = 56CFC6432C9F1DC9000B5023;
};
};
};
buildConfigurationList = 56CFC63F2C9F1DC9000B5023 /* Build configuration list for PBXProject "GRDBDemo" */;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 56CFC63B2C9F1DC9000B5023;
minimizedProjectReferenceProxies = 1;
packageReferences = (
56CFC6752C9F1E1B000B5023 /* XCLocalSwiftPackageReference "../../../../GRDB.swift" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = 56CFC6452C9F1DC9000B5023 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
56CFC6432C9F1DC9000B5023 /* GRDBDemo */,
56CFC6532C9F1DCA000B5023 /* GRDBDemoTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
56CFC6422C9F1DC9000B5023 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
56CFC6522C9F1DCA000B5023 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
56CFC6402C9F1DC9000B5023 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
56CFC6502C9F1DCA000B5023 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
56CFC6562C9F1DCA000B5023 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 56CFC6432C9F1DC9000B5023 /* GRDBDemo */;
targetProxy = 56CFC6552C9F1DCA000B5023 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
56CFC6662C9F1DCB000B5023 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
56CFC6672C9F1DCB000B5023 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_EMIT_LOC_STRINGS = YES;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
56CFC6692C9F1DCB000B5023 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"GRDBDemo/Preview Content\"";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = GRDBDemo/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "GRDB Demo";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 6.1;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
56CFC66A2C9F1DCB000B5023 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"GRDBDemo/Preview Content\"";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = GRDBDemo/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "GRDB Demo";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 6.1;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
56CFC66C2C9F1DCB000B5023 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 6.1;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GRDBDemo.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/GRDBDemo";
};
name = Debug;
};
56CFC66D2C9F1DCB000B5023 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 6.1;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GRDBDemo.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/GRDBDemo";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
56CFC63F2C9F1DC9000B5023 /* Build configuration list for PBXProject "GRDBDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
56CFC6662C9F1DCB000B5023 /* Debug */,
56CFC6672C9F1DCB000B5023 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
56CFC6682C9F1DCB000B5023 /* Build configuration list for PBXNativeTarget "GRDBDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
56CFC6692C9F1DCB000B5023 /* Debug */,
56CFC66A2C9F1DCB000B5023 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
56CFC66B2C9F1DCB000B5023 /* Build configuration list for PBXNativeTarget "GRDBDemoTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
56CFC66C2C9F1DCB000B5023 /* Debug */,
56CFC66D2C9F1DCB000B5023 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
56CFC6752C9F1E1B000B5023 /* XCLocalSwiftPackageReference "../../../../GRDB.swift" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../../../../GRDB.swift;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
56CFC6762C9F1E1B000B5023 /* GRDB */ = {
isa = XCSwiftPackageProductDependency;
productName = GRDB;
};
56CFC6E32C9F5AEA000B5023 /* GRDB */ = {
isa = XCSwiftPackageProductDependency;
package = 56CFC6752C9F1E1B000B5023 /* XCLocalSwiftPackageReference "../../../../GRDB.swift" */;
productName = GRDB;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 56CFC63C2C9F1DC9000B5023 /* Project object */;
}
@@ -1,4 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
LastUpgradeVersion = "2600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
@@ -14,10 +15,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AAA4DC75230F1E0600C74B15"
BuildableName = "GRDB.framework"
BlueprintName = "GRDBtvOS"
ReferencedContainer = "container:GRDB.xcodeproj">
BlueprintIdentifier = "56CFC6432C9F1DC9000B5023"
BuildableName = "GRDBDemo.app"
BlueprintName = "GRDBDemo"
ReferencedContainer = "container:GRDBDemo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
@@ -27,25 +28,17 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AAA4DC75230F1E0600C74B15"
BuildableName = "GRDB.framework"
BlueprintName = "GRDBtvOS"
ReferencedContainer = "container:GRDB.xcodeproj">
</BuildableReference>
</MacroExpansion>
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AAA4DD07230F262000C74B15"
BuildableName = "GRDBtvOSTests.xctest"
BlueprintName = "GRDBtvOSTests"
ReferencedContainer = "container:GRDB.xcodeproj">
BlueprintIdentifier = "56CFC6532C9F1DCA000B5023"
BuildableName = "GRDBDemoTests.xctest"
BlueprintName = "GRDBDemoTests"
ReferencedContainer = "container:GRDBDemo.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
@@ -60,15 +53,23 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AAA4DC75230F1E0600C74B15"
BuildableName = "GRDB.framework"
BlueprintName = "GRDBtvOS"
ReferencedContainer = "container:GRDB.xcodeproj">
BlueprintIdentifier = "56CFC6432C9F1DC9000B5023"
BuildableName = "GRDBDemo.app"
BlueprintName = "GRDBDemo"
ReferencedContainer = "container:GRDBDemo.xcodeproj">
</BuildableReference>
</MacroExpansion>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "SQL_TRACE"
value = "1"
isEnabled = "NO">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
@@ -76,15 +77,16 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AAA4DC75230F1E0600C74B15"
BuildableName = "GRDB.framework"
BlueprintName = "GRDBtvOS"
ReferencedContainer = "container:GRDB.xcodeproj">
BlueprintIdentifier = "56CFC6432C9F1DC9000B5023"
BuildableName = "GRDBDemo.app"
BlueprintName = "GRDBDemo"
ReferencedContainer = "container:GRDBDemo.xcodeproj">
</BuildableReference>
</MacroExpansion>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
@@ -0,0 +1,186 @@
import Foundation
import GRDB
import os.log
/// The type that provides access to the application database.
///
/// For example:
///
/// ```swift
/// // Create an empty, in-memory, AppDatabase
/// let config = AppDatabase.makeConfiguration()
/// let dbQueue = try DatabaseQueue(configuration: config)
/// let appDatabase = try AppDatabase(dbQueue)
/// ```
struct AppDatabase: Sendable {
/// Access to the database.
///
/// See <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseconnections>
private let dbWriter: any DatabaseWriter
/// Creates an `AppDatabase`, and makes sure the database schema
/// is ready.
///
/// - important: Create the `DatabaseWriter` with a configuration
/// returned by ``makeConfiguration(_:)``.
init(_ dbWriter: any GRDB.DatabaseWriter) throws {
self.dbWriter = dbWriter
try migrator.migrate(dbWriter)
}
/// The DatabaseMigrator that defines the database schema.
///
/// See <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/migrations>
private var migrator: DatabaseMigrator {
var migrator = DatabaseMigrator()
#if DEBUG
// Speed up development by nuking the database when migrations change
// See <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/migrations#The-eraseDatabaseOnSchemaChange-Option>
migrator.eraseDatabaseOnSchemaChange = true
#endif
migrator.registerMigration("v1") { db in
// Create a table
// See <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseschema>
try db.create(table: "player") { t in
t.autoIncrementedPrimaryKey("id")
t.column("name", .text).notNull()
t.column("score", .integer).notNull()
}
}
// Migrations for future application versions will be inserted here:
// migrator.registerMigration(...) { db in
// ...
// }
return migrator
}
}
// MARK: - Database Configuration
extension AppDatabase {
// Uncomment to enable SQL logging
// private static let sqlLogger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "SQL")
/// Returns a database configuration suited for `AppDatabase`.
///
/// - parameter config: A base configuration.
static func makeConfiguration(_ config: Configuration = Configuration()) -> Configuration {
// var config = config
//
// Add custom SQL functions or collations, if needed:
// config.prepareDatabase { db in
// db.add(function: ...)
// }
//
// Uncomment to enable SQL logging if the `SQL_TRACE` environment variable is set.
// See <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/database/trace(options:_:)>
// if ProcessInfo.processInfo.environment["SQL_TRACE"] != nil {
// config.prepareDatabase { db in
// let dbName = db.description
// db.trace { event in
// // Sensitive information (statement arguments) is not
// // logged unless config.publicStatementArguments is set
// // (see below).
// sqlLogger.debug("\(dbName): \(event)")
// }
// }
// }
//
// #if DEBUG
// // Protect sensitive information by enabling verbose debugging in
// // DEBUG builds only.
// // See <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/configuration/publicstatementarguments>
// config.publicStatementArguments = true
// #endif
return config
}
}
// MARK: - Database Access: Writes
// The write methods execute invariant-preserving database transactions.
// In this demo repository, they are pretty simple.
extension AppDatabase {
/// Saves (inserts or updates) a player. When the method returns, the
/// player is present in the database, and its id is not nil.
func savePlayer(_ player: inout Player) throws {
try dbWriter.write { db in
try player.save(db)
}
}
/// Deletes the specified players
func deletePlayers(ids: [Int64]) throws {
try dbWriter.write { db in
_ = try Player.deleteAll(db, keys: ids)
}
}
/// Deletes all players
func deleteAllPlayers() throws {
try dbWriter.write { db in
_ = try Player.deleteAll(db)
}
}
/// Refreshes all players (by performing some random changes, for demo purposes).
func refreshPlayers() async throws {
try await dbWriter.write { db in
if try Player.all().isEmpty(db) {
// When the database is empty, insert new random players
try createRandomPlayers(db)
} else {
// Insert a player
if Bool.random() {
_ = try Player.makeRandom().inserted(db) // insert but ignore inserted id
}
// Delete a random player
if Bool.random() {
try Player.order(sql: "RANDOM()").limit(1).deleteAll(db)
}
// Update some players
for var player in try Player.fetchAll(db) where Bool.random() {
try player.updateChanges(db) {
$0.score = Player.randomScore()
}
}
}
}
}
/// Creates random players if the database is empty.
func createRandomPlayersIfEmpty() throws {
try dbWriter.write { db in
if try Player.all().isEmpty(db) {
try createRandomPlayers(db)
}
}
}
/// Support for `createRandomPlayersIfEmpty()` and `refreshPlayers()`.
private func createRandomPlayers(_ db: Database) throws {
for _ in 0..<8 {
_ = try Player.makeRandom().inserted(db) // insert but ignore inserted id
}
}
}
// MARK: - Database Access: Reads
// This demo app does not provide any specific reading method, and instead
// gives unrestricted read-only access to the rest of the application.
// In your app, you are free to choose another path, and define focused
// reading methods.
extension AppDatabase {
/// Provides read-only access to the database.
var reader: any GRDB.DatabaseReader {
dbWriter
}
}
@@ -0,0 +1,66 @@
import GRDB
/// The Player struct.
///
/// Identifiable conformance supports SwiftUI list animations, and type-safe
/// GRDB primary key methods.
/// Equatable conformance supports tests.
struct Player: Equatable {
/// The player id.
///
/// Int64 is the recommended type for auto-incremented database ids.
/// Use nil for players that are not inserted in the database yet.
var id: Int64?
var name: String
var score: Int
}
extension Player {
private static let names = [
"Arthur", "Anita", "Barbara", "Bernard", "Craig", "Chiara", "David",
"Dean", "Éric", "Elena", "Fatima", "Frederik", "Gilbert", "Georgette",
"Henriette", "Hassan", "Ignacio", "Irene", "Julie", "Jack", "Karl",
"Kristel", "Louis", "Liz", "Masashi", "Mary", "Noam", "Nicole",
"Ophelie", "Oleg", "Pascal", "Patricia", "Quentin", "Quinn", "Raoul",
"Rachel", "Stephan", "Susie", "Tristan", "Tatiana", "Ursule", "Urbain",
"Victor", "Violette", "Wilfried", "Wilhelmina", "Yvon", "Yann",
"Zazie", "Zoé"]
/// Creates a new player with empty name and zero score
static func new() -> Player {
Player(id: nil, name: "", score: 0)
}
/// Creates a new player with random name and random score
static func makeRandom() -> Player {
Player(id: nil, name: randomName(), score: randomScore())
}
/// Returns a random name
static func randomName() -> String {
names.randomElement()!
}
/// Returns a random score
static func randomScore() -> Int {
10 * Int.random(in: 0...100)
}
}
// MARK: - Database
/// Make Player a Codable Record.
///
/// See <https://github.com/groue/GRDB.swift/blob/master/README.md#records>
extension Player: Codable, FetchableRecord, MutablePersistableRecord {
// Define database columns from CodingKeys
enum Columns {
static let name = Column(CodingKeys.name)
static let score = Column(CodingKeys.score)
}
/// Updates a player id after it has been inserted in the database.
mutating func didInsert(_ inserted: InsertionSuccess) {
id = inserted.rowID
}
}
@@ -0,0 +1,61 @@
import Foundation
import GRDB
extension AppDatabase {
/// The database for the application
static let shared = makeShared()
private static func makeShared() -> AppDatabase {
do {
// Apply recommendations from
// <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseconnections>
// Create the "Application Support/Database" directory if needed
let fileManager = FileManager.default
let appSupportURL = try fileManager.url(
for: .applicationSupportDirectory, in: .userDomainMask,
appropriateFor: nil, create: true)
let directoryURL = appSupportURL.appendingPathComponent("Database", isDirectory: true)
try fileManager.createDirectory(at: directoryURL, withIntermediateDirectories: true)
// Open or create the database
let databaseURL = directoryURL.appendingPathComponent("db.sqlite")
let config = AppDatabase.makeConfiguration()
let dbPool = try DatabasePool(path: databaseURL.path, configuration: config)
// Create the AppDatabase
let appDatabase = try AppDatabase(dbPool)
// Populate the database if it is empty, for a better demo.
try appDatabase.createRandomPlayersIfEmpty()
return appDatabase
} catch {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate.
//
// Typical reasons for an error here include:
// * The parent directory cannot be created, or disallows writing.
// * The database is not accessible, due to permissions or data protection when the device is locked.
// * The device is out of space.
// * The database could not be migrated to its latest schema version.
// Check the error message to determine what the actual problem was.
fatalError("Unresolved error \(error)")
}
}
/// Creates an empty database for SwiftUI previews
static func empty() -> AppDatabase {
// Connect to an in-memory database
// See https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseconnections
let dbQueue = try! DatabaseQueue(configuration: AppDatabase.makeConfiguration())
return try! AppDatabase(dbQueue)
}
/// Creates a database full of random players for SwiftUI previews
static func random() -> AppDatabase {
let appDatabase = empty()
try! appDatabase.createRandomPlayersIfEmpty()
return appDatabase
}
}
@@ -0,0 +1,22 @@
import SwiftUI
@main
struct GRDBDemoApp: App {
var body: some Scene {
WindowGroup {
PlayersNavigationView().appDatabase(.shared)
}
}
}
// MARK: - Give SwiftUI access to the database
extension EnvironmentValues {
@Entry var appDatabase = AppDatabase.empty()
}
extension View {
func appDatabase(_ appDatabase: AppDatabase) -> some View {
self.environment(\.appDatabase, appDatabase)
}
}
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UILaunchScreen</key>
<dict>
<key>UIImageName</key>
<string>LaunchScreen</string>
</dict>
</dict>
</plist>
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,37 @@
{
"images" : [
{
"filename" : "Icon-Light-1024×1024.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "Icon-Dark-1024×1024.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "tinted"
}
],
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 586 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,22 @@
{
"images" : [
{
"filename" : "LaunchIcon.pdf",
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "LaunchIcon~Dark.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,89 @@
{
"sourceLanguage" : "en",
"strings" : {
"" : {
},
"%lld Players" : {
"localizations" : {
"en" : {
"variations" : {
"plural" : {
"one" : {
"stringUnit" : {
"state" : "translated",
"value" : "1 Player"
}
},
"other" : {
"stringUnit" : {
"state" : "new",
"value" : "%lld Players"
}
},
"zero" : {
"stringUnit" : {
"state" : "translated",
"value" : "No Players"
}
}
}
}
}
}
},
"%lld points" : {
"localizations" : {
"en" : {
"variations" : {
"plural" : {
"one" : {
"stringUnit" : {
"state" : "translated",
"value" : "1 point"
}
},
"other" : {
"stringUnit" : {
"state" : "new",
"value" : "%lld points"
}
},
"zero" : {
"stringUnit" : {
"state" : "translated",
"value" : "0 points"
}
}
}
}
}
}
},
"Add Player" : {
},
"Anonymous" : {
},
"Cancel" : {
},
"Name" : {
},
"New Player" : {
},
"Save" : {
},
"Score" : {
},
"The team is empty!" : {
}
},
"version" : "1.0"
}
@@ -0,0 +1,39 @@
import SwiftUI
/// A view that creates a `Player`. Display it as a sheet.
struct PlayerCreationSheet: View {
@Environment(\.appDatabase) var appDatabase
@Environment(\.dismiss) var dismiss
@State var form = PlayerForm(name: "", score: nil)
var body: some View {
NavigationStack {
Form {
PlayerFormView(form: $form)
}
.navigationTitle("New Player")
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button("Cancel") { dismiss() }
}
ToolbarItem(placement: .confirmationAction) {
Button("Save") {
save()
}
}
}
}
}
private func save() {
var player = Player(name: form.name, score: form.score ?? 0)
try? appDatabase.savePlayer(&player)
dismiss()
}
}
// MARK: - Previews
#Preview {
PlayerCreationSheet()
}
@@ -0,0 +1,38 @@
import SwiftUI
struct PlayerEditView: View {
@Environment(\.appDatabase) var appDatabase
@State var form: PlayerForm
var player: Player
init(player: Player) {
self.player = player
self._form = State(initialValue: PlayerForm(name: player.name, score: player.score))
}
var body: some View {
Form {
PlayerFormView(form: $form)
}
.navigationTitle(player.name)
.onDisappear {
// Back button was pressed
save()
}
}
private func save() {
var player = player
player.name = form.name
player.score = form.score ?? 0
try? appDatabase.savePlayer(&player)
}
}
// MARK: - Previews
#Preview {
NavigationStack {
PlayerEditView(player: .makeRandom())
}
}
@@ -0,0 +1,64 @@
import SwiftUI
/// A view that edits a `PlayerForm`.
struct PlayerFormView: View {
@Binding var form: PlayerForm
private enum FocusElement {
case name
case score
}
@FocusState private var focusedElement: FocusElement?
var body: some View {
Group {
LabeledContent {
TextField(text: $form.name) { EmptyView() }
.textInputAutocapitalization(.words)
.autocorrectionDisabled()
.submitLabel(.next)
.focused($focusedElement, equals: .name)
.labelsHidden()
.onSubmit {
focusedElement = .score
}
} label: {
Text("Name").foregroundStyle(.secondary)
}
LabeledContent {
TextField(value: $form.score, format: .number) { EmptyView() }
.keyboardType(.numberPad)
.focused($focusedElement, equals: .score)
.labelsHidden()
} label: {
Text("Score").foregroundStyle(.secondary)
}
}
.onAppear { focusedElement = .name }
}
}
/// The model edited by `PlayerFormView`.
struct PlayerForm {
var name: String
var score: Int?
}
// MARK: - Previews
#Preview("Prefilled") {
@Previewable @State var form = PlayerForm(name: "John", score: 100)
Form {
PlayerFormView(form: $form)
}
}
#Preview("Empty") {
@Previewable @State var form = PlayerForm(name: "", score: nil)
Form {
PlayerFormView(form: $form)
}
}
@@ -0,0 +1,95 @@
import Foundation
import Observation
import GRDB
/// The observable model that drives the main navigation view.
///
/// It observes the database in order to always display an up-to-date list
/// of players.
///
/// This class is testable. See `PlayerListModelTests.swift`.
@Observable @MainActor final class PlayerListModel {
/// A player ordering
enum Ordering {
case byName
case byScore
}
/// The player ordering
var ordering = Ordering.byScore {
didSet { observePlayers() }
}
/// The players.
///
/// The array remains empty until `observePlayers()` is called.
var players: [Player] = []
private let appDatabase: AppDatabase
@ObservationIgnored private var cancellable: AnyDatabaseCancellable?
// MARK: - Initialization
/// Creates a `PlayerListModel`.
init(appDatabase: AppDatabase) {
self.appDatabase = appDatabase
}
/// Start observing the database.
func observePlayers() {
// We observe all players, sorted according to `ordering`.
let observation = ValueObservation.tracking { [ordering] db in
switch ordering {
case .byName:
try Player
.order { $0.name.collating(.localizedCaseInsensitiveCompare) }
.fetchAll(db)
case .byScore:
try Player
.order { [
$0.score.desc,
$0.name.collating(.localizedCaseInsensitiveCompare),
] }
.fetchAll(db)
}
}
// Start observing the database.
// Previous observation, if any, is cancelled.
cancellable = observation.start(in: appDatabase.reader, scheduling: .immediate) { error in
// Handle error
} onChange: { [unowned self] players in
self.players = players
}
}
// MARK: - Actions
/// Delete players at the specified indexes in `self.players`.
func deletePlayers(at offsets: IndexSet) throws {
let playerIds = offsets.compactMap { players[$0].id }
try appDatabase.deletePlayers(ids: playerIds)
}
/// Delete all players.
func deleteAllPlayers() throws {
try appDatabase.deleteAllPlayers()
}
/// Refresh all players (by performing some random changes, for demo purposes).
func refreshPlayers() async throws {
try await appDatabase.refreshPlayers()
}
/// Perform 50 refreshes in parallel, for demo purposes.
func refreshPlayersManyTimes() async throws {
try await withThrowingTaskGroup(of: Void.self) { group in
for _ in 0..<50 {
group.addTask {
try await AppDatabase.shared.refreshPlayers()
}
}
for try await _ in group { }
}
}
}
@@ -0,0 +1,76 @@
import SwiftUI
/// A view that displays a list of players.
struct PlayerListView: View {
@Bindable var model: PlayerListModel
var body: some View {
List {
ForEach(model.players, id: \.id) { player in
NavigationLink {
PlayerEditView(player: player)
} label: {
PlayerRow(player: player)
}
}
.onDelete { offsets in
try? model.deletePlayers(at: offsets)
}
}
.animation(.default, value: model.players)
.listStyle(.plain)
.navigationTitle("\(model.players.count) Players")
}
}
struct PlayerRow: View {
var player: Player
var body: some View {
HStack {
Group {
if player.name.isEmpty {
Text("Anonymous").italic()
} else {
Text(player.name)
}
}
.frame(maxWidth: .infinity, alignment: .leading)
Text("\(player.score) points")
.monospacedDigit()
.foregroundStyle(.secondary)
}
}
}
// MARK: - Previews
#Preview {
struct Preview: View {
@Environment(\.appDatabase) var appDatabase
var body: some View {
// This technique makes it possible to create an observable object
// (PlayerListModel) from the SwiftUI environment.
ContentView(appDatabase: appDatabase)
}
}
struct ContentView: View {
@State var model: PlayerListModel
init(appDatabase: AppDatabase) {
_model = State(initialValue: PlayerListModel(appDatabase: appDatabase))
}
var body: some View {
NavigationStack {
PlayerListView(model: model)
}
.onAppear { model.observePlayers() }
}
}
return Preview().appDatabase(.random())
}
@@ -0,0 +1,181 @@
import SwiftUI
/// The main navigation view.
struct PlayersNavigationView: View {
@Environment(\.appDatabase) var appDatabase
var body: some View {
// This technique makes it possible to create an observable object
// (PlayerListModel) from the SwiftUI environment.
ContentView(appDatabase: appDatabase)
}
}
private struct ContentView: View {
/// The model for the player list.
@State var model: PlayerListModel
/// Tracks the edit mode of the player list.
@State var editMode = EditMode.inactive
/// Tracks the presentation of the player creation sheet.
@State var presentsCreationSheet = false
init(appDatabase: AppDatabase) {
_model = State(initialValue: PlayerListModel(appDatabase: appDatabase))
}
var body: some View {
NavigationStack {
contentView
.toolbar { bottomBarContent }
.environment(\.editMode, $editMode)
}
.onAppear {
model.observePlayers()
}
.onChange(of: model.ordering) {
// Stop editing when ordering is modified
stopEditing()
}
.onChange(of: model.players.isEmpty) {
// Stop editing when the last player is deleted.
if model.players.isEmpty {
stopEditing()
}
}
.sheet(isPresented: $presentsCreationSheet) {
PlayerCreationSheet()
}
}
@ViewBuilder
private var contentView: some View {
if model.players.isEmpty {
emptyPlayersView
} else {
PlayerListView(model: model)
.toolbar {
ToolbarItemGroup(placement: .topBarLeading) {
presentCreationSheetButton
EditButton()
}
ToolbarItem(placement: .topBarTrailing) {
ToggleOrderingButton(ordering: $model.ordering)
}
}
}
}
private var emptyPlayersView: some View {
ContentUnavailableView {
Label("The team is empty!", systemImage: "person.slash")
} actions: {
Button("Add Player") {
presentsCreationSheet = true
}
.buttonStyle(.borderedProminent)
}
// Hide the title, but set a string anyway in order to avoid
// an odd relayout when the player list becomes empty during
// the tornado.
.navigationTitle("")
}
@ToolbarContentBuilder
private var bottomBarContent: some ToolbarContent {
ToolbarItemGroup(placement: .bottomBar) {
deleteAllButton
Spacer()
refreshButton
Spacer()
tornadoButton
}
}
private var presentCreationSheetButton: some View {
Button {
stopEditing()
presentsCreationSheet = true
} label: {
Image(systemName: "plus")
}
}
private var deleteAllButton: some View {
Button {
try? model.deleteAllPlayers()
} label: {
Image(systemName: "trash")
}
}
private var refreshButton: some View {
Button {
Task {
stopEditing()
try? await model.refreshPlayers()
}
} label: {
Image(systemName: "arrow.clockwise")
}
}
private var tornadoButton: some View {
Button {
Task {
stopEditing()
try? await model.refreshPlayersManyTimes()
}
} label: {
Image(systemName: "tornado")
}
}
private func stopEditing() {
withAnimation {
editMode = .inactive
}
}
}
private struct ToggleOrderingButton: View {
@Binding var ordering: PlayerListModel.Ordering
var body: some View {
switch ordering {
case .byName:
Button {
ordering = .byScore
} label: {
buttonLabel("Name", systemImage: "arrowtriangle.up.fill")
}
case .byScore:
Button {
ordering = .byName
} label: {
buttonLabel("Score", systemImage: "arrowtriangle.down.fill")
}
}
}
private func buttonLabel(_ title: LocalizedStringKey, systemImage: String) -> some View {
HStack {
Text(title)
Image(systemName: systemImage)
.imageScale(.medium)
}
}
}
// MARK: - Previews
#Preview("Populated") {
PlayersNavigationView()
.appDatabase(.random())
}
#Preview("Empty") {
PlayersNavigationView()
.appDatabase(.empty())
}
@@ -0,0 +1,58 @@
import Testing
import GRDB
@testable import GRDBDemo
struct AppDatabaseTests {
@Test func insert() throws {
// Given an empty database
let appDatabase = try makeEmptyTestDatabase()
// When we insert a player
var insertedPlayer = Player(name: "Arthur", score: 1000)
try appDatabase.savePlayer(&insertedPlayer)
// Then the inserted player has an id
#expect(insertedPlayer.id != nil)
// Then the inserted player exists in the database
let fetchedPlayer = try appDatabase.reader.read(Player.fetchOne)
#expect(fetchedPlayer == insertedPlayer)
}
@Test func update() throws {
// Given a database that contains a player
let appDatabase = try makeEmptyTestDatabase()
var insertedPlayer = Player(name: "Arthur", score: 1000)
try appDatabase.savePlayer(&insertedPlayer)
// When we update a player
var updatedPlayer = insertedPlayer
updatedPlayer.name = "Barbara"
updatedPlayer.score = 0
try appDatabase.savePlayer(&updatedPlayer)
// Then the player is updated
let fetchedPlayer = try appDatabase.reader.read(Player.fetchOne)
#expect(fetchedPlayer == updatedPlayer)
}
@Test func deleteAll() throws {
// Given a database that contains a player
let appDatabase = try makeEmptyTestDatabase()
var player = Player(name: "Arthur", score: 1000)
try appDatabase.savePlayer(&player)
// When we delete all players
try appDatabase.deleteAllPlayers()
// Then no player exists
let count = try appDatabase.reader.read(Player.fetchCount(_:))
#expect(count == 0)
}
/// Return an empty, in-memory, `AppDatabase`.
private func makeEmptyTestDatabase() throws -> AppDatabase {
let dbQueue = try DatabaseQueue(configuration: AppDatabase.makeConfiguration())
return try AppDatabase(dbQueue)
}
}
@@ -0,0 +1,78 @@
import Testing
import GRDB
@testable import GRDBDemo
struct PlayerListModelTests {
// MARK: - PlayerListModel.observePlayers tests
@Test(.timeLimit(.minutes(1)))
@MainActor func observation_grabs_current_database_state() async throws {
// Given a PlayerListModel on a database that contains one player
let appDatabase = try makeEmptyTestDatabase()
var player = Player(name: "Arthur", score: 1000)
try appDatabase.savePlayer(&player)
let model = PlayerListModel(appDatabase: appDatabase)
// When the model starts observing the database
model.observePlayers()
// Then the model eventually has one player.
try await pollUntil { model.players.count == 1 }
}
@Test(.timeLimit(.minutes(1)))
@MainActor func observation_grabs_database_changes() async throws {
// Given a PlayerListModel that has one player
let appDatabase = try makeEmptyTestDatabase()
var player1 = Player(name: "Arthur", score: 1000)
try appDatabase.savePlayer(&player1)
let model = PlayerListModel(appDatabase: appDatabase)
model.observePlayers()
try await pollUntil { model.players.count == 1 }
// When we insert a second player
var player2 = Player(name: "Barbara", score: 800)
try appDatabase.savePlayer(&player2)
// Then the model eventually has two players.
try await pollUntil { model.players.count == 2 }
}
@Test
@MainActor func test_deleteAllPlayers_deletes_players_in_the_database() async throws {
// Given a PlayerListModel on a database that contains a player
let appDatabase = try makeEmptyTestDatabase()
var player = Player(name: "Arthur", score: 1000)
try appDatabase.savePlayer(&player)
let model = PlayerListModel(appDatabase: appDatabase)
// When we delete all players
try model.deleteAllPlayers()
// Then the database is empty.
let playerCount = try await appDatabase.reader.read { db in
try Player.fetchCount(db)
}
#expect(playerCount == 0)
}
/// Return an empty, in-memory, `AppDatabase`.
private func makeEmptyTestDatabase() throws -> AppDatabase {
let dbQueue = try DatabaseQueue(configuration: AppDatabase.makeConfiguration())
return try AppDatabase(dbQueue)
}
/// Convenience method that loops until a condition is met.
private func pollUntil(condition: @escaping @MainActor () async -> Bool) async throws {
try await confirmation { confirmation in
while true {
if await condition() {
confirmation()
return
} else {
try await Task.sleep(for: .seconds(0.01))
}
}
}
}
}
+46
View File
@@ -0,0 +1,46 @@
GRDBDemo Application
====================
<img align="right" src="https://github.com/groue/GRDB.swift/raw/master/Documentation/DemoApps/GRDBDemo/Screenshot.png" width="50%">
**GRDBDemo demonstrates how GRDB can fuel a SwiftUI application.**
> **Note**: This demo app is not a project template. Do not copy it as a starting point for your application. Instead, create a new project, choose a GRDB [installation method](../../../README.md#installation), and use the demo as inspiration.
The topics covered in this demo are:
- How to set up a database in an iOS app.
- How to define a simple [Codable Record](../../../README.md#codable-records).
- How to track database changes and animate a SwiftUI List with [ValueObservation](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation).
- How to apply the recommendations of [Recommended Practices for Designing Record Types](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/recordrecommendedpractices).
- How to feed SwiftUI previews with a transient database.
**Files of interest:**
- [GRDBDemoApp.swift](GRDBDemo/GRDBDemoApp.swift)
`GRDBDemoApp` feeds the SwiftUI app with a database, through the SwiftUI environment.
- [AppDatabase.swift](GRDBDemo/Database/AppDatabase.swift)
`AppDatabase` is the type that grants database access. It uses [DatabaseMigrator](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasemigrator) in order to set up the database schema, and provides methods that read and write.
`AppDatabase` is [tested](GRDBDemoTests/AppDatabaseTests.swift).
- [Persistence.swift](GRDBDemo/Database/Persistence.swift)
This file instantiates `AppDatabase` instances for the various needs of the project: one database on disk for the application, and in-memory databases for SwiftUI previews.
- [Player.swift](GRDBDemo/Database/Models/Player.swift)
`Player` is a [Record](../../../README.md#records) type, able to read and write in the database. It conforms to the standard Codable protocol in order to gain all the advantages of [Codable Records](../../../README.md#codable-records).
- [PlayerListModel.swift](GRDBDemo/Views/PlayerListModel.swift)
`PlayerListModel` is an `@Observable` object that observes the database, always displays fresh values on screen, and performs actions.
`PlayerListModel` is [tested](GRDBDemoTests/PlayerListModelTests.swift).
- [PlayersNavigationView.swift](GRDBDemo/Views/PlayersNavigationView.swift)
`PlayersNavigationView` is the main navigation view of the application. It instantiates a `PlayerListModel` from the `AppDatabase` stored in the SwiftUI environment.
Binary file not shown.

After

Width:  |  Height:  |  Size: 835 KiB

@@ -1,18 +0,0 @@
{
"images" : [
{
"idiom" : "watch",
"screenWidth" : "{130,145}",
"scale" : "2x"
},
{
"idiom" : "watch",
"screenWidth" : "{146,165}",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,28 +0,0 @@
{
"assets" : [
{
"idiom" : "watch",
"filename" : "Circular.imageset",
"role" : "circular"
},
{
"idiom" : "watch",
"filename" : "Extra Large.imageset",
"role" : "extra-large"
},
{
"idiom" : "watch",
"filename" : "Modular.imageset",
"role" : "modular"
},
{
"idiom" : "watch",
"filename" : "Utilitarian.imageset",
"role" : "utilitarian"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,18 +0,0 @@
{
"images" : [
{
"idiom" : "watch",
"screenWidth" : "{130,145}",
"scale" : "2x"
},
{
"idiom" : "watch",
"screenWidth" : "{146,165}",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,18 +0,0 @@
{
"images" : [
{
"idiom" : "watch",
"screenWidth" : "{130,145}",
"scale" : "2x"
},
{
"idiom" : "watch",
"screenWidth" : "{146,165}",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,18 +0,0 @@
{
"images" : [
{
"idiom" : "watch",
"screenWidth" : "{130,145}",
"scale" : "2x"
},
{
"idiom" : "watch",
"screenWidth" : "{146,165}",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,42 +0,0 @@
import WatchKit
class ExtensionDelegate: NSObject, WKExtensionDelegate {
func applicationDidFinishLaunching() {
// Perform any final initialization of your application.
}
func applicationDidBecomeActive() {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillResignActive() {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, etc.
}
func handle(_ backgroundTasks: Set<WKRefreshBackgroundTask>) {
// Sent when the system needs to launch the application in the background to process tasks. Tasks arrive in a set, so loop through and process each one.
for task in backgroundTasks {
// Use a switch statement to check the task type
switch task {
case let backgroundTask as WKApplicationRefreshBackgroundTask:
// Be sure to complete the background task once you’re done.
backgroundTask.setTaskCompleted()
case let snapshotTask as WKSnapshotRefreshBackgroundTask:
// Snapshot tasks have a unique completion call, make sure to set your expiration date
snapshotTask.setTaskCompleted(restoredDefaultState: true, estimatedSnapshotExpiration: Date.distantFuture, userInfo: nil)
case let connectivityTask as WKWatchConnectivityRefreshBackgroundTask:
// Be sure to complete the connectivity task once you’re done.
connectivityTask.setTaskCompleted()
case let urlSessionTask as WKURLSessionRefreshBackgroundTask:
// Be sure to complete the URL session task once you’re done.
urlSessionTask.setTaskCompleted()
default:
// make sure to complete unhandled task types
task.setTaskCompleted()
}
}
}
}
@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>GRDBDemoWatchOS Extension</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>WKAppBundleIdentifier</key>
<string>com.github.groue.GRDBDemoiOS2.watchkitapp</string>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.watchkit</string>
</dict>
<key>WKExtensionDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).ExtensionDelegate</string>
</dict>
</plist>
@@ -1,16 +0,0 @@
import WatchKit
import Foundation
import GRDB
import SQLite3
class InterfaceController: WKInterfaceController {
@IBOutlet var versionLabel: WKInterfaceLabel!
override func awake(withContext context: Any?) {
super.awake(withContext: context)
let sqliteVersion = String(cString: sqlite3_libversion(), encoding: .utf8)
versionLabel.setText(sqliteVersion)
}
}
@@ -1,55 +0,0 @@
{
"images" : [
{
"size" : "24x24",
"idiom" : "watch",
"scale" : "2x",
"role" : "notificationCenter",
"subtype" : "38mm"
},
{
"size" : "27.5x27.5",
"idiom" : "watch",
"scale" : "2x",
"role" : "notificationCenter",
"subtype" : "42mm"
},
{
"size" : "29x29",
"idiom" : "watch",
"role" : "companionSettings",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "watch",
"role" : "companionSettings",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "watch",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "38mm"
},
{
"size" : "86x86",
"idiom" : "watch",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "38mm"
},
{
"size" : "98x98",
"idiom" : "watch",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "42mm"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="AgC-eL-Hgc">
<device id="watch38" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="watchOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="12029"/>
</dependencies>
<scenes>
<!--Interface Controller-->
<scene sceneID="aou-V4-d1y">
<objects>
<controller id="AgC-eL-Hgc" customClass="InterfaceController" customModule="GRDBDemoWatchOS" customModuleProvider="target">
<items>
<group width="1" alignment="left" verticalAlignment="center" layout="vertical" id="tkk-aG-QQF">
<items>
<label alignment="center" text="SQLite version" id="dGA-xX-x8V"/>
<label alignment="center" text="Label" id="whi-N6-h8U"/>
</items>
</group>
</items>
<connections>
<outlet property="versionLabel" destination="whi-N6-h8U" id="5xN-Gj-yNt"/>
</connections>
</controller>
</objects>
</scene>
</scenes>
</document>
@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>GRDBDemoiOS</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>WKCompanionAppBundleIdentifier</key>
<string>com.github.groue.GRDBDemoiOS2</string>
<key>WKWatchKitApp</key>
<true/>
</dict>
</plist>
@@ -1,849 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
56606D202355938A00185962 /* GRDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 56606D142355931F00185962 /* GRDB.framework */; };
56606D212355938A00185962 /* GRDB.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 56606D142355931F00185962 /* GRDB.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
56606D24235593AB00185962 /* GRDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 56606D182355931F00185962 /* GRDB.framework */; };
56606D25235593AB00185962 /* GRDB.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 56606D182355931F00185962 /* GRDB.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
568E5FC31E926430002582E0 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 568E5FC11E926430002582E0 /* Interface.storyboard */; };
568E5FC51E926430002582E0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 568E5FC41E926430002582E0 /* Assets.xcassets */; };
568E5FCC1E926430002582E0 /* GRDBDemoWatchOS Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 568E5FCB1E926430002582E0 /* GRDBDemoWatchOS Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
568E5FD11E926430002582E0 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 568E5FD01E926430002582E0 /* InterfaceController.swift */; };
568E5FD31E926430002582E0 /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 568E5FD21E926430002582E0 /* ExtensionDelegate.swift */; };
568E5FD51E926430002582E0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 568E5FD41E926430002582E0 /* Assets.xcassets */; };
568E5FD91E926430002582E0 /* GRDBDemoWatchOS.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 568E5FBF1E926430002582E0 /* GRDBDemoWatchOS.app */; };
56B036071E8D9EBE003B6DA4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56B036061E8D9EBE003B6DA4 /* AppDelegate.swift */; };
56B0360C1E8D9EBE003B6DA4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 56B0360A1E8D9EBE003B6DA4 /* Main.storyboard */; };
56B0360E1E8D9EBE003B6DA4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 56B0360D1E8D9EBE003B6DA4 /* Assets.xcassets */; };
56B036111E8D9EBE003B6DA4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 56B0360F1E8D9EBE003B6DA4 /* LaunchScreen.storyboard */; };
56B0361B1E8D9F38003B6DA4 /* AppDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56B036191E8D9F38003B6DA4 /* AppDatabase.swift */; };
56B0361C1E8D9F38003B6DA4 /* Player.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56B0361A1E8D9F38003B6DA4 /* Player.swift */; };
56B036231E8D9F4C003B6DA4 /* PlayerEditionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56B0361F1E8D9F4C003B6DA4 /* PlayerEditionViewController.swift */; };
56B036241E8D9F4C003B6DA4 /* PlayersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56B036201E8D9F4C003B6DA4 /* PlayersViewController.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
56606D092355931F00185962 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = DC3773F319C8CBB3004FCF85;
remoteInfo = GRDBOSX;
};
56606D0B2355931F00185962 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 56E5D7F91B4D422D00430942;
remoteInfo = GRDBOSXTests;
};
56606D0D2355931F00185962 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 560C981A1C0E22D300BF8471;
remoteInfo = GRDBOSXPerformanceTests;
};
56606D0F2355931F00185962 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 56439B501F4CA1DC0066043F;
remoteInfo = GRDBOSXPerformanceComparisonTests;
};
56606D112355931F00185962 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 56553C181C3E906C00522B5C;
remoteInfo = GRDBOSXCrashTests;
};
56606D132355931F00185962 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 56E5D7CA1B4D3FED00430942;
remoteInfo = GRDBiOS;
};
56606D152355931F00185962 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 56E5D7D31B4D3FEE00430942;
remoteInfo = GRDBiOSTests;
};
56606D172355931F00185962 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 565490A01D5A4798005622CB;
remoteInfo = GRDBWatchOS;
};
56606D192355931F00185962 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = AAA4DCFE230F1E0600C74B15;
remoteInfo = GRDBtvOS;
};
56606D1B2355931F00185962 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = AAA4DDD4230F262000C74B15;
remoteInfo = GRDBtvOSTests;
};
56606D1D2355937900185962 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 56E5D7C91B4D3FED00430942;
remoteInfo = GRDBiOS;
};
56606D22235593A300185962 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 5654909F1D5A4798005622CB;
remoteInfo = GRDBWatchOS;
};
568E5FCD1E926430002582E0 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B035FB1E8D9EBE003B6DA4 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 568E5FCA1E926430002582E0;
remoteInfo = "GRDBDemoWatchOS Extension";
};
568E5FD71E926430002582E0 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 56B035FB1E8D9EBE003B6DA4 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 568E5FBE1E926430002582E0;
remoteInfo = GRDBDemoWatchOS;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
568E5FDD1E926430002582E0 /* Embed App Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
568E5FCC1E926430002582E0 /* GRDBDemoWatchOS Extension.appex in Embed App Extensions */,
);
name = "Embed App Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
568E5FE11E926430002582E0 /* Embed Watch Content */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "$(CONTENTS_FOLDER_PATH)/Watch";
dstSubfolderSpec = 16;
files = (
568E5FD91E926430002582E0 /* GRDBDemoWatchOS.app in Embed Watch Content */,
);
name = "Embed Watch Content";
runOnlyForDeploymentPostprocessing = 0;
};
568E5FE81E926547002582E0 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
56606D25235593AB00185962 /* GRDB.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
56B036621E8D9FB1003B6DA4 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
56606D212355938A00185962 /* GRDB.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
568E5FBF1E926430002582E0 /* GRDBDemoWatchOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GRDBDemoWatchOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
568E5FC21E926430002582E0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = "<group>"; };
568E5FC41E926430002582E0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
568E5FC61E926430002582E0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
568E5FCB1E926430002582E0 /* GRDBDemoWatchOS Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "GRDBDemoWatchOS Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
568E5FD01E926430002582E0 /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = "<group>"; };
568E5FD21E926430002582E0 /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = "<group>"; };
568E5FD41E926430002582E0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
568E5FD61E926430002582E0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
56B036031E8D9EBE003B6DA4 /* GRDBDemoiOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GRDBDemoiOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
56B036061E8D9EBE003B6DA4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
56B0360B1E8D9EBE003B6DA4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
56B0360D1E8D9EBE003B6DA4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
56B036101E8D9EBE003B6DA4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
56B036121E8D9EBE003B6DA4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
56B036191E8D9F38003B6DA4 /* AppDatabase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDatabase.swift; sourceTree = "<group>"; };
56B0361A1E8D9F38003B6DA4 /* Player.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Player.swift; sourceTree = "<group>"; };
56B0361F1E8D9F4C003B6DA4 /* PlayerEditionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlayerEditionViewController.swift; sourceTree = "<group>"; };
56B036201E8D9F4C003B6DA4 /* PlayersViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlayersViewController.swift; sourceTree = "<group>"; };
56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GRDB.xcodeproj; path = ../../../GRDB.xcodeproj; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
568E5FC81E926430002582E0 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
56606D24235593AB00185962 /* GRDB.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
56B036001E8D9EBE003B6DA4 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
56606D202355938A00185962 /* GRDB.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
56606CFD2355931F00185962 /* Products */ = {
isa = PBXGroup;
children = (
56606D0A2355931F00185962 /* GRDB.framework */,
56606D0C2355931F00185962 /* GRDBOSXTests.xctest */,
56606D0E2355931F00185962 /* GRDBOSXPerformanceTests.xctest */,
56606D102355931F00185962 /* GRDBOSXPerformanceComparisonTests.xctest */,
56606D122355931F00185962 /* GRDBOSXCrashTests.xctest */,
56606D142355931F00185962 /* GRDB.framework */,
56606D162355931F00185962 /* GRDBiOSTests.xctest */,
56606D182355931F00185962 /* GRDB.framework */,
56606D1A2355931F00185962 /* GRDB.framework */,
56606D1C2355931F00185962 /* GRDBtvOSTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
56606D1F2355938A00185962 /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
568E5FC01E926430002582E0 /* GRDBDemoWatchOS */ = {
isa = PBXGroup;
children = (
568E5FC11E926430002582E0 /* Interface.storyboard */,
568E5FC41E926430002582E0 /* Assets.xcassets */,
568E5FC61E926430002582E0 /* Info.plist */,
);
path = GRDBDemoWatchOS;
sourceTree = "<group>";
};
568E5FCF1E926430002582E0 /* GRDBDemoWatchOS Extension */ = {
isa = PBXGroup;
children = (
568E5FD01E926430002582E0 /* InterfaceController.swift */,
568E5FD21E926430002582E0 /* ExtensionDelegate.swift */,
568E5FD41E926430002582E0 /* Assets.xcassets */,
568E5FD61E926430002582E0 /* Info.plist */,
);
path = "GRDBDemoWatchOS Extension";
sourceTree = "<group>";
};
56B035FA1E8D9EBE003B6DA4 = {
isa = PBXGroup;
children = (
56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */,
56B036051E8D9EBE003B6DA4 /* GRDBDemoiOS */,
568E5FC01E926430002582E0 /* GRDBDemoWatchOS */,
568E5FCF1E926430002582E0 /* GRDBDemoWatchOS Extension */,
56B036041E8D9EBE003B6DA4 /* Products */,
56606D1F2355938A00185962 /* Frameworks */,
);
sourceTree = "<group>";
};
56B036041E8D9EBE003B6DA4 /* Products */ = {
isa = PBXGroup;
children = (
56B036031E8D9EBE003B6DA4 /* GRDBDemoiOS.app */,
568E5FBF1E926430002582E0 /* GRDBDemoWatchOS.app */,
568E5FCB1E926430002582E0 /* GRDBDemoWatchOS Extension.appex */,
);
name = Products;
sourceTree = "<group>";
};
56B036051E8D9EBE003B6DA4 /* GRDBDemoiOS */ = {
isa = PBXGroup;
children = (
56B036061E8D9EBE003B6DA4 /* AppDelegate.swift */,
56B036191E8D9F38003B6DA4 /* AppDatabase.swift */,
56B0361A1E8D9F38003B6DA4 /* Player.swift */,
56B0361F1E8D9F4C003B6DA4 /* PlayerEditionViewController.swift */,
56B036201E8D9F4C003B6DA4 /* PlayersViewController.swift */,
56B0360A1E8D9EBE003B6DA4 /* Main.storyboard */,
56B0360D1E8D9EBE003B6DA4 /* Assets.xcassets */,
56B0360F1E8D9EBE003B6DA4 /* LaunchScreen.storyboard */,
56B036121E8D9EBE003B6DA4 /* Info.plist */,
);
path = GRDBDemoiOS;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
568E5FBE1E926430002582E0 /* GRDBDemoWatchOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 568E5FDE1E926430002582E0 /* Build configuration list for PBXNativeTarget "GRDBDemoWatchOS" */;
buildPhases = (
568E5FBD1E926430002582E0 /* Resources */,
568E5FDD1E926430002582E0 /* Embed App Extensions */,
);
buildRules = (
);
dependencies = (
568E5FCE1E926430002582E0 /* PBXTargetDependency */,
);
name = GRDBDemoWatchOS;
productName = GRDBDemoWatchOS;
productReference = 568E5FBF1E926430002582E0 /* GRDBDemoWatchOS.app */;
productType = "com.apple.product-type.application.watchapp2";
};
568E5FCA1E926430002582E0 /* GRDBDemoWatchOS Extension */ = {
isa = PBXNativeTarget;
buildConfigurationList = 568E5FDA1E926430002582E0 /* Build configuration list for PBXNativeTarget "GRDBDemoWatchOS Extension" */;
buildPhases = (
568E5FC71E926430002582E0 /* Sources */,
568E5FC81E926430002582E0 /* Frameworks */,
568E5FC91E926430002582E0 /* Resources */,
568E5FE81E926547002582E0 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
56606D23235593A300185962 /* PBXTargetDependency */,
);
name = "GRDBDemoWatchOS Extension";
productName = "GRDBDemoWatchOS Extension";
productReference = 568E5FCB1E926430002582E0 /* GRDBDemoWatchOS Extension.appex */;
productType = "com.apple.product-type.watchkit2-extension";
};
56B036021E8D9EBE003B6DA4 /* GRDBDemoiOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 56B036151E8D9EBE003B6DA4 /* Build configuration list for PBXNativeTarget "GRDBDemoiOS" */;
buildPhases = (
56B035FF1E8D9EBE003B6DA4 /* Sources */,
56B036001E8D9EBE003B6DA4 /* Frameworks */,
56B036011E8D9EBE003B6DA4 /* Resources */,
56B036621E8D9FB1003B6DA4 /* Embed Frameworks */,
568E5FE11E926430002582E0 /* Embed Watch Content */,
);
buildRules = (
);
dependencies = (
56606D1E2355937900185962 /* PBXTargetDependency */,
568E5FD81E926430002582E0 /* PBXTargetDependency */,
);
name = GRDBDemoiOS;
productName = GRDBDemoiOS;
productReference = 56B036031E8D9EBE003B6DA4 /* GRDBDemoiOS.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
56B035FB1E8D9EBE003B6DA4 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Gwendal Roué";
TargetAttributes = {
568E5FBE1E926430002582E0 = {
CreatedOnToolsVersion = 8.3;
DevelopmentTeam = AMD8W895CT;
ProvisioningStyle = Automatic;
};
568E5FCA1E926430002582E0 = {
CreatedOnToolsVersion = 8.3;
DevelopmentTeam = AMD8W895CT;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
56B036021E8D9EBE003B6DA4 = {
CreatedOnToolsVersion = 8.3;
DevelopmentTeam = AMD8W895CT;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 56B035FE1E8D9EBE003B6DA4 /* Build configuration list for PBXProject "GRDBDemoiOS" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 56B035FA1E8D9EBE003B6DA4;
productRefGroup = 56B036041E8D9EBE003B6DA4 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 56606CFD2355931F00185962 /* Products */;
ProjectRef = 56B036261E8D9F79003B6DA4 /* GRDB.xcodeproj */;
},
);
projectRoot = "";
targets = (
56B036021E8D9EBE003B6DA4 /* GRDBDemoiOS */,
568E5FBE1E926430002582E0 /* GRDBDemoWatchOS */,
568E5FCA1E926430002582E0 /* GRDBDemoWatchOS Extension */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
56606D0A2355931F00185962 /* GRDB.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = GRDB.framework;
remoteRef = 56606D092355931F00185962 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
56606D0C2355931F00185962 /* GRDBOSXTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = GRDBOSXTests.xctest;
remoteRef = 56606D0B2355931F00185962 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
56606D0E2355931F00185962 /* GRDBOSXPerformanceTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = GRDBOSXPerformanceTests.xctest;
remoteRef = 56606D0D2355931F00185962 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
56606D102355931F00185962 /* GRDBOSXPerformanceComparisonTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = GRDBOSXPerformanceComparisonTests.xctest;
remoteRef = 56606D0F2355931F00185962 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
56606D122355931F00185962 /* GRDBOSXCrashTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = GRDBOSXCrashTests.xctest;
remoteRef = 56606D112355931F00185962 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
56606D142355931F00185962 /* GRDB.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = GRDB.framework;
remoteRef = 56606D132355931F00185962 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
56606D162355931F00185962 /* GRDBiOSTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = GRDBiOSTests.xctest;
remoteRef = 56606D152355931F00185962 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
56606D182355931F00185962 /* GRDB.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = GRDB.framework;
remoteRef = 56606D172355931F00185962 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
56606D1A2355931F00185962 /* GRDB.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = GRDB.framework;
remoteRef = 56606D192355931F00185962 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
56606D1C2355931F00185962 /* GRDBtvOSTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = GRDBtvOSTests.xctest;
remoteRef = 56606D1B2355931F00185962 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
568E5FBD1E926430002582E0 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
568E5FC51E926430002582E0 /* Assets.xcassets in Resources */,
568E5FC31E926430002582E0 /* Interface.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
568E5FC91E926430002582E0 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
568E5FD51E926430002582E0 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
56B036011E8D9EBE003B6DA4 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
56B036111E8D9EBE003B6DA4 /* LaunchScreen.storyboard in Resources */,
56B0360E1E8D9EBE003B6DA4 /* Assets.xcassets in Resources */,
56B0360C1E8D9EBE003B6DA4 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
568E5FC71E926430002582E0 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
568E5FD31E926430002582E0 /* ExtensionDelegate.swift in Sources */,
568E5FD11E926430002582E0 /* InterfaceController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
56B035FF1E8D9EBE003B6DA4 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
56B0361C1E8D9F38003B6DA4 /* Player.swift in Sources */,
56B0361B1E8D9F38003B6DA4 /* AppDatabase.swift in Sources */,
56B036071E8D9EBE003B6DA4 /* AppDelegate.swift in Sources */,
56B036241E8D9F4C003B6DA4 /* PlayersViewController.swift in Sources */,
56B036231E8D9F4C003B6DA4 /* PlayerEditionViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
56606D1E2355937900185962 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = GRDBiOS;
targetProxy = 56606D1D2355937900185962 /* PBXContainerItemProxy */;
};
56606D23235593A300185962 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = GRDBWatchOS;
targetProxy = 56606D22235593A300185962 /* PBXContainerItemProxy */;
};
568E5FCE1E926430002582E0 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 568E5FCA1E926430002582E0 /* GRDBDemoWatchOS Extension */;
targetProxy = 568E5FCD1E926430002582E0 /* PBXContainerItemProxy */;
};
568E5FD81E926430002582E0 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 568E5FBE1E926430002582E0 /* GRDBDemoWatchOS */;
targetProxy = 568E5FD71E926430002582E0 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
568E5FC11E926430002582E0 /* Interface.storyboard */ = {
isa = PBXVariantGroup;
children = (
568E5FC21E926430002582E0 /* Base */,
);
name = Interface.storyboard;
sourceTree = "<group>";
};
56B0360A1E8D9EBE003B6DA4 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
56B0360B1E8D9EBE003B6DA4 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
56B0360F1E8D9EBE003B6DA4 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
56B036101E8D9EBE003B6DA4 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
568E5FDB1E926430002582E0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CLANG_ENABLE_OBJC_WEAK = YES;
DEVELOPMENT_TEAM = AMD8W895CT;
INFOPLIST_FILE = "GRDBDemoWatchOS Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemoiOS2.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 3.2;
};
name = Debug;
};
568E5FDC1E926430002582E0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CLANG_ENABLE_OBJC_WEAK = YES;
DEVELOPMENT_TEAM = AMD8W895CT;
INFOPLIST_FILE = "GRDBDemoWatchOS Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemoiOS2.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 3.2;
};
name = Release;
};
568E5FDF1E926430002582E0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_OBJC_WEAK = YES;
DEVELOPMENT_TEAM = AMD8W895CT;
IBSC_MODULE = GRDBDemoWatchOS_Extension;
INFOPLIST_FILE = GRDBDemoWatchOS/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemoiOS2.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 3.2;
};
name = Debug;
};
568E5FE01E926430002582E0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_OBJC_WEAK = YES;
DEVELOPMENT_TEAM = AMD8W895CT;
IBSC_MODULE = GRDBDemoWatchOS_Extension;
INFOPLIST_FILE = GRDBDemoWatchOS/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemoiOS2.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 3.2;
};
name = Release;
};
56B036131E8D9EBE003B6DA4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
56B036141E8D9EBE003B6DA4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
56B036161E8D9EBE003B6DA4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_OBJC_WEAK = YES;
DEVELOPMENT_TEAM = AMD8W895CT;
INFOPLIST_FILE = GRDBDemoiOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemoiOS2;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
56B036171E8D9EBE003B6DA4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_OBJC_WEAK = YES;
DEVELOPMENT_TEAM = AMD8W895CT;
INFOPLIST_FILE = GRDBDemoiOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemoiOS2;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
568E5FDA1E926430002582E0 /* Build configuration list for PBXNativeTarget "GRDBDemoWatchOS Extension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
568E5FDB1E926430002582E0 /* Debug */,
568E5FDC1E926430002582E0 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
568E5FDE1E926430002582E0 /* Build configuration list for PBXNativeTarget "GRDBDemoWatchOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
568E5FDF1E926430002582E0 /* Debug */,
568E5FE01E926430002582E0 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
56B035FE1E8D9EBE003B6DA4 /* Build configuration list for PBXProject "GRDBDemoiOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
56B036131E8D9EBE003B6DA4 /* Debug */,
56B036141E8D9EBE003B6DA4 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
56B036151E8D9EBE003B6DA4 /* Build configuration list for PBXNativeTarget "GRDBDemoiOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
56B036161E8D9EBE003B6DA4 /* Debug */,
56B036171E8D9EBE003B6DA4 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 56B035FB1E8D9EBE003B6DA4 /* Project object */;
}
@@ -1,128 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "568E5FBE1E926430002582E0"
BuildableName = "GRDBDemoWatchOS.app"
BlueprintName = "GRDBDemoWatchOS"
ReferencedContainer = "container:GRDBDemoiOS.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "56B036021E8D9EBE003B6DA4"
BuildableName = "GRDBDemoiOS.app"
BlueprintName = "GRDBDemoiOS"
ReferencedContainer = "container:GRDBDemoiOS.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "568E5FCA1E926430002582E0"
BuildableName = "GRDBDemoWatchOS Extension.appex"
BlueprintName = "GRDBDemoWatchOS Extension"
ReferencedContainer = "container:GRDBDemoiOS.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "568E5FBE1E926430002582E0"
BuildableName = "GRDBDemoWatchOS.app"
BlueprintName = "GRDBDemoWatchOS"
ReferencedContainer = "container:GRDBDemoiOS.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.carousel"
RemotePath = "/GRDBDemoiOS">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "568E5FBE1E926430002582E0"
BuildableName = "GRDBDemoWatchOS.app"
BlueprintName = "GRDBDemoWatchOS"
ReferencedContainer = "container:GRDBDemoiOS.xcodeproj">
</BuildableReference>
</RemoteRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.carousel"
RemotePath = "/GRDBDemoiOS">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "568E5FBE1E926430002582E0"
BuildableName = "GRDBDemoWatchOS.app"
BlueprintName = "GRDBDemoWatchOS"
ReferencedContainer = "container:GRDBDemoiOS.xcodeproj">
</BuildableReference>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "568E5FBE1E926430002582E0"
BuildableName = "GRDBDemoWatchOS.app"
BlueprintName = "GRDBDemoWatchOS"
ReferencedContainer = "container:GRDBDemoiOS.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -1,56 +0,0 @@
import GRDB
/// A type responsible for initializing the application database.
///
/// See AppDelegate.setupDatabase()
struct AppDatabase {
/// Creates a fully initialized database at path
static func openDatabase(atPath path: String) throws -> DatabaseQueue {
// Connect to the database
// See https://github.com/groue/GRDB.swift/blob/master/README.md#database-connections
let dbQueue = try DatabaseQueue(path: path)
// Define the database schema
try migrator.migrate(dbQueue)
return dbQueue
}
/// The DatabaseMigrator that defines the database schema.
///
/// See https://github.com/groue/GRDB.swift/blob/master/README.md#migrations
static var migrator: DatabaseMigrator {
var migrator = DatabaseMigrator()
migrator.registerMigration("createPlayer") { db in
// Create a table
// See https://github.com/groue/GRDB.swift#create-tables
try db.create(table: "player") { t in
t.autoIncrementedPrimaryKey("id")
// Sort player names in a localized case insensitive fashion by default
// See https://github.com/groue/GRDB.swift/blob/master/README.md#unicode
t.column("name", .text).notNull().collate(.localizedCaseInsensitiveCompare)
t.column("score", .integer).notNull()
}
}
migrator.registerMigration("fixtures") { db in
// Populate the players table with random data
for _ in 0..<8 {
var player = Player(id: nil, name: Player.randomName(), score: Player.randomScore())
try player.insert(db)
}
}
// // Migrations for future application versions will be inserted here:
// migrator.registerMigration(...) { db in
// ...
// }
return migrator
}
}
@@ -1,22 +0,0 @@
import UIKit
import GRDB
// The shared database queue
var dbQueue: DatabaseQueue!
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
try! setupDatabase(application)
return true
}
private func setupDatabase(_ application: UIApplication) throws {
let databaseURL = try FileManager.default
.url(for: .applicationSupportDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
.appendingPathComponent("db.sqlite")
dbQueue = try AppDatabase.openDatabase(atPath: databaseURL.path)
}
}
@@ -1,116 +0,0 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon_20pt@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon_20pt@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon_29pt@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon_29pt@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon_40pt@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon_40pt@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon_60pt@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon_60pt@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "icon_20pt.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "icon_20pt@2x-1.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon_29pt.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon_29pt@2x-1.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon_40pt.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon_40pt@2x-1.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon_76pt.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon_76pt@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "icon_83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

@@ -1,195 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="UAh-8N-CM8">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Player Edition View Controller-->
<scene sceneID="Juk-Ad-tZ2">
<objects>
<tableViewController id="iNr-Oe-muq" customClass="PlayerEditionViewController" customModule="GRDBDemoiOS" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" dataMode="static" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="vlV-lc-eQA">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<sections>
<tableViewSection id="Nzq-eO-jT3">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="2gb-gB-918">
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="2gb-gB-918" id="iyM-TJ-JB4">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalCompressionResistancePriority="250" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Name" adjustsFontForContentSizeCategory="YES" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="m5m-Zs-j0z">
<rect key="frame" x="16" y="11.5" width="343" height="21"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<textInputTraits key="textInputTraits" autocapitalizationType="words" autocorrectionType="no" spellCheckingType="no" returnKeyType="next"/>
<connections>
<outlet property="delegate" destination="iNr-Oe-muq" id="K2p-7d-teD"/>
</connections>
</textField>
</subviews>
<constraints>
<constraint firstItem="m5m-Zs-j0z" firstAttribute="leading" secondItem="iyM-TJ-JB4" secondAttribute="leadingMargin" id="9cK-nj-70V"/>
<constraint firstAttribute="trailingMargin" secondItem="m5m-Zs-j0z" secondAttribute="trailing" id="JsE-8v-XAS"/>
<constraint firstItem="m5m-Zs-j0z" firstAttribute="centerY" secondItem="iyM-TJ-JB4" secondAttribute="centerY" id="psG-tW-QrM"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="vp3-Ft-Gth">
<rect key="frame" x="0.0" y="72" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="vp3-Ft-Gth" id="ccO-0O-u72">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalCompressionResistancePriority="250" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Score" adjustsFontForContentSizeCategory="YES" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="rZ9-Fa-cyr">
<rect key="frame" x="16" y="11.5" width="343" height="21"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" keyboardType="numberPad" returnKeyType="done"/>
</textField>
</subviews>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="rZ9-Fa-cyr" secondAttribute="trailing" id="Gso-FU-Ct1"/>
<constraint firstItem="rZ9-Fa-cyr" firstAttribute="centerY" secondItem="ccO-0O-u72" secondAttribute="centerY" id="UqA-ea-emb"/>
<constraint firstItem="rZ9-Fa-cyr" firstAttribute="leading" secondItem="ccO-0O-u72" secondAttribute="leadingMargin" id="WrY-St-72v"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="iNr-Oe-muq" id="67O-XE-MeV"/>
<outlet property="delegate" destination="iNr-Oe-muq" id="vLD-QQ-zR2"/>
</connections>
</tableView>
<toolbarItems/>
<navigationItem key="navigationItem" id="U4g-xG-W8b">
<barButtonItem key="leftBarButtonItem" systemItem="cancel" id="VIN-Hi-Twt">
<connections>
<segue destination="lTz-K0-aRY" kind="unwind" unwindAction="cancelPlayerEdition:" id="fOs-ol-qJL"/>
</connections>
</barButtonItem>
<barButtonItem key="rightBarButtonItem" style="done" systemItem="done" id="2um-u5-BhV">
<connections>
<segue destination="lTz-K0-aRY" kind="unwind" identifier="Commit" unwindAction="commitPlayerEdition:" id="Y1E-dI-wcl"/>
</connections>
</barButtonItem>
</navigationItem>
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
<connections>
<outlet property="cancelBarButtonItem" destination="VIN-Hi-Twt" id="dET-mF-ZXe"/>
<outlet property="commitBarButtonItem" destination="2um-u5-BhV" id="Jym-us-zdP"/>
<outlet property="nameCell" destination="2gb-gB-918" id="ch2-MB-uRm"/>
<outlet property="nameTextField" destination="m5m-Zs-j0z" id="A6a-pw-q8s"/>
<outlet property="scoreCell" destination="vp3-Ft-Gth" id="b8A-42-8Dw"/>
<outlet property="scoreTextField" destination="rZ9-Fa-cyr" id="4kw-gV-uih"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="fNC-Ls-uRw" userLabel="First Responder" sceneMemberID="firstResponder"/>
<exit id="lTz-K0-aRY" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="1134" y="2891"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="2KX-IU-Z5Q">
<objects>
<navigationController id="ein-Sr-i8w" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="zIT-dB-Mfo">
<rect key="frame" x="0.0" y="0.0" width="375" height="56"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="iNr-Oe-muq" kind="relationship" relationship="rootViewController" id="e5b-3U-9Vz"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="kNr-vk-I5l" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1134" y="2071"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="N1X-4j-Re4">
<objects>
<navigationController id="UAh-8N-CM8" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="U7d-1C-GnL">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="PJp-Eq-ZjA" kind="relationship" relationship="rootViewController" id="klT-ZP-gtX"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="sVt-e9-ghQ" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-459" y="2071"/>
</scene>
<!--Hall Of Fame-->
<scene sceneID="9su-ms-vdJ">
<objects>
<tableViewController id="PJp-Eq-ZjA" customClass="PlayersViewController" customModule="GRDBDemoiOS" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" id="tX0-ON-WSI">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="Player" textLabel="G8y-VE-YRu" detailTextLabel="NNc-J4-xiE" style="IBUITableViewCellStyleValue1" id="bFj-Hd-fwd">
<rect key="frame" x="0.0" y="28" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="bFj-Hd-fwd" id="kDf-TZ-xhb">
<rect key="frame" x="0.0" y="0.0" width="348" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="G8y-VE-YRu">
<rect key="frame" x="16" y="12" width="33.5" height="20.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Detail" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="NNc-J4-xiE">
<rect key="frame" x="296" y="12" width="44" height="20.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" systemColor="secondaryLabelColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="iNr-Oe-muq" kind="show" identifier="Edit" id="Lgu-Yd-HSy"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="PJp-Eq-ZjA" id="MkQ-WQ-sTh"/>
<outlet property="delegate" destination="PJp-Eq-ZjA" id="quj-Sp-DuL"/>
</connections>
</tableView>
<toolbarItems>
<barButtonItem title="Item" id="hMF-Rv-dAe"/>
</toolbarItems>
<navigationItem key="navigationItem" title="Hall Of Fame" id="QIv-M6-kT1">
<barButtonItem key="leftBarButtonItem" systemItem="add" id="2bK-Fl-55Q">
<connections>
<segue destination="ein-Sr-i8w" kind="presentation" identifier="New" id="ehP-ZN-Nt4"/>
</connections>
</barButtonItem>
</navigationItem>
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
<connections>
<outlet property="newPlayerButtonItem" destination="2bK-Fl-55Q" id="O9m-8s-oRL"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="af5-Qo-AkD" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="348" y="2071"/>
</scene>
</scenes>
<inferredMetricsTieBreakers>
<segue reference="Lgu-Yd-HSy"/>
</inferredMetricsTieBreakers>
</document>
@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
@@ -1,66 +0,0 @@
import GRDB
// A plain Player struct
struct Player {
// Prefer Int64 for auto-incremented database ids
var id: Int64?
var name: String
var score: Int
}
// Hashable conformance supports tableView diffing
extension Player: Hashable { }
// MARK: - Persistence
// Turn Player into a Codable Record.
// See https://github.com/groue/GRDB.swift/blob/master/README.md#records
extension Player: Codable, FetchableRecord, MutablePersistableRecord {
// Define database columns from CodingKeys
private enum Columns {
static let id = Column(CodingKeys.id)
static let name = Column(CodingKeys.name)
static let score = Column(CodingKeys.score)
}
// Update a player id after it has been inserted in the database.
mutating func didInsert(with rowID: Int64, for column: String?) {
id = rowID
}
}
// MARK: - Database access
// Define some useful player requests.
// See https://github.com/groue/GRDB.swift/blob/master/README.md#requests
extension Player {
static func orderedByName() -> QueryInterfaceRequest<Player> {
return Player.order(Columns.name)
}
static func orderedByScore() -> QueryInterfaceRequest<Player> {
return Player.order(Columns.score.desc, Columns.name)
}
}
// MARK: - Player Randomization
extension Player {
private static let names = [
"Arthur", "Anita", "Barbara", "Bernard", "Craig", "Chiara", "David",
"Dean", "Éric", "Elena", "Fatima", "Frederik", "Gilbert", "Georgette",
"Henriette", "Hassan", "Ignacio", "Irene", "Julie", "Jack", "Karl",
"Kristel", "Louis", "Liz", "Masashi", "Mary", "Noam", "Nicole",
"Ophelie", "Oleg", "Pascal", "Patricia", "Quentin", "Quinn", "Raoul",
"Rachel", "Stephan", "Susie", "Tristan", "Tatiana", "Ursule", "Urbain",
"Victor", "Violette", "Wilfried", "Wilhelmina", "Yvon", "Yann",
"Zazie", "Zoé"]
static func randomName() -> String {
return names.randomElement()!
}
static func randomScore() -> Int {
return 10 * Int.random(in: 0...100)
}
}
@@ -1,121 +0,0 @@
import UIKit
class PlayerEditionViewController: UITableViewController {
enum Presentation {
/// Modal presentation: edition ends with the "Commit" segue.
case modal
/// Push presentation: edition ends when user hits the back button.
case push
}
var player: Player! { didSet { configureView() } }
var presentation: Presentation! { didSet { configureView() } }
@IBOutlet fileprivate weak var cancelBarButtonItem: UIBarButtonItem!
@IBOutlet fileprivate weak var commitBarButtonItem: UIBarButtonItem!
@IBOutlet fileprivate weak var nameCell: UITableViewCell!
@IBOutlet fileprivate weak var nameTextField: UITextField!
@IBOutlet fileprivate weak var scoreCell: UITableViewCell!
@IBOutlet fileprivate weak var scoreTextField: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
configureView()
}
fileprivate func configureView() {
guard isViewLoaded else { return }
nameTextField.text = player.name
if player.score == 0 && player.id == nil {
scoreTextField.text = ""
} else {
scoreTextField.text = "\(player.score)"
}
switch presentation! {
case .modal:
navigationItem.leftBarButtonItem = cancelBarButtonItem
navigationItem.rightBarButtonItem = commitBarButtonItem
case .push:
navigationItem.leftBarButtonItem = nil
navigationItem.rightBarButtonItem = nil
}
}
}
// MARK: - Navigation
extension PlayerEditionViewController {
override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool {
// Force keyboard to dismiss early
view.endEditing(true)
return true
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "Commit" {
saveChanges()
}
}
override func willMove(toParent parent: UIViewController?) {
super.willMove(toParent: parent)
switch presentation! {
case .modal:
break
case .push:
if parent == nil {
// Self is popping from its navigation controller
saveChanges()
}
}
}
}
// MARK: - Form
extension PlayerEditionViewController: UITextFieldDelegate {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
nameTextField.becomeFirstResponder()
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: false)
let cell = tableView.cellForRow(at: indexPath)
if cell === nameCell {
nameTextField.becomeFirstResponder()
} else if cell === scoreCell {
scoreTextField.becomeFirstResponder()
}
}
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
if textField == nameTextField {
scoreTextField.becomeFirstResponder()
}
return false
}
private func saveChanges() {
guard var player = self.player else {
return
}
player.name = nameTextField.text ?? ""
player.score = scoreTextField.text.flatMap { Int($0) } ?? 0
self.player = player
try! dbQueue.inDatabase { db in
try player.save(db)
}
}
}
@@ -1,266 +0,0 @@
import UIKit
import GRDB
/// PlayersViewController displays the list of players.
class PlayersViewController: UITableViewController {
private enum PlayerOrdering {
case byName
case byScore
}
@IBOutlet private weak var newPlayerButtonItem: UIBarButtonItem!
private var players: [Player] = []
private var playersObserver: TransactionObserver?
private var playerCountObserver: TransactionObserver?
private var playerOrdering: PlayerOrdering = .byScore {
didSet {
configureOrderingBarButtonItem()
configureTableView()
}
}
private var playersRequest: QueryInterfaceRequest<Player> {
switch playerOrdering {
case .byName:
return Player.orderedByName()
case .byScore:
return Player.orderedByScore()
}
}
override func viewDidLoad() {
super.viewDidLoad()
configureToolbar()
configureNavigationItem()
configureTableView()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.isToolbarHidden = false
}
private func configureToolbar() {
toolbarItems = [
UIBarButtonItem(barButtonSystemItem: .trash, target: self, action: #selector(deletePlayers)),
UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil),
UIBarButtonItem(barButtonSystemItem: .refresh, target: self, action: #selector(refresh)),
UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil),
UIBarButtonItem(title: "💣", style: .plain, target: self, action: #selector(stressTest)),
]
}
private func configureNavigationItem() {
navigationItem.leftBarButtonItems = [editButtonItem, newPlayerButtonItem]
configureOrderingBarButtonItem()
configureTitle()
}
private func configureOrderingBarButtonItem() {
switch playerOrdering {
case .byScore:
navigationItem.rightBarButtonItem = UIBarButtonItem(
title: "Score ▼",
style: .plain,
target: self, action: #selector(sortByName))
case .byName:
navigationItem.rightBarButtonItem = UIBarButtonItem(
title: "Name ▲",
style: .plain,
target: self, action: #selector(sortByScore))
}
}
private func configureTitle() {
// Track changes in the number of players
let observation = ValueObservation.tracking { db in
try Player.fetchCount(db)
}
playerCountObserver = observation.start(
in: dbQueue,
onError: { error in
fatalError("Unexpected error: \(error)")
},
onChange: { [weak self] count in
guard let self = self else { return }
switch count {
case 0: self.navigationItem.title = "No Player"
case 1: self.navigationItem.title = "1 Player"
default: self.navigationItem.title = "\(count) Players"
}
})
}
private func configureTableView() {
// Track changes in the list of players
let request = self.playersRequest
let observation = ValueObservation.tracking { db in
try request.fetchAll(db)
}
playersObserver = observation.start(
in: dbQueue,
onError: { error in
fatalError("Unexpected error: \(error)")
},
onChange: { [weak self] players in
guard let self = self else { return }
// Compute difference between current and new list of players
let difference = players
.difference(from: self.players)
.inferringMoves()
// Apply those changes to the table view
self.tableView.performBatchUpdates({
self.players = players
for change in difference {
switch change {
case let .remove(offset, _, associatedWith):
if let associatedWith = associatedWith {
self.tableView.moveRow(
at: IndexPath(row: offset, section: 0),
to: IndexPath(row: associatedWith, section: 0))
} else {
self.tableView.deleteRows(
at: [IndexPath(row: offset, section: 0)],
with: .fade)
}
case let .insert(offset, _, associatedWith):
if associatedWith == nil {
self.tableView.insertRows(
at: [IndexPath(row: offset, section: 0)],
with: .fade)
}
}
}
}, completion: nil)
})
}
}
// MARK: - Navigation
extension PlayersViewController {
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "Edit" {
let player = players[tableView.indexPathForSelectedRow!.row]
let controller = segue.destination as! PlayerEditionViewController
controller.title = player.name
controller.player = player
controller.presentation = .push
}
else if segue.identifier == "New" {
setEditing(false, animated: true)
let navigationController = segue.destination as! UINavigationController
let controller = navigationController.viewControllers.first as! PlayerEditionViewController
controller.title = "New Player"
controller.player = Player(id: nil, name: "", score: 0)
controller.presentation = .modal
}
}
@IBAction func cancelPlayerEdition(_ segue: UIStoryboardSegue) {
// Player creation cancelled
}
@IBAction func commitPlayerEdition(_ segue: UIStoryboardSegue) {
// Player creation committed
}
}
// MARK: - UITableViewDataSource
extension PlayersViewController {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return players.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Player", for: indexPath)
configure(cell, at: indexPath)
return cell
}
override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
// Delete the player
let player = players[indexPath.row]
try! dbQueue.write { db in
_ = try player.delete(db)
}
}
private func configure(_ cell: UITableViewCell, at indexPath: IndexPath) {
let player = players[indexPath.row]
if player.name.isEmpty {
cell.textLabel?.text = "-"
} else {
cell.textLabel?.text = player.name
}
cell.detailTextLabel?.text = abs(player.score) > 1 ? "\(player.score) points" : "0 point"
}
}
// MARK: - Actions
extension PlayersViewController {
@IBAction func sortByName() {
setEditing(false, animated: true)
playerOrdering = .byName
}
@IBAction func sortByScore() {
setEditing(false, animated: true)
playerOrdering = .byScore
}
@IBAction func deletePlayers() {
setEditing(false, animated: true)
try! dbQueue.write { db in
_ = try Player.deleteAll(db)
}
}
@IBAction func refresh() {
setEditing(false, animated: true)
refreshPlayers()
}
@IBAction func stressTest() {
setEditing(false, animated: true)
for _ in 0..<50 {
DispatchQueue.global().async {
self.refreshPlayers()
}
}
}
private func refreshPlayers() {
try! dbQueue.write { db in
if try Player.fetchCount(db) == 0 {
// Insert new random players
for _ in 0..<8 {
var player = Player(id: nil, name: Player.randomName(), score: Player.randomScore())
try player.insert(db)
}
} else {
// Insert a player
if Bool.random() {
var player = Player(id: nil, name: Player.randomName(), score: Player.randomScore())
try player.insert(db)
}
// Delete a random player
if Bool.random() {
try Player.order(sql: "RANDOM()").limit(1).deleteAll(db)
}
// Update some players
for var player in try Player.fetchAll(db) where Bool.random() {
player.score = Player.randomScore()
try player.update(db)
}
}
}
}
}
@@ -1,32 +0,0 @@
Demo Application
================
<img align="right" src="https://github.com/groue/GRDB.swift/raw/master/Documentation/Images/GRDBDemoScreenshot.png" width="50%">
**This demo application shows you:**
- how to setup a database in an iOS app
- how to define a simple [Codable Record](../../README.md#codable-records)
- how to track database changes and animate a table view with [ValueObservation](../../README.md#valueobservation).
**Files of interest:**
- [AppDelegate.swift](GRDBDemoiOS/AppDelegate.swift)
`AppDelegate` creates, on application startup, a unique instance of [DatabaseQueue](../../README.md#database-queues) available for the whole application.
- [AppDatabase.swift](GRDBDemoiOS/AppDatabase.swift)
`AppDatabase` defines the database for the whole application. It uses [DatabaseMigrator](../../README.md#migrations) in order to setup the database schema.
- [Player.swift](GRDBDemoiOS/Player.swift)
`Player` is a [Record](../../README.md#records) type, able to read and write in the database. It conforms to the standard Codable protocol in order to gain all advantages of [Codable Records](../../README.md#codable-records).
- [PlayersViewController.swift](GRDBDemoiOS/PlayersViewController.swift)
`PlayersViewController` displays a list of players. It keeps its view up-to-date with [ValueObservation](../../README.md#valueobservation).
- [PlayerEditionViewController.swift](GRDBDemoiOS/PlayerEditionViewController.swift)
`PlayerEditionViewController` can create or edit a player, and save it in the database.
+9
View File
@@ -0,0 +1,9 @@
Demo Applications
=================
[GRDBDemo] demonstrates how GRDB can fuel a SwiftUI application.
See also the demo apps of the [GRDBQuery] package: they use the `@Query` property wrapper that helps SwiftUI views automatically update their content when the database changes.
[GRDBDemo]: GRDBDemo
[GRDBQuery]: https://github.com/groue/GRDBQuery
+29 -27
View File
@@ -3,7 +3,7 @@ FTS5 Tokenizers
**[FTS5](https://www.sqlite.org/fts5.html) is an extensible full-text search engine.**
GRDB lets you define your own custom FST5 tokenizers, and extend SQLite built-in tokenizers. Possible use cases are:
GRDB lets you define your own custom FTS5 tokenizers, and extend SQLite built-in tokenizers. Possible use cases are:
- Have "fi" match the ligature "&#xfb01;" (U+FB01)
- Have "first" match "1st"
@@ -29,13 +29,13 @@ GRDB lets you define your own custom FST5 tokenizers, and extend SQLite built-in
**A Tokenizer splits text into tokens**. For example, a tokenizer can split "SQLite is a database engine" into the five tokens "SQLite", "is", "a", "database", and "engine".
FTS5 use tokenizers to tokenize both indexed documents and search patterns. **A match between a document and a search pattern happens when both produce *identical* tokens.**
FTS5 uses tokenizers to tokenize both indexed documents and search patterns. **A match between a document and a search pattern happens when both produce *identical* tokens.**
All SQLite [built-in tokenizers](https://www.sqlite.org/fts5.html#tokenizers) tokenize both "SQLite" and "sqlite" into the common lowercase token "sqlite". This is why they are case-insensitive. Generally speaking, different tokenizers achieve different matching by applying different transformations to the input text.
- The [ascii](https://www.sqlite.org/fts5.html#ascii_tokenizer) tokenizer turns all ASCII characters to lowercase. "SQLite is a database engine" gives "sqlite", "is", "a", "database", and "engine". The query "SQLITE DATABASE" will match, because its tokens "sqlite" and "database" are found in the document.
- The [unicode61](https://www.sqlite.org/fts5.html#unicode61_tokenizer) tokenizer remove diacritics from latin characters. Unlike the ascii tokenizer, it will match "Jérôme" with "Jerome", as both produce the same "jerome" token.
- The [unicode61](https://www.sqlite.org/fts5.html#unicode61_tokenizer) tokenizer removes diacritics from latin characters. Unlike the ascii tokenizer, it will match "Jérôme" with "Jerome", as both produce the same "jerome" token.
- The [porter](https://www.sqlite.org/fts5.html#porter_tokenizer) tokenizer turns English words into their root: "database engine" gives the "databas" and "engin" tokens. The query "database engines" will match, because it produces the same tokens.
@@ -43,7 +43,7 @@ However, built-in tokenizers don't match "first" with "1st", because they produc
Nor do they match "Grossmann" with "Großmann", because they produce the different "grossmann" and "großmann" tokens.
Custom tokenizers help dealing with these situations. We'll see how to match "Grossmann" and "Großmann" by tokenizing them into "grossmann" (see [latin script](#example-latin-script)). We'll also see how to have "first" and "1st" emit *synonym tokens*, so that they can match too (see [synonyms](#example-synonyms)).
Custom tokenizers help deal with these situations. We'll see how to match "Grossmann" and "Großmann" by tokenizing them into "grossmann" (see [latin script](#example-latin-script)). We'll also see how to have "first" and "1st" emit *synonym tokens*, so that they can match too (see [synonyms](#example-synonyms)).
## The Tokenizer Protocols
@@ -54,7 +54,7 @@ GRDB lets you use and define FTS5 tokenizers through three protocols:
- [FTS5CustomTokenizer](#fts5customtokenizer): the low-level protocol that lets custom tokenizers use the raw [FTS5 C API](https://www.sqlite.org/fts5.html#custom_tokenizers).
- [FTS5WrapperTokenizer](#fts5wrappertokenizer): the high-level protocol for custom tokenizers that post-processes the tokens produced by another FTS5Tokenizer.
- [FTS5WrapperTokenizer](#fts5wrappertokenizer): the high-level protocol for custom tokenizers that post-process the tokens produced by another FTS5Tokenizer.
## Using a Custom Tokenizer
@@ -66,10 +66,14 @@ Once you have a custom tokenizer type that adopts [FTS5CustomTokenizer](#fts5cus
```swift
class MyTokenizer : FTS5CustomTokenizer { ... }
dbQueue.add(tokenizer: MyTokenizer.self) // or dbPool.add
var config = Configuration()
config.prepareDatabase { db in
db.add(tokenizer: MyTokenizer.self)
}
let dbQueue = try DatabaseQueue(path: dbPath, configuration: config)
```
**Create [full-text tables](../../../#create-fts5-virtual-tables) that use the custom tokenizer:**
**Create [full-text tables](FullTextSearch.md#create-fts5-virtual-tables) that use the custom tokenizer:**
```swift
try db.create(virtualTable: "documents", using: FTS5()) { t in
@@ -78,7 +82,7 @@ try db.create(virtualTable: "documents", using: FTS5()) { t in
}
```
The full-text table can be fed and queried in [a regular way](../../../#full-text-search):
The full-text table can be fed and queried in [a regular way](FullTextSearch.md):
```swift
try db.execute(sql: "INSERT INTO documents VALUES (?)", arguments: ["..."])
@@ -91,7 +95,7 @@ let documents = try Document.matching(pattern).fetchAll(db)
## FTS5Tokenizer
**FST5Tokenizer** is the protocol for all FTS5 tokenizers.
**FTS5Tokenizer** is the protocol for all FTS5 tokenizers.
It only requires a tokenization method that matches the low-level `xTokenize` C function documented at https://www.sqlite.org/fts5.html#custom_tokenizers. We'll discuss it more when describing custom tokenizers.
@@ -157,7 +161,7 @@ try db.create(virtualTable: "documents", using: FTS5()) { t in
FTS5CustomTokenizer inherits from [FTS5Tokenizer](#fts5tokenizer), and performs tokenization with its `tokenize(context:tokenization:pText:nText:tokenCallback:)` method. This low-level method matches the `xTokenize` C function documented at https://www.sqlite.org/fts5.html#custom_tokenizers.
This method arguments are:
This method's arguments are:
- `context`: An opaque pointer that is the first argument to the `tokenCallback` function
- `tokenization`: The reason why FTS5 is requesting tokenization.
@@ -171,18 +175,18 @@ This method arguments are:
- `iStart`: Byte offset of token within input text
- `iEnd`: Byte offset of end of token within input text
Since tokenization is hard, and pointers to byte buffers uneasy to deal with, you may enjoy the [FTS5WrapperTokenizer](#fts5wrappertokenizer) protocol.
Since tokenization is hard, and pointers to byte buffers difficult to deal with, you may enjoy the [FTS5WrapperTokenizer](#fts5wrappertokenizer) protocol.
## FTS5WrapperTokenizer
**FTS5WrapperTokenizer** is the high-level protocol for your custom tokenizers. It provides a default implementation for the low-level `tokenize(context:tokenization:pText:nText:tokenCallback:)` method, so that the adopting type does not have to deal with raw byte buffers of the raw [FTS5 C API](https://www.sqlite.org/fts5.html#custom_tokenizers).
A FTS5WrapperTokenizer lets the hard tokenization job to another tokenizer, the "wrapped tokenizer", and post-processes the tokens produced by this wrapped tokenizer.
An FTS5WrapperTokenizer leaves the hard tokenization job to another tokenizer, the "wrapped tokenizer", and post-processes the tokens produced by this wrapped tokenizer.
```swift
protocol FTS5WrapperTokenizer : FTS5CustomTokenizer {
var wrappedTokenizer: FTS5Tokenizer { get }
var wrappedTokenizer: any FTS5Tokenizer { get }
func accept(
token: String,
flags: FTS5TokenFlags,
@@ -191,7 +195,7 @@ protocol FTS5WrapperTokenizer : FTS5CustomTokenizer {
}
```
As all custom tokenizers, wrapper tokenizers must have a name:
Like all custom tokenizers, wrapper tokenizers must have a name:
```swift
final class MyTokenizer : FTS5WrapperTokenizer {
@@ -203,7 +207,7 @@ The `wrappedTokenizer` property is the mandatory wrapped tokenizer. You instanti
```swift
final class MyTokenizer : FTS5WrapperTokenizer {
let wrappedTokenizer: FTS5Tokenizer
let wrappedTokenizer: any FTS5Tokenizer
init(db: Database, arguments: [String]) throws {
// Wrap the unicode61 tokenizer
@@ -232,11 +236,11 @@ final class MyTokenizer : FTS5WrapperTokenizer {
The token argument is a token produced by the wrapped tokenizer, ready to be ignored, modified, or multiplied into several [synonyms](#example-synonyms).
The tokenization parameter tells the reason why tokens are produced, if FTS5 is tokenizing a document, or a search pattern. Some tokenizers may produce different tokens depending on this parameter.
The tokenization parameter tells the reason why tokens are produced: whether FTS5 is tokenizing a document, or a search pattern. Some tokenizers may produce different tokens depending on this parameter.
Finally, the tokenCallback is a function you call to output a custom token.
There are a two rules to observe when implementing the accept method:
There are two rules to observe when implementing the accept method:
1. Errors thrown by the tokenCallback function must not be caught (they notify that FTS5 requires the tokenization process to stop immediately).
2. The flags parameter should be given unmodified to the tokenCallback function along with the custom token, unless you union it with the `.colocated` flag when the tokenizer produces [synonyms](#example-synonyms).
@@ -251,7 +255,7 @@ For example, your custom tokenizer can wrap [unicode61](https://www.sqlite.org/f
```swift
final class MyTokenizer : FTS5WrapperTokenizer {
static let name = "custom"
let wrappedTokenizer: FTS5Tokenizer
let wrappedTokenizer: any FTS5Tokenizer
init(db: Database, arguments: [String]) throws {
if arguments.isEmpty {
@@ -296,16 +300,16 @@ try db.create(virtualTable: "documents", using: FTS5()) { t in
The topic of synonyms is documented at https://www.sqlite.org/fts5.html#synonym_support, which describes several methods. You should carefully read this documentation, and pick the method you prefer.
In the example below, we'll pick method (3), and implement a tokenizer that adds multiple synonyms for a single term to the FTS index. Using this method, when tokenizing document text, the tokenizer provides multiple synonyms for each token. So that when a document such as "I won first place" is tokenized, entries are added to the FTS index for "i", "won", "first", "1st" and "place".
In the example below, we'll pick method (3), and implement a tokenizer that adds multiple synonyms for a single term to the FTS index. Using this method, when tokenizing document text, the tokenizer provides multiple synonyms for each token. So when a document such as "I won first place" is tokenized, entries are added to the FTS index for "i", "won", "first", "1st" and "place".
We'll also take care of the SQLite advice:
We'll also follow the SQLite advice:
> When using methods (2) or (3), it is important that the tokenizer only provide synonyms when tokenizing document text or query text, not both. Doing so will not cause any errors, but is inefficient.
```swift
final class SynonymsTokenizer : FTS5WrapperTokenizer {
static let name = "synonyms"
let wrappedTokenizer: FTS5Tokenizer
let wrappedTokenizer: any FTS5Tokenizer
let synonyms: [Set<String>] = [["first", "1st"]]
init(db: Database, arguments: [String]) throws {
@@ -313,7 +317,7 @@ final class SynonymsTokenizer : FTS5WrapperTokenizer {
}
func synonyms(for token: String) -> Set<String>? {
return synonyms.first { $0.contains(token) }
synonyms.first { $0.contains(token) }
}
func accept(token: String, flags: FTS5TokenFlags, for tokenization: FTS5Tokenization, tokenCallback: FTS5WrapperTokenCallback) throws {
@@ -346,18 +350,18 @@ Languages that use the [latin script](https://en.wikipedia.org/wiki/Latin_script
Full-text search in such a corpus often needs input tolerance, so that "encyclopaedia" can match "Encyclopædia", "Grossmann", "Großmann", and "Jerome", "Jérôme".
German has something specific in that both "Mueller" and "Muller" should match "Müller", when "Bauer" should not match "Baur" (only "ü" accepts both "u" and "ue"). A pull request that adds a chapter about German will be welcome.
German has something specific in that both "Mueller" and "Muller" should match "Müller", while "Bauer" should not match "Baur" (only "ü" accepts both "u" and "ue"). A pull request that adds a chapter about German will be welcome.
A custom FTS5 tokenizer lets you provide fuzzy latin matching: after "Grossmann", "Großmann", and "GROSSMANN" have all been turned into "grossmann", they will all match together.
We'll wrap the built-in [unicode61](https://www.sqlite.org/fts5.html#unicode61_tokenizer) tokenizer (the one that knows how to split text on spaces and punctuations), and transform its tokens into their bare lowercase ascii form.
We'll wrap the built-in [unicode61](https://www.sqlite.org/fts5.html#unicode61_tokenizer) tokenizer (the one that knows how to split text on spaces and punctuation), and transform its tokens into their bare lowercase ascii form.
The tokenizer wrapping is provided by the [FTS5WrapperTokenizer](#fts5wrappertokenizer) protocol. The string transformation is provided by the [String.applyingTransform](https://developer.apple.com/reference/swift/string/1643133-applyingtransform) method:
```swift
final class LatinAsciiTokenizer : FTS5WrapperTokenizer {
static let name = "latinascii"
let wrappedTokenizer: FTS5Tokenizer
let wrappedTokenizer: any FTS5Tokenizer
init(db: Database, arguments: [String]) throws {
wrappedTokenizer = try db.makeTokenizer(.unicode61())
@@ -371,8 +375,6 @@ final class LatinAsciiTokenizer : FTS5WrapperTokenizer {
}
```
> :point_up: **Note**: String.applyingTransform is not available before iOS 9.0 and macOS 10.11. Use the Core Foundation function [CFStringTransform](https://developer.apple.com/reference/corefoundation/1542411-cfstringtransform) instead.
Remember to register LatinAsciiTokenizer before using it:
```swift
+2 -344
View File
@@ -1,347 +1,5 @@
# FetchedRecordsController
**FetchedRecordsController is a sunsetted GRDB API.**
FetchedRecordsController has been removed in GRDB 5.
It is not deprecated. But FetchedRecordsController has known limitations which are not planned to be lifted.
You are advised to use [ValueObservation] instead of FetchedRecordsController.
---
**FetchedRecordsController tracks changes in the results of a request, feeds table views and collection views, and animates cells when the results of the request change.**
It looks and behaves very much like [Core Data's NSFetchedResultsController](https://developer.apple.com/library/ios/documentation/CoreData/Reference/NSFetchedResultsController_Class/).
Given a fetch request, and a type that adopts the [FetchableRecord] protocol, such as a subclass of the [Record](../README.md#record-class) class, a FetchedRecordsController is able to track changes in the results of the fetch request, notify of those changes, and return the results of the request in a form that is suitable for a table view or a collection view, with one cell per fetched record.
- [Creating the Fetched Records Controller](#creating-the-fetched-records-controller)
- [Responding to Changes](#responding-to-changes)
- [The Changes Notifications](#the-changes-notifications)
- [Modifying the Fetch Request](#modifying-the-fetch-request)
- [Table and Collection Views](#table-and-collection-views)
- [Implementing the Table View Datasource Methods](#implementing-the-table-view-datasource-methods)
- [Implementing Table View Updates](#implementing-table-view-updates)
- [FetchedRecordsController Concurrency](#fetchedrecordscontroller-concurrency)
## Creating the Fetched Records Controller
When you initialize a fetched records controller, you provide the following mandatory information:
- A [database connection](../README.md#database-connections)
- The type of the fetched records. It must be a type that adopts the [FetchableRecord] protocol, such as a subclass of the [Record](../README.md#record-class) class
- A fetch request
```swift
class Player : Record { ... }
let dbQueue = DatabaseQueue(...) // or DatabasePool
// Using a Request from the Query Interface:
let controller = FetchedRecordsController(
dbQueue,
request: Player.order(Column("name")))
// Using SQL, and eventual arguments:
let controller = FetchedRecordsController<Player>(
dbQueue,
sql: "SELECT * FROM player ORDER BY name WHERE countryCode = ?",
arguments: ["FR"])
```
The fetch request can involve several database tables. The fetched records controller will only track changes in the columns and tables used by the fetch request.
```swift
let controller = FetchedRecordsController<Author>(
dbQueue,
sql: """
SELECT author.name, COUNT(book.id) AS bookCount
FROM author
LEFT JOIN book ON book.authorId = author.id
GROUP BY author.id
ORDER BY author.name
""")
```
After creating an instance, you invoke `performFetch()` to actually execute
the fetch.
```swift
try controller.performFetch()
```
## Responding to Changes
In general, FetchedRecordsController is designed to respond to changes at *the database layer*, by [notifying](#the-changes-notifications) when *database rows* change location or values.
Changes are not reflected until they are applied in the database by a successful [transaction](../README.md#transactions-and-savepoints):
```swift
// One transaction
try dbQueue.write { db in // or dbPool.write
try player1.insert(db)
try player2.insert(db)
}
// One transaction
try dbQueue.inTransaction { db in // or dbPool.writeInTransaction
try player1.insert(db)
try player2.insert(db)
return .commit
}
// Two transactions
try dbQueue.inDatabase { db in // or dbPool.writeWithoutTransaction
try player1.insert(db)
try player2.insert(db)
}
```
When you apply several changes to the database, you should group them in a single explicit transaction. The controller will then notify of all changes together.
## The Changes Notifications
An instance of FetchedRecordsController notifies that the controller’s fetched records have been changed by the mean of *callbacks*:
```swift
let controller = try FetchedRecordsController(...)
controller.trackChanges(
// controller's records are about to change:
willChange: { controller in ... },
// notification of individual record changes:
onChange: { (controller, record, change) in ... },
// controller's records have changed:
didChange: { controller in ... })
try controller.performFetch()
```
See [Implementing Table View Updates](#implementing-table-view-updates) for more detail on table view updates.
**All callbacks are optional.** When you only need to grab the latest results, you can omit the `didChange` argument name:
```swift
controller.trackChanges { controller in
let newPlayers = controller.fetchedRecords // [Player]
}
```
> :warning: **Warning**: notification of individual record changes (the `onChange` callback) has FetchedRecordsController use a diffing algorithm that has a high complexity, a high memory consumption, and is thus **not suited for large result sets**. One hundred rows is probably OK, but one thousand is probably not. If your application experiences problems with large lists, see [Issue 263](https://github.com/groue/GRDB.swift/issues/263) for more information.
Callbacks have the fetched record controller itself as an argument: use it in order to avoid memory leaks:
```swift
// BAD: memory leak
controller.trackChanges { _ in
let newPlayers = controller.fetchedRecords
}
// GOOD
controller.trackChanges { controller in
let newPlayers = controller.fetchedRecords
}
```
**Callbacks are invoked asynchronously.** See [FetchedRecordsController Concurrency](#fetchedrecordscontroller-concurrency) for more information.
**Values fetched from inside callbacks may be inconsistent with the controller's records.** This is because after database has changed, and before the controller had the opportunity to invoke callbacks in the main thread, other database changes can happen.
To avoid inconsistencies, provide a `fetchAlongside` argument to the `trackChanges` method, as below:
```swift
controller.trackChanges(
fetchAlongside: { db in
// Fetch any extra value, for example the number of fetched records:
return try Player.fetchCount(db)
},
didChange: { (controller, count) in
// The extra value is the second argument.
let recordsCount = controller.fetchedRecords.count
assert(count == recordsCount) // guaranteed
})
```
Whenever the fetched records controller can not look for changes after a transaction has potentially modified the tracked request, an error handler is called. The request observation is not stopped, though: future transactions may successfully be handled, and the notified changes will then be based on the last successful fetch.
```swift
controller.trackErrors { (controller, error) in
print("Missed a transaction because \(error)")
}
```
## Modifying the Fetch Request
You can change a fetched records controller's fetch request or SQL query.
```swift
controller.setRequest(Player.order(Column("name")))
controller.setRequest(sql: "SELECT ...", arguments: ...)
```
The [notification callbacks](#the-changes-notifications) are notified of eventual changes if the new request fetches a different set of records.
> :point_up: **Note**: This behavior differs from Core Data's NSFetchedResultsController, which does not notify of record changes when the fetch request is replaced.
**Change callbacks are invoked asynchronously.** This means that modifying the request from the main thread does *not* immediately triggers callbacks. When you need to take immediate action, force the controller to refresh immediately with its `performFetch` method. In this case, changes callbacks are *not* called:
```swift
// Change request on the main thread:
controller.setRequest(Player.order(Column("name")))
// Here callbacks have not been called yet.
// You can cancel them, and refresh records immediately:
try controller.performFetch()
```
## Table and Collection Views
FetchedRecordsController let you feed table and collection views, and keep them up-to-date with the database content.
For nice animated updates, a fetched records controller needs to recognize identical records between two different result sets. When records adopt the [TableRecord] protocol, they are automatically compared according to their primary key:
```swift
class Player : TableRecord { ... }
let controller = FetchedRecordsController(
dbQueue,
request: Player.all())
```
For other types, the fetched records controller needs you to be more explicit:
```swift
let controller = FetchedRecordsController(
dbQueue,
request: ...,
isSameRecord: { (player1, player2) in player1.id == player2.id })
```
### Implementing the Table View Datasource Methods
The table view data source asks the fetched records controller to provide relevant information:
```swift
func numberOfSections(in tableView: UITableView) -> Int {
return fetchedRecordsController.sections.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return fetchedRecordsController.sections[section].numberOfRecords
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = ...
let record = fetchedRecordsController.record(at: indexPath)
// Configure the cell
return cell
}
```
> :point_up: **Note**: In its current state, FetchedRecordsController does not support grouping table view rows into custom sections: it generates a unique section.
### Implementing Table View Updates
When changes in the fetched records should reload the whole table view, you can simply tell so:
```swift
controller.trackChanges { [unowned self] _ in
self.tableView.reloadData()
}
```
Yet, FetchedRecordsController can notify that the controller’s fetched records have been changed due to some add, remove, move, or update operations, and help applying animated changes to a UITableView.
#### Typical Table View Updates
For animated table view updates, use the `willChange` and `didChange` callbacks to bracket events provided by the fetched records controller, as illustrated in the following example:
```swift
// Assume self has a tableView property, and a cell configuration
// method named configure(_:at:).
controller.trackChanges(
// controller's records are about to change:
willChange: { [unowned self] _ in
self.tableView.beginUpdates()
},
// notification of individual record changes:
onChange: { [unowned self] (controller, record, change) in
switch change {
case .insertion(let indexPath):
self.tableView.insertRows(at: [indexPath], with: .fade)
case .deletion(let indexPath):
self.tableView.deleteRows(at: [indexPath], with: .fade)
case .update(let indexPath, _):
if let cell = self.tableView.cellForRow(at: indexPath) {
self.configure(cell, at: indexPath)
}
case .move(let indexPath, let newIndexPath, _):
self.tableView.deleteRows(at: [indexPath], with: .fade)
self.tableView.insertRows(at: [newIndexPath], with: .fade)
// // Alternate technique which actually moves cells around:
// let cell = self.tableView.cellForRow(at: indexPath)
// self.tableView.moveRow(at: indexPath, to: newIndexPath)
// if let cell = cell {
// self.configure(cell, at: newIndexPath)
// }
}
},
// controller's records have changed:
didChange: { [unowned self] _ in
self.tableView.endUpdates()
})
```
> :warning: **Warning**: notification of individual record changes (the `onChange` callback) has FetchedRecordsController use a diffing algorithm that has a high complexity, a high memory consumption, and is thus **not suited for large result sets**. One hundred rows is probably OK, but one thousand is probably not. If your application experiences problems with large lists, see [Issue 263](https://github.com/groue/GRDB.swift/issues/263) for more information.
>
> :point_up: **Note**: our sample code above uses `unowned` references to the table view controller. This is a safe pattern as long as the table view controller owns the fetched records controller, and is deallocated from the main thread (this is usually the case). In other situations, prefer weak references.
## FetchedRecordsController Concurrency
**A fetched records controller *can not* be used from any thread.**
When the database itself can be read and modified from [any thread](../README.md#database-connections), fetched records controllers **must** be used from the main thread. Record changes are also [notified](#the-changes-notifications) on the main thread.
**Change callbacks are invoked asynchronously.** This means that changes made from the main thread are *not* immediately notified. When you need to take immediate action, force the controller to refresh immediately with its `performFetch` method. In this case, changes callbacks are *not* called:
```swift
// Change database on the main thread:
try dbQueue.write { db in
try Player(...).insert(db)
}
// Here callbacks have not been called yet.
// You can cancel them, and refresh records immediately:
try controller.performFetch()
```
> :point_up: **Note**: when the main thread does not fit your needs, give a serial dispatch queue to the controller initializer: the controller must then be used from this queue, and record changes are notified on this queue as well.
>
> ```swift
> let queue = DispatchQueue()
> queue.async {
> let controller = try FetchedRecordsController(..., queue: queue)
> controller.trackChanges { /* in queue */ }
> try controller.performFetch()
> }
> ```
[ValueObservation]: ../README.md#valueobservation
[GRDBCombine]: http://github.com/groue/GRDBCombine
[RxGRDB]: http://github.com/RxSwiftCommunity/RxGRDB
[FetchableRecord]: ../README.md#fetchablerecord-protocol
[TableRecord]: ../README.md#tablerecord-protocol
See [Database Observation](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseobservation) for other ways to observe the database.
+91 -69
View File
@@ -28,9 +28,9 @@ let books = try Book.fetchAll(db,
```
- **[Choosing the Full-Text Engine](#choosing-the-full-text-engine)**
- **[Enabling FTS5 Support](#enabling-fts5-support)**
- **Create Full-Text Virtual Tables**: [FTS3/4](#create-fts3-and-fts4-virtual-tables), [FTS5](#create-fts5-virtual-tables)
- **Choosing a Tokenizer**: [FTS3/4](#fts3-and-fts4-tokenizers), [FTS5](#fts5-tokenizers)
- **Tokenization**: [FTS3/4](#fts3-and-fts4-tokenization), [FTS5](#fts5-tokenization)
- **Search Patterns**: [FTS3/4](#fts3pattern), [FTS5](#fts5pattern)
- **Sorting by Relevance**: [FTS5](#fts5-sorting-by-relevance)
- **External Content Full-Text Tables**: [FTS4/5](#external-content-full-text-tables)
@@ -78,22 +78,20 @@ Generally speaking, FTS5 is better than FTS4 which improves on FTS3. But this do
For a full feature list, read the SQLite documentation. Some missing features can be achieved with extra application code.
- **The speed versus disk space constraints.** Roughly speaking, FTS4 and FTS5 are faster than FTS3, but use more space. FTS4 only supports content compression.
- **The speed versus disk space constraints.** Roughly speaking, FTS4 and FTS5 are faster than FTS3, but use more space. Only FTS4 supports content compression.
- **The location of the indexed text in your database schema.** Only FTS4 and FTS5 support "contentless" and "external content" tables.
- **The SQLite library integrated in your application.** The version of SQLite that ships with iOS, macOS, tvOS and watchOS supports FTS3 and FTS4 out of the box, but not always FTS5. To use FTS5, see [Enabling FTS5 Support](#enabling-fts5-support).
- See [FTS3 vs. FTS4](https://www.sqlite.org/fts3.html#differences_between_fts3_and_fts4) and [FTS5 vs. FTS3/4](https://www.sqlite.org/fts5.html#appendix_a) for more differences.
- See [FST3 vs. FTS4](https://www.sqlite.org/fts3.html#differences_between_fts3_and_fts4) and [FTS5 vs. FTS3/4](https://www.sqlite.org/fts5.html#appendix_a) for more differences.
> :point_up: **Note**: In case you were still wondering, it is recommended to read the SQLite documentation: [FTS3 & FTS4](https://www.sqlite.org/fts3.html) and [FTS5](https://www.sqlite.org/fts5.html).
> **Note**: In case you were still wondering, it is recommended to read the SQLite documentation: [FTS3 & FTS4](https://www.sqlite.org/fts3.html) and [FTS5](https://www.sqlite.org/fts5.html).
## Create FTS3 and FTS4 Virtual Tables
**FTS3 and FTS4 full-text tables store and index textual content.**
Create tables with the `create(virtualTable:using:)` method:
Create tables with the `create(virtualTable:options:using:_:)` method:
```swift
// CREATE VIRTUAL TABLE document USING fts3(content)
@@ -150,7 +148,7 @@ try db.create(virtualTable: "document", using: FTS4()) { t in
}
```
The `content` option is involved in "contentless" and "external content" full-text tables. GRDB can help you defining full-text tables that automatically synchronize with their content table. See [External Content Full-Text Tables](#external-content-full-text-tables).
The `content` option is involved in "contentless" and "external content" full-text tables. GRDB can help you define full-text tables that automatically synchronize with their content table. See [External Content Full-Text Tables](#external-content-full-text-tables).
See [SQLite documentation](https://www.sqlite.org/fts3.html) for more information.
@@ -229,6 +227,21 @@ See below some examples of matches:
See [SQLite tokenizers](https://www.sqlite.org/fts3.html#tokenizer) for more information.
## FTS3 and FTS4 Tokenization
You can tokenize strings when needed:
```swift
// Default tokenization using the `simple` tokenizer:
FTS3.tokenize("SQLite database") // ["sqlite", "database"]
FTS3.tokenize("Gustave Doré") // ["gustave", "doré"])
// Tokenization with an explicit tokenizer:
FTS3.tokenize("SQLite database", withTokenizer: .porter) // ["sqlite", "databas"]
FTS3.tokenize("Gustave Doré", withTokenizer: .unicode61()) // ["gustave", "dore"])
```
## FTS3Pattern
**Full-text search in FTS3 and FTS4 tables is performed with search patterns:**
@@ -241,13 +254,14 @@ See [SQLite tokenizers](https://www.sqlite.org/fts3.html#tokenizer) for more inf
**Not all search patterns are valid**: they must follow the [Full-Text Index Queries Grammar](https://www.sqlite.org/fts3.html#full_text_index_queries).
The FTS3Pattern type helps you validating patterns, and building valid patterns from untrusted strings (such as strings typed by users):
The FTS3Pattern type helps you validate patterns, and build valid patterns from untrusted strings (such as strings typed by users):
```swift
struct FTS3Pattern {
init(rawPattern: String) throws
init?(matchingAnyTokenIn string: String)
init?(matchingAllTokensIn string: String)
init?(matchingAllPrefixesIn string: String)
init?(matchingPhrase string: String)
}
```
@@ -257,18 +271,25 @@ The first initializer validates your raw patterns against the query grammar, and
```swift
// OK: FTS3Pattern
let pattern = try FTS3Pattern(rawPattern: "sqlite AND database")
// DatabaseError: malformed MATCH expression: [AND]
let pattern = try FTS3Pattern(rawPattern: "AND")
```
The three other initializers don't throw. They build a valid pattern from any string, **including strings provided by users of your application**. They let you find documents that match all given words, any given word, or a full phrase, depending on the needs of your application:
The other initializers don't throw. They build a valid pattern from any string, **including strings provided by users of your application**. They let you find documents that match any given word, all given words or prefixes, or a full phrase, depending on the needs of your application:
```swift
let query = "SQLite database"
// Matches documents that contain "SQLite" or "database"
let pattern = FTS3Pattern(matchingAnyTokenIn: query)
// Matches documents that contain both "SQLite" and "database"
// Matches documents that contain "SQLite" and "database"
let pattern = FTS3Pattern(matchingAllTokensIn: query)
// Matches documents that contain words that start with "SQLite" and words that start with "database"
let pattern = FTS3Pattern(matchingAllPrefixesIn: query)
// Matches documents that contain "SQLite database"
let pattern = FTS3Pattern(matchingPhrase: query)
```
@@ -280,7 +301,7 @@ let pattern = FTS3Pattern(matchingAnyTokenIn: "") // nil
let pattern = FTS3Pattern(matchingAnyTokenIn: "*") // nil
```
FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/4.5/Structs/StatementArguments.html):
FTS3Pattern instances are regular [values](../README.md#values). You can use them as query [arguments](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/statementarguments):
```swift
let documents = try Document.fetchAll(db,
@@ -295,51 +316,17 @@ Use them in the [query interface](../README.md#the-query-interface):
let documents = try Document.matching(pattern).fetchAll(db)
// Search in a specific column:
let documents = try Document.filter(Column("content").match(pattern)).fetchAll(db)
let documents = try Document.filter { $0.content.match(pattern) }.fetchAll(db)
```
## Enabling FTS5 Support
When the FTS3 and FTS4 full-text engines don't suit your needs, you may want to use FTS5. See [Choosing the Full-Text Engine](#choosing-the-full-text-engine) to help you make a decision.
The version of SQLite that ships with iOS, macOS, tvOS and watchOS does not always support the FTS5 engine. To enable FTS5 support, you'll need to install GRDB with one of those installation techniques:
1. Use the GRDB.swift CocoaPod with a custom compilation option, as below. It uses the system SQLite, which is compiled with FTS5 support, but only on iOS 11.4+ / macOS 10.13+ / tvOS 11.4+ / watchOS 4.3+:
```ruby
pod 'GRDB.swift'
platform :ios, '11.4' # or above
post_install do |installer|
installer.pods_project.targets.select { |target| target.name == "GRDB.swift" }.each do |target|
target.build_configurations.each do |config|
config.build_settings['OTHER_SWIFT_FLAGS'] = "$(inherited) -D SQLITE_ENABLE_FTS5"
end
end
end
```
> :warning: **Warning**: make sure you use the right platform version! You will get runtime errors on devices with a lower version.
> :point_up: **Note**: there used to be a GRDBPlus CocoaPod with pre-enabled FTS5 support. This CocoaPod is deprecated: please switch to the above technique.
2. Use the GRDB.swift/SQLCipher CocoaPod subspec (see [encryption](../README.md#encryption)):
```ruby
pod 'GRDB.swift/SQLCipher'
```
3. Use a [custom SQLite build] and activate the `SQLITE_ENABLE_FTS5` compilation option.
## Create FTS5 Virtual Tables
**FTS5 full-text tables store and index textual content.**
To use FTS5, you'll need a [custom SQLite build] that activates the `SQLITE_ENABLE_FTS5` compilation option.
Create FTS5 tables with the `create(virtualTable:using:)` method:
Create FTS5 tables with the `create(virtualTable:options:using:_:)` method:
```swift
// CREATE VIRTUAL TABLE document USING fts5(content)
@@ -390,7 +377,7 @@ try db.create(virtualTable: "document", using: FTS5()) { t in
}
```
The `content` and `contentRowID` options are involved in "contentless" and "external content" full-text tables. GRDB can help you defining full-text tables that automatically synchronize with their content table. See [External Content Full-Text Tables](#external-content-full-text-tables).
The `content` and `contentRowID` options are involved in "contentless" and "external content" full-text tables. GRDB can help you define full-text tables that automatically synchronize with their content table. See [External Content Full-Text Tables](#external-content-full-text-tables).
See [SQLite documentation](https://www.sqlite.org/fts5.html) for more information.
@@ -444,7 +431,7 @@ See below some examples of matches:
```swift
try db.create(virtualTable: "book", using: FTS5()) { t in
t.tokenizer = .ascii
t.tokenizer = .ascii()
}
```
@@ -458,8 +445,8 @@ See below some examples of matches:
```swift
try db.create(virtualTable: "book", using: FTS5()) { t in
t.tokenizer = .porter() // porter wrapping unicode61 (the default)
t.tokenizer = .porter(.ascii) // porter wrapping ascii
t.tokenizer = .porter() // porter wrapping unicode61 (the default)
t.tokenizer = .porter(.ascii()) // porter wrapping ascii
t.tokenizer = .porter(.unicode61(diacritics: .keep)) // porter wrapping unicode61 without diacritics stripping
}
```
@@ -471,6 +458,29 @@ See below some examples of matches:
See [SQLite tokenizers](https://www.sqlite.org/fts5.html#tokenizers) for more information, and [custom FTS5 tokenizers](FTS5Tokenizers.md) in order to add your own tokenizers.
## FTS5 Tokenization
You can tokenize strings when needed:
```swift
let ascii = try db.makeTokenizer(.ascii())
// Tokenize an FTS5 query
for (token, flags) in try ascii.tokenize(query: "SQLite database") {
print(token) // Prints "sqlite" then "database"
}
// Tokenize an FTS5 document
for (token, flags) in try ascii.tokenize(document: "SQLite database") {
print(token) // Prints "sqlite" then "database"
}
```
Some tokenizers may produce a different output when you tokenize a query or a document (see `FTS5_TOKENIZE_QUERY` and `FTS5_TOKENIZE_DOCUMENT` in https://www.sqlite.org/fts5.html#custom_tokenizers). You should generally use `tokenize(query:)` when you intend to tokenize a string in order to compose a [raw search pattern](#fts5pattern).
See the `FTS5_TOKEN_*` flags in https://www.sqlite.org/fts5.html#custom_tokenizers for more information about token flags. In particular, tokenizers that support synonyms may output multiple tokens for a single word, along with the `.colocated` flag.
## FTS5Pattern
**Full-text search in FTS5 tables is performed with search patterns:**
@@ -483,7 +493,7 @@ See [SQLite tokenizers](https://www.sqlite.org/fts5.html#tokenizers) for more in
**Not all search patterns are valid**: they must follow the [Full-Text Query Syntax](https://www.sqlite.org/fts5.html#full_text_query_syntax).
The FTS5Pattern type helps you validating patterns, and building valid patterns from untrusted strings (such as strings typed by users):
The FTS5Pattern type helps you validate patterns, and build valid patterns from untrusted strings (such as strings typed by users):
```swift
extension Database {
@@ -493,7 +503,9 @@ extension Database {
struct FTS5Pattern {
init?(matchingAnyTokenIn string: String)
init?(matchingAllTokensIn string: String)
init?(matchingAllPrefixesIn string: String)
init?(matchingPhrase string: String)
init?(matchingPrefixPhrase string: String)
}
```
@@ -502,8 +514,10 @@ The `Database.makeFTS5Pattern(rawPattern:forTable:)` method validates your raw p
```swift
// OK: FTS5Pattern
try db.makeFTS5Pattern(rawPattern: "sqlite", forTable: "book")
// DatabaseError: syntax error near \"AND\"
try db.makeFTS5Pattern(rawPattern: "AND", forTable: "book")
// DatabaseError: no such column: missing
try db.makeFTS5Pattern(rawPattern: "missing: sqlite", forTable: "book")
```
@@ -512,12 +526,19 @@ The FTS5Pattern initializers don't throw. They build a valid pattern from any st
```swift
let query = "SQLite database"
// Matches documents that contain "SQLite" or "database"
let pattern = FTS5Pattern(matchingAnyTokenIn: query)
// Matches documents that contain both "SQLite" and "database"
// Matches documents that contain "SQLite" and "database"
let pattern = FTS5Pattern(matchingAllTokensIn: query)
// Matches documents that contain words that start with "SQLite" and words that start with "database"
let pattern = FTS5Pattern(matchingAllPrefixesIn: query)
// Matches documents that contain "SQLite database"
let pattern = FTS5Pattern(matchingPhrase: query)
// Matches documents that start with "SQLite database"
let pattern = FTS5Pattern(matchingPrefixPhrase: query)
```
@@ -529,7 +550,7 @@ let pattern = FTS5Pattern(matchingAnyTokenIn: "") // nil
let pattern = FTS5Pattern(matchingAnyTokenIn: "*") // nil
```
FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/4.5/Structs/StatementArguments.html):
FTS5Pattern instances are regular [values](../README.md#values). You can use them as query [arguments](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/statementarguments):
```swift
let documents = try Document.fetchAll(db,
@@ -540,7 +561,11 @@ let documents = try Document.fetchAll(db,
Use them in the [query interface](../README.md#the-query-interface):
```swift
// Search in all columns
let documents = try Document.matching(pattern).fetchAll(db)
// Search in a specific column:
let documents = try Document.filter { $0.content.match(pattern) }.fetchAll(db)
```
@@ -558,7 +583,7 @@ let documents = try Document.fetchAll(db,
let documents = try Document.matching(pattern).order(Column.rank).fetchAll(db)
```
For more information about the ranking algorithm, as well as extra options, read [Sorting by Auxiliary Function Results](https://www.sqlite.org/fts5.html#sorting_by_auxiliary_function_results)
For more information about the ranking algorithm, as well as extra options, read [Sorting by Auxiliary Function Results](https://www.sqlite.org/fts5.html#sorting_by_auxiliary_function_results).
GRDB does not provide any ranking for FTS3 and FTS4. See SQLite's [Search Application Tips](https://www.sqlite.org/fts3.html#appendix_a) if you really need it.
@@ -567,7 +592,7 @@ GRDB does not provide any ranking for FTS3 and FTS4. See SQLite's [Search Applic
**An external content table does not store the indexed text.** Instead, it indexes the text stored in another table.
This is very handy when you want to index a table that can not be declared as a full-text table (because it contains non-textual values, for example). You just have to define an external content full-text table that refers to the regular table.
This is very handy when you want to index a table that cannot be declared as a full-text table (because it contains non-textual values, for example). You just have to define an external content full-text table that refers to the regular table.
The two tables must be kept up-to-date, so that the full-text index matches the content of the regular table. This synchronization happens automatically if you use the `synchronize(withTable:)` method in your full-text table definition:
@@ -589,7 +614,7 @@ try db.create(virtualTable: "book_ft", using: FTS4()) { t in // or FTS5()
}
```
The eventual content already present in the regular table is indexed, and every insert, update or delete that happens in the regular table is automatically applied to the full-text index.
Any content already present in the regular table is indexed, and every insert, update or delete that happens in the regular table is automatically applied to the full-text index.
For more information, see the SQLite documentation about external content tables: [FTS4](https://www.sqlite.org/fts3.html#_external_content_fts4_tables_), [FTS5](https://sqlite.org/fts5.html#external_content_tables).
@@ -598,11 +623,11 @@ See also [WWDC Companion](https://github.com/groue/WWDCCompanion), a sample app
### Deleting Synchronized Full-Text Tables
Synchronization of full-text tables with their content table happens by the mean of SQL triggers.
Synchronization of full-text tables with their content table happens by means of SQL triggers.
SQLite automatically deletes those triggers when the content (not full-text) table is dropped.
However, those triggers remain after the full-text table has been dropped. Unless they are dropped too, they will prevent future insertion, updates, and deletions in the content table, and the creation of a new full-text table.
However, those triggers remain after the full-text table has been dropped. Unless they are dropped too, they will prevent future insertions, updates, and deletions in the content table, and the creation of a new full-text table.
To drop those triggers, use the `dropFTS4SynchronizationTriggers` or `dropFTS5SynchronizationTriggers` methods:
@@ -621,7 +646,7 @@ try db.drop(table: "book_ft")
try db.dropFTS4SynchronizationTriggers(forTable: "book_ft")
```
> :warning: **Warning**: there was a bug in GRDB up to version 2.3.1 included, which created triggers with a wrong name. If it is possible that the full-text table was created by an old version of GRDB, then delete the synchronization triggers **twice**: once with the name of the deleted full-text table, and once with the name of the content table:
> **Warning**: there was a bug in GRDB up to version 2.3.1 included, which created triggers with a wrong name. If it is possible that the full-text table was created by an old version of GRDB, then delete the synchronization triggers **twice**: once with the name of the deleted full-text table, and once with the name of the content table:
>
> ```swift
> // Drop full-text table
@@ -636,7 +661,7 @@ try db.dropFTS4SynchronizationTriggers(forTable: "book_ft")
When you need to perform a full-text search, and the external content table contains all the data you need, you can simply query the full-text table.
But if you need to load columns from the regular table, and in the same time perform a full-text search, then you will need to query both tables at the same time.
But if you need to load columns from the regular table, and also perform a full-text search, then you will need to query both tables at the same time.
That is because SQLite will throw an error when you try to perform a full-text search on a regular table:
@@ -664,10 +689,7 @@ let books = Book.fetchAll(db, sql: sql, arguments: [pattern])
**You can define [record](../README.md#records) types around the full-text virtual tables.**
However these tables don't have any explicit primary key. Instead, they use the [implicit rowid primary key](../README.md#the-implicit-rowid-primary-key): a special hidden column named `rowid`.
You will have to [expose this hidden column](../README.md#exposing-the-rowid-column) in order to fetch, delete, and update full-text records by primary key.
The primary key of those tables is the hidden `rowid` column. If you need to fetch, delete, and update full-text records by primary key, you will have to expose this column to the record type. See [The Database Schema](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseschema) for more information.
## Unicode Full-Text Gotchas
@@ -675,11 +697,11 @@ The SQLite built-in tokenizers for [FTS3, FTS4](#fts3-and-fts4-tokenizers) and [
Generally speaking, matches may fail when content and query don't use the same [unicode normalization](http://unicode.org/reports/tr15/). SQLite actually exhibits inconsistent behavior in this regard.
For example, for "aimé" to match "aimé", they better have the same normalization: the NFC "aim\u{00E9}" form may not match its NFD "aime\u{0301}" equivalent. Most strings that you get from Swift, UIKit and Cocoa use NFC, so be careful with NFD inputs (such as strings from the HFS+ file system, or strings that you can't trust like network inputs). Use [String.precomposedStringWithCanonicalMapping](https://developer.apple.com/reference/swift/string/1407210-precomposedstringwithcanonicalma) to turn a string into NFC.
For example, for "aimé" to match "aimé", they better have the same normalization: the NFC "aim\u{00E9}" form may not match its NFD "aime\u{0301}" equivalent. Most strings that you get from Swift, UIKit and Cocoa use NFC, so be careful with NFD inputs (such as strings from the HFS+ file system, or strings that you can't trust like network inputs). Use [String.precomposedStringWithCanonicalMapping](https://developer.apple.com/documentation/foundation/nsstring/1412645-precomposedstringwithcanonicalma) to turn a string into NFC.
Besides, if you want "fi" to match the ligature "&#xfb01;" (U+FB01), then you need to normalize your indexed contents and inputs to NFKC or NFKD. Use [String.precomposedStringWithCompatibilityMapping](https://developer.apple.com/reference/swift/string/1407834-precomposedstringwithcompatibili) to turn a string into NFKC.
Besides, if you want "fi" to match the ligature "&#xfb01;" (U+FB01), then you need to normalize your indexed contents and inputs to NFKC or NFKD. Use [String.precomposedStringWithCompatibilityMapping](https://developer.apple.com/documentation/foundation/nsstring/1412625-precomposedstringwithcompatibili) to turn a string into NFKC.
Unicode normalization is not the end of the story, because it won't help "Encyclopaedia" match "Encyclopædia", "Mueller", "Müller", "Grossmann", "Großmann", or "Diyarbakır", "DIYARBAKIR". The [String.applyingTransform](https://developer.apple.com/reference/swift/string/1643133-applyingtransform) method can help.
Unicode normalization is not the end of the story, because it won't help "Encyclopaedia" match "Encyclopædia", "Mueller", "Müller", "Grossmann", "Großmann", or "Diyarbakır", "DIYARBAKIR". The [String.applyingTransform](https://developer.apple.com/documentation/foundation/nsstring/1407787-applyingtransform) method can help.
GRDB lets you write [custom FTS5 tokenizers](FTS5Tokenizers.md) that can transparently deal with all these issues. For FTS3 and FTS4, you'll need to pre-process your strings before injecting them in the full-text engine.
-522
View File
@@ -1,522 +0,0 @@
Migrating From GRDB 2 to GRDB 3
===============================
GRDB 3 comes with new features, but also a few breaking changes, and a set of updated good practices. This guide aims at helping you upgrading your applications.
**For all users**
- [Swift 4.1 Required]
- [iOS 8 Sunsetting]
- [Database Schema Recommendations]
- [Record Protocols Renaming]
- [Columns Definition]
**By topic**
- [If You Use Database Queues]
- [If You Use Database Pools]
- [If You Use Database Snapshots]
- [If You Use Record Types]
- [If You Use Custom Requests]
- [If You Use RxGRDB]
- [Notable Documentation Updates]
## Swift 4.1 Required
GRDB 3 uses [conditional conformances], introduced in Swift 4.1. It can only be built on Xcode 9.3+.
## iOS 8 Sunsetting
GRDB 3 is only tested on iOS 9+, due to a limitation in Xcode 9.3. Code that targets older versions of SQLite and iOS is still there, but is not supported.
## Database Schema Recommendations
GRDB 2 was totally schema-agnostic, and would gladly accept any database.
GRDB 3 still accepts any database, but brings two schema recommendations:
- :bulb: Integer primary keys should be auto-incremented, in order to avoid any row id to be reused.
When ids can be reused, your app and [database observation tools] may think that a row was updated, when it was actually deleted, then replaced. Depending on your application needs, this may be OK. Or not.
GRDB 3 thus comes with a new good practice: use the `autoIncrementedPrimaryKey` method when you create a database table with an integer primary key:
```diff
try db.create(table: "author") { t in
- t.column("id", .integer).primaryKey() // GRDB 2
+ t.autoIncrementedPrimaryKey("id") // GRDB 3 recommendation
t.column("name", .text).notNull()
}
```
- :bulb: Database table names should be singular, and camel-cased. Make them look like Swift identifiers: `place`, `country`, `postalAddress`, 'httpRequest'.
This will help you using the new [Associations] feature when you need it. Database table names that follow another naming convention are totally OK, but you will need to perform extra configuration.
This convention is applied by the default implementation of the `TableRecord.databaseTableName`: see [If You Use Record Types] below.
Since you are reading this guide, your application has already defined its database schema. You can migrate it in order to apply the new recommendations, if needed. Below is a sample code that uses [DatabaseMigrator], the recommended tool for managing your database schema:
```swift
var migrator = DatabaseMigrator()
// Existing GRDB 2 migration:
migrator.registerMigration("initial") { db in
try db.create(table: "authors") { t in
t.column("id", .integer).primaryKey()
t.column("name", .text).notNull()
}
try db.create(table: "books") { t in
t.column("id", .integer).primaryKey()
t.column("authorId", .integer).notNull().references("authors")
t.column("title", .text).notNull()
}
}
// New GRDB 3 migration:
// - Rename tables so that they look like Swift identifiers (singular and camelCased)
// - Make integer primary keys auto-incremented
//
// Since several tables are recreated from scratch, referential integrity
// constraints may break during the process. The
// registerMigrationWithDeferredForeignKeyCheck method makes sure that foreign
// key checks are temporarily disabled, and checked at the end:
migrator.registerMigrationWithDeferredForeignKeyCheck("GRDB3") { db in
try db.create(table: "author") { t in
t.autoIncrementedPrimaryKey("id")
t.column("name", .text).notNull()
}
try db.create(table: "book") { t in
t.autoIncrementedPrimaryKey("id")
t.column("authorId", .integer).notNull().references("author")
t.column("title", .text).notNull()
}
try db.execute("""
INSERT INTO author SELECT * FROM authors;
INSERT INTO book SELECT * FROM books;
""")
try db.drop(table: "authors")
try db.drop(table: "books")
}
```
## Record Protocols Renaming
GRDB 3 has renamed the [record protocols]:
- `RowConvertible` -> `FetchableRecord`
- `TableMapping` -> `TableRecord`
- `Persistable` -> `PersistableRecord`
- `MutablePersistable` -> `MutablePersistableRecord`
After upgrading, build your project: the compiler will guide you through the renaming by the way of fixits.
## Columns Definition
GRDB 2 has you define columns of the query interface with the Column type:
```swift
// GRDB 2
let nameColumn = Column("name")
let arthur = try Player.filter(nameColumn == "Arthur").fetchOne(db)
```
A recommended practice was to define enum namespaces in record types:
```swift
// GRDB 2
struct Player: RowConvertible, TableMapping {
enum Columns {
static let id = Column("id")
static let name = Column("name")
static let score = Column("score")
}
init(row: Row) {
id = row[Columns.id]
name = row[Columns.name]
score = row[Columns.score]
}
}
```
In GRDB 3, `Column` is still there, but a new `ColumnExpression` protocol has been introduced in order to streamline column enums:
```swift
// GRDB 3
struct Player: FetchableRecord, TableRecord {
enum Columns: String, ColumnExpression {
case id, name, score
}
init(row: Row) {
id = row[Columns.id]
name = row[Columns.name]
score = row[Columns.score]
}
}
extension Player {
static func filter(name: String) -> QueryInterfaceRequest<Player> {
return filter(Columns.name == name)
}
static var maximumScore: QueryInterfaceRequest<Int> {
return select(max(Columns.score), as: Int.self)
}
}
```
When your record adopts the Codable protocol, you can use its [coding keys](https://developer.apple.com/documentation/foundation/archives_and_serialization/encoding_and_decoding_custom_types) to safely define database columns:
```swift
// GRDB 3
struct Player: Codable {
var id: Int64
var name: String
var score: Int
}
extension Player: FetchableRecord, PersistableRecord {
enum Columns {
static let id = Column(CodingKeys.id.stringValue)
static let name = Column(CodingKeys.name.stringValue)
static let score = Column(CodingKeys.score.stringValue)
}
static func filter(name: String) -> QueryInterfaceRequest<Player> {
return filter(Columns.name == name)
}
static var maximumScore: QueryInterfaceRequest<Int> {
return select(max(Columns.score), as: Int.self)
}
}
```
## If You Use Database Queues
With GRDB 2, you used to access the database through the `inDatabase` or `inTransaction` [DatabaseQueue] methods:
```swift
// GRDB 2
let players = try dbQueue.inDatabase { db in
try Player.fetchAll(db)
}
try dbQueue.inDatabase { db in
try player.updateChanges(db)
}
var balance: Amount! = nil
try dbQueue.inTransaction { db in
try Credit(destinationAccout, amount).insert(db)
try Debit(sourceAccount, amount).insert(db)
balance = try sourceAccount.fetchBalance(db)
return .commit
}
```
The code above still runs, unchanged, in GRDB 3.
Yet it is now recommended that you use the `read` and `write` methods instead:
```swift
// GRDB 3
let players = try dbQueue.read { db in
try Player.fetchAll(db)
}
try dbQueue.write { db in
try player.updateChanges(db)
}
let balance = try dbQueue.write { db in
try Credit(destinationAccout, amount).insert(db)
try Debit(sourceAccount, amount).insert(db)
return try sourceAccount.fetchBalance(db)
}
```
The purpose of the new `read` and `write` methods is to soothe the "transaction mental load" of previous versions of GRDB, a legacy of the [FMDB] heritage. All developers can *forget* to open transactions, with the unfortunate consequence that the database may end up containing inconsistent values. Experienced developers may *wonder* whether they should open transactions or not, even when this doesn't matter a lot.
With GRDB 3, use `read` when you need to read values. It's impossible to write within a `read` block, which means that you can be sure that no unwanted side effect can happen.
When you need to write, use `write`: your database changes are automatically wrapped in a transaction, with the guarantee that all changes are written to disk, or, should any error happen, none at all.
Of course, precise transaction handling sometimes matter. Check the updated [Transactions and Savepoints] chapter.
## If You Use Database Pools
With GRDB 2, you used to access the database through the `read`, `write` or `writeInTransaction` [DatabasePool] methods:
```swift
// GRDB 2
let players = try dbPool.read { db in
try Player.fetchAll(db)
}
try dbPool.write { db in
try player.updateChanges(db)
}
var balance: Amount! = nil
try dbPool.writeInTransaction { db in
try Credit(destinationAccout, amount).insert(db)
try Debit(sourceAccount, amount).insert(db)
balance = try sourceAccount.fetchBalance(db)
return .commit
}
```
In GRDB 3, the `write` method has changed: it now automatically wraps your database changes in a transaction, which means that the last block can be rewritten as below:
```swift
// GRDB 3
let balance = try dbPool.write { db in
try Credit(destinationAccout, amount).insert(db)
try Debit(sourceAccount, amount).insert(db)
return try sourceAccount.fetchBalance(db)
}
```
Side effect: you can no longer open explicit transactions inside a `write` block:
```swift
// GRDB 2: OK
// GRDB 3: SQLite error 1 with statement `BEGIN DEFERRED TRANSACTION`:
// cannot start a transaction within a transaction
try dbPool.write { db in
try db.inTransaction { ... }
}
```
When precise transaction handling is needed, check the updated [Transactions and Savepoints] chapter.
The purpose of this change is to prevent an easy misuse of database pools in previous GRDB versions. Unless writes were wrapped inside an explicit transactions, concurrent reads could see an inconsistent state of the database:
```swift
// GRDB 2: unsafe
// GRDB 3: safe
try dbPool.write { db in
try Credit(destinationAccout, amount).insert(db)
try Debit(sourceAccount, amount).insert(db)
}
```
Since `write` now wraps your changes in a transaction, you have the guarantee that concurrent reads can't see them until they are all written to disk.
## If You Use Database Snapshots
With GRDB 2, you used to create [database snapshots] with the `makeSnaphot` [DatabasePool] method. For example:
```swift
// GRDB 2
let snapshot: DatabaseSnapshot = try dbPool.write { db in
try Player.deleteAll()
return dbPool.makeSnapshot()
}
// Guaranteed to be zero
let count = try snapshot.read { db in
try Player.fetchCount(db)
}
```
GRDB 3 will crash the above code on the `makeSnapshot()` line, with a fatal error: "makeSnapshot() must not be called from inside a transaction."
To avoid this error, you will need [precise transaction handling]:
```swift
// GRDB 3
let snapshot: DatabaseSnapshot = try dbPool.writeWithoutTransaction { db in
try Player.deleteAll()
return dbPool.makeSnapshot()
}
```
## If You Use Record Types
Record types that adopt the former TableMapping protocol, renamed TableRecord, used to declare their table name:
```swift
// GRDB 2
struct Place: TableMapping {
static let databaseTableName = "place"
}
print(Place.databaseTableName) // print "place"
```
With GRDB 3, the `databaseTableName` property gets a default implementation:
```swift
// GRDB 3
struct Place: TableRecord { }
print(Place.databaseTableName) // print "place"
```
That default name follows the [Database Schema Recommendations]: it is singular, camel-cased, and looks like a Swift identifier:
- Place: `place`
- Country: `country`
- PostalAddress: `postalAddress`
- HTTPRequest: `httpRequest`
- TOEFL: `toefl`
When you subclass the Record class, the Swift compiler won't let you profit from this default name: you have to keep on providing an explicit table name:
```swift
// GRDB 2 and GRDB 3
class Place: Record {
override var databaseTableName: String {
return "place"
}
}
```
## If You Use Custom Requests
[Custom requests] let you escape the limitations of the [query interface], when it can not generate the requests you need.
You may, for example, use `SQLRequest`:
```swift
// GRDB 2
extension Player {
static func filter(color: Color) -> AnyTypedRequest<Player> {
let sql = "SELECT * FROM players WHERE color = ?"
let request = SQLRequest(sql, arguments: [color])
return request.asRequest(of: Player.self)
}
}
let players = try Player.filter(color: .red).fetchAll(db)
```
The `AnyTypedRequest` type is no longer available, and `SQLRequest` is now a generic type:
```swift
// GRDB 3
extension Player {
static func filter(color: Color) -> SQLRequest<Player> {
let sql = "SELECT * FROM players WHERE color = ?"
return SQLRequest(sql, arguments: [color])
}
}
let players = try Player.filter(color: .red).fetchAll(db)
```
See the updated [Custom Requests](../README.md#custom-requests) chapter for more information.
## If You Use RxGRDB
Some RxGRDB APIs have slightly changed. Did you track multiple requests at the same time with "fetch tokens"?
```swift
// GRDB 2
dbQueue.rx
.fetchTokens(in: [request, ...])
.mapFetch { db in try fetchResult(db) }
.subscribe(...)
```
Now you'll write instead:
```swift
// GRDB 3
ValueObservation
.tracking([request, ...], fetch: { db in try fetchResult(db) })
.rx
.fetch(in: dbQueue)
.subscribe(...)
```
It's just a syntactic change, without any impact on the runtime.
GRDB 3.6 also introduces a new protocol, [DatabaseRegionConvertible], that allows a better encapsulation of complex requests, and a streamlined observable definition.
For example:
```swift
// GRDB 2: Track a team and its players
let teamId = 1
let teamRequest = Team.filter(key: teamId)
let playersRequest = Player.filter(teamId: teamId)
dbQueue.rx
.fetchTokens(in: [teamRequest, playersRequest])
.mapFetch { db -> TeamInfo? in
guard let team = try teamRequest.fetchOne(db) else {
return nil
}
let players = try playersRequest.fetchAll(db)
return TeamInfo(team: team, players: players)
}
.subscribe(onNext: { teamInfo: TeamInfo? in
...
})
// GRDB 3: Track a team and its players
struct TeamInfoRequest: DatabaseRegionConvertible { ... }
let request = TeamInfoRequest(teamId: 1)
ValueObservation.tracking(request, fetch: { try request.fetchOne($0) })
.rx
.fetch(in: dbQueue)
.subscribe(onNext: { teamInfo: TeamInfo? in
...
})
```
## Notable Documentation Updates
If you have time, you may dig deeper in GRDB 3 with those updated documentation chapter:
- [Database Queues](../README.md#database-queues): focus on the new `read` and `write` methods.
- [Transactions and Savepoints](../README.md#transactions-and-savepoints): the chapter has been rewritten in order to introduce transactions as a power-user feature.
- [ScopeAdapter](../README.md#scopeadapter): do you use row adapters? If so, have a look.
- [Examples of Record Definitions](../README.md#examples-of-record-definitions): this new chapter provides a handy reference of the three main ways to define record types (Codable, plain struct, Record subclass).
- [SQL Operators](../README.md#sql-operators): the chapter introduces the new `joined(operator:)` method that lets you join a chain of expressions with `AND` or `OR` without nesting: `[cond1, cond2, ...].joined(operator: .and)`.
- [Custom Requests](../README.md#custom-requests): the old `Request` and `TypedRequest` protocols have been replaced with `FetchRequest`. If you want to know more about custom requests, check this chapter.
- [Migrations](../README.md#migrations): learn how to check if a migration has been applied (very useful for migration tests).
[How To Upgrade]: #how-to-upgrade
[Database Schema Recommendations]: #database-schema-recommendations
[Record Protocols Renaming]: #record-protocols-renaming
[Columns Definition]: #columns-definition
[Swift 4.1 Required]: #swift-41-required
[iOS 8 Sunsetting]: #ios-8-sunsetting
[If You Use Database Queues]: #if-you-use-database-queues
[If You Use Database Pools]: #if-you-use-database-pools
[If You Use Database Snapshots]: #if-you-use-database-snapshots
[If You Use Record Types]: #if-you-use-record-types
[If You Use Custom Requests]: #if-you-use-custom-requests
[If You Use RxGRDB]: #if-you-use-rxgrdb
[Notable Documentation Updates]: #notable-documentation-updates
[RxGRDB]: http://github.com/RxSwiftCommunity/RxGRDB
[Associations]: AssociationsBasics.md
[DatabaseMigrator]: ../README.md#migrations
[database observation tools]: ../README.md#database-changes-observation
[Transactions and Savepoints]: ../README.md#transactions-and-savepoints
[precise transaction handling]: ../README.md#transactions-and-savepoints
[DatabaseQueue]: ../README.md#database-queues
[DatabasePool]: ../README.md#database-pools
[database snapshots]: ../README.md#database-snapshots
[FMDB]: http://github.com/ccgus/fmdb
[record protocols]: ../README.md#record-protocols-overview
[Custom requests]: ../README.md#custom-requests
[query interface]: ../README.md#the-query-interface
[DatabaseRegionConvertible]: https://github.com/groue/GRDB.swift#the-databaseregionconvertible-protocol
[conditional conformances]: https://github.com/apple/swift-evolution/blob/master/proposals/0143-conditional-conformances.md
-187
View File
@@ -1,187 +0,0 @@
Migrating From GRDB 3 to GRDB 4
===============================
GRDB 4 comes with new features, but also a few breaking changes. This guide aims at helping you upgrading your applications.
- [New requirements](#new-requirements)
- [Raw SQL](#raw-sql)
- [ValueObservation](#valueobservation)
- [Associations](#associations)
- [Good Practices for Designing Record Types](GoodPracticesForDesigningRecordTypes.md)
- [SQLCipher](#sqlcipher)
- [PersistenceError.recordNotFound](#persistenceerrorrecordnotfound)
### New requirements
GRDB now requires Swift 4.2+ and Xcode 10+. Swift 4.0 and 4.1 are no longer supported. Xcode 9 is no longer supported.
iOS 8 is no longer supported. The minimum iOS target is now iOS 9.
### Raw SQL
Whenever your application uses raw SQL queries or snippets, you will now always have to use the `sql` argument label:
```swift
// GRDB 3
try db.execute("INSERT INTO player (name) VALUES (?)", arguments: ["Arthur"])
let playerCount = try Int.fetchOne(db, "SELECT COUNT(*) FROM player")
// GRDB 4
try db.execute(sql: "INSERT INTO player (name) VALUES (?)", arguments: ["Arthur"])
let playerCount = try Int.fetchOne(db, sql: "SELECT COUNT(*) FROM player")
```
This change was made necessary by the introduction of [SQL Interpolation].
### ValueObservation
[ValueObservation] has been refreshed in GRDB 4.
To guarantee asynchronous notifications, and never ever block your main thread, use the `.async(onQueue:startImmediately:)` scheduling:
```swift
// On main queue
var observation = Player.observationForAll()
observation.scheduling = .async(onQueue: .main, startImmediately: true)
let observer = try observation.start(
in: dbQueue,
onError: { error in ... },
onChange: { (players: [Player]) in
// On main queue
print("fresh players: \(players)")s
})
// <- here "fresh players" is not printed yet.
```
In GRDB 3, this scheduling used to be named `.queue(_: startImmediately:)`.
The second breaking change is `ValueObservation.extent`, which was removed in GRDB 4. Now all observations last until the observer returned by the `start` method is deallocated.
### Associations
GRDB 4 brought a few new [associations] features:
- **Indirect associations** [HasOneThrough] and [HasManyThrough] let you define associations from a record to another through a third one. For example, they let you easily express many-to-many relations such as "a country has many citizens through its passports":
```swift
struct Country: TableRecord, EncodableRecord {
static let passports = hasMany(Passport.self)
// New!
static let citizens = hasMany(Citizen.self, through: passports, using: Passport.citizen)
var citizens: QueryInterfaceRequest<Citizen> {
return request(for: Country.citizens)
}
}
struct Passport: TableRecord {
static let citizen = belongsTo(Citizen.self)
}
struct Citizen: TableRecord {
}
let country: Country = ...
let citizens: [Citizen] = try dbQueue.read { db in
try country.citizens.fetchAll(db)
}
```
![HasManyThroughSchema](https://cdn.rawgit.com/groue/GRDB.swift/master/Documentation/Images/Associations2/HasManyThroughSchema.svg)
- **Eager loading of HasMany associations**: The new `including(all:)` method lets you load arrays or sets of associated records in a single request:
```swift
// All authors with their respective books
let request = Author.including(all: Author.books)
// This request can feed the following record:
struct AuthorInfo: FetchableRecord, Decodable {
var author: Author
var books: [Book] // all associated books
}
let authorInfos: [AuthorInfo] = try AuthorInfo.fetchAll(db, request)
```
See [Joining And Prefetching Associated Records] for more information.
- **Automatic pluralization and singularization** of association identifiers.
GRDB will automatically **pluralize** or **singularize** names in order to help you easily associate records.
For example, the Book and Author records will automatically feed properties named `books`, `author`, or `bookCount` in your decoded records, without any explicit configuration, as long as the names of the backing database tables are "book" and "author".
The GRDB pluralization mechanisms are very powerful, being capable of pluralizing and singularizing both regular and irregular words (it's directly inspired from the battle-tested [Ruby on Rails inflections](https://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-pluralize)).
However, this change may have introduced some incompatibilities with GRDB 3 associations. Check [The Structure of a Joined Request] for more information.
### SQLCipher
The integration of GRDB with SQLCipher has changed.
1. With GRDB 3, it was possible to perform a manual installation, or to use CocoaPods and the GRDBCipher pod.
With GRDB 4, CocoaPods is the only supported installation method. And the GRDBCipher pod is discontinued, replaced with GRDB.swift/SQLCipher:
```diff
-pod 'GRDBCipher'
+pod 'GRDB.swift/SQLCipher'
```
In your Swift code, you no longer import the GRDBCipher module, but GRDB:
```diff
-import GRDBCipher
+import GRDB
```
2. The default SQLCipher version which comes with GRDB 4 is now SQLCipher 4, which is incompatible with SQLCipher 3. SQLCipher 3 is still supported, though. See [Encryption] for more details.
3. The `cipherPageSize` and `kdfIterations` configuration properties are discontinued. With GRDB 4, run sql pragmas in the `prepareDatabase` property of the configuration:
```swift
var configuration = Configuration()
configuration.passphrase = "secret"
configuration.prepareDatabase = { db in
try db.execute(sql: "PRAGMA cipher_page_size = 4096")
try db.execute(sql: "PRAGMA kdf_iter = 128000")
}
let dbQueue = try DatabaseQueue(path: "...", configuration: configuration)
```
### PersistenceError.recordNotFound
PersistenceError.recordNotFound is thrown whenever a record update method does not find any database row to update. It was refactored in GRDB 4:
```swift
public enum PersistenceError: Error {
case recordNotFound(databaseTableName: String, key: [String: DatabaseValue])
}
do {
try player.updateChanges {
$0.score += 1000
}
} catch let error as PersistenceError.recordNotFound {
// Update failed because player does not exist in the database
print(error)
// prints "Key not found in table player: [id:42]"
}
```
[SQL Interpolation]: SQLInterpolation.md
[ValueObservation]: ../README.md#valueobservation
[Encryption]: ../README.md#encryption
[HasOneThrough]: AssociationsBasics.md#hasonethrough
[HasManyThrough]: AssociationsBasics.md#hasmanythrough
[PersistableRecord]: ../README.md#persistablerecord-protocol
[associations]: AssociationsBasics.md
[EncodableRecord]: ../README.md#persistablerecord-protocol
[The Structure of a Joined Request]: AssociationsBasics.md#the-structure-of-a-joined-request
[Joining And Prefetching Associated Records]: AssociationsBasics.md#joining-and-prefetching-associated-records
+515
View File
@@ -0,0 +1,515 @@
Migrating From GRDB 4 to GRDB 5
===============================
**This guide aims at helping you upgrade your applications from GRDB 4 to GRDB 5.**
- [Preparing the Migration to GRDB 5](#preparing-the-migration-to-grdb-5)
- [New requirements](#new-requirements)
- [Database Configuration](#database-configuration)
- [ValueObservation](#valueobservation)
- [Combine Integration](#combine-integration)
- [Other Changes](#other-changes)
## Preparing the Migration to GRDB 5
If you haven't made it yet, upgrade to the [latest GRDB 4 release](https://github.com/groue/GRDB.swift/tags) first, and fix any deprecation warning prior to the GRDB 5 upgrade.
GRDB 5 ships with fix-its that will suggest simple syntactic changes, and won't require you to think much.
Your attention will be needed, though, in the area of database observation.
## New requirements
GRDB requirements have been bumped:
- **Swift 5.3+** (was Swift 4.2+)
- **Xcode 12.0+** (was Xcode 10.0+)
- **iOS 11.0+** (was iOS 9.0+)
- **macOS 10.10+** (was macOS 10.9+)
- tvOS 9.0+ (unchanged)
- watchOS 2.0+ (unchanged)
## Database Configuration
The way to configure a database relies much more on the `Configuration.prepareDatabase(_:)` method:
```swift
// BEFORE: GRDB 4
var config = Configuration()
config.trace = { ... } // Tracing SQL statements
config.prepareDatabase = { db in // prepareDatabase was a property
... // Custom setup
}
let dbQueue = try DatabaseQueue(path: dbPath, configuration: config)
dbQueue.add(function: ...) // Custom SQL function
dbQueue.add(collation: ...) // Custom collation
dbQueue.add(tokenizer: ...) // Custom FTS5 tokenizer
// NEW: GRDB 5
var config = Configuration()
config.prepareDatabase { db in // prepareDatabase is now a method
db.trace { ... }
db.add(function: ...)
db.add(collation: ...)
db.add(tokenizer: ...)
...
}
let dbQueue = try DatabaseQueue(dbPath, configuration: config)
```
## ValueObservation
[ValueObservation] is the database observation tool that tracks changes in database values. It has changed quite a bit in GRDB 5.
Those changes make the vanilla GRDB, its [Combine publishers], and [RxGRDB] offer a common API, and a common behavior. This greatly helps choose or switch your preferred database observation technique. In previous versions of GRDB, the three companion libraries used to have subtle differences that were just opportunities for bugs.
In the end, this migration step might require some work. But it's for the benefit of all!
- [Creating ValueObservation](#creating-valueobservation)
- [Starting ValueObservation](#starting-valueobservation)
- [Runtime Behavior of ValueObservation](#runtime-behavior-of-valueobservation)
- [Removed ValueObservation Methods](#removed-valueobservation-methods)
### Creating ValueObservation
In GRDB 5, you *always* create a ValueObservation by providing a function that fetches the observed value:
```swift
// GRDB 5
let observation = ValueObservation.tracking { db in
/* fetch and return the observed value */
}
// For example, an observation of [Player], which tracks all players:
let observation = ValueObservation.tracking { db in
try Player.fetchAll(db)
}
// The same observation, using shorthand notation:
let observation = ValueObservation.tracking(Player.fetchAll)
```
Several methods that build observations were removed:
```swift
// BEFORE: GRDB 4
let observation = request.observationForCount()
let observation = request.observationForFirst()
let observation = request.observationForAll()
let observation = ValueObservation.tracking(value: someFetchFunction)
let observation = ValueObservation.tracking(..., fetch: { db in ... })
// NEW: GRDB 5
let observation = ValueObservation.tracking(request.fetchCount)
let observation = ValueObservation.tracking(request.fetchOne)
let observation = ValueObservation.tracking(request.fetchAll)
let observation = ValueObservation.tracking(someFetchFunction)
let observation = ValueObservation.tracking { db in ... }
```
Finally, ValueObservation used to let applications define custom "reducers" based on a protocol named ValueReducer, which was removed in GRDB 5. See the [#731](https://github.com/groue/GRDB.swift/pull/731) conversation for a solution towards a replacement.
<details>
<summary>RxGRDB impact</summary>
```swift
// BEFORE: GRDB 4
request.rx.observeCount(in: dbQueue)
request.rx.observeFirst(in: dbQueue)
request.rx.observeAll(in: dbQueue)
// NEW: GRDB 5
ValueObservation.tracking(request.fetchCount).rx.observe(in: dbQueue)
ValueObservation.tracking(request.fetchOne).rx.observe(in: dbQueue)
ValueObservation.tracking(request.fetchAll).rx.observe(in: dbQueue)
```
</details>
### Starting ValueObservation
The `start` method which starts observing the database has changed as well.
```swift
// Start observing the database
let cancellable = observation.start(
in: dbQueue,
onError: { error in ... },
onChange: { value in print("fresh value: \(value)") })
```
1. The result of the `start` method is now a DatabaseCancellable which allows you to explicitly stop an observation:
```swift
// BEFORE: GRDB 4
let observer: TransactionObserver?
observer = observation.start(...)
observer = nil // Stop the observation
// NEW: GRDB 5
let cancellable: DatabaseCancellable
cancellable = observation.start(...)
cancellable.cancel() // Stop the observation
```
The returned DatabaseCancellable cancels itself when it gets deinitialized.
2. The `onError` handler of the `start` method is now mandatory:
```swift
// BEFORE: GRDB 4
do {
try observation.start(in: dbQueue) { value in
print("fresh value: \(value)")
}
} catch { ... }
// NEW: GRDB 5
observation.start(
in: dbQueue,
onError: { error in ... },
onChange: { value in print("fresh value: \(value)") })
```
### Runtime Behavior of ValueObservation
**The behavior of ValueObservation has changed**.
The changes can have quite an impact on your application. We'll describe them below, as well as the strategies to restore the previous behavior when needed.
1. ValueObservation used to notify its initial value *immediately* when the observation starts. Now, it notifies fresh values on the main thread, *asynchronously*, by default.
This means that the parts of your application that rely on this immediate value to, say, set up their user interface, have to be modified. Otherwise, they may suffer from a brief flash of missing data, during the short amount of time between the beginning of the observation, and the asynchronous delivery of the initial value.
To get an immediate, synchronous, delivery of the initial value, insert a `scheduling: .immediate` argument in the `start` method:
```swift
let observation = ValueObservation.tracking(Player.fetchAll)
let cancellable = observation.start(
in: dbQueue,
// Opt in for immediate notification of the initial value
scheduling: .immediate,
onError: { error in ... },
onChange: { [weak self] (players: [Player]) in
guard let self else { return }
self.updateView(players)
})
// <- Here the view has already been updated.
```
Note that the `.immediate` scheduling requires that the observation starts from the main thread. A fatal error is raised otherwise.
<details>
<summary>Combine impact</summary>
```swift
let observation = ValueObservation.tracking(Player.fetchAll)
let cancellable = observation
.publisher(
in: dbQueue,
// Opt in for immediate notification of the initial value
scheduling: .immediate)
.sink(...)
```
</details>
<details>
<summary>RxGRDB impact</summary>
```swift
let observation = ValueObservation.tracking(Player.fetchAll)
let disposable = observation
.rx.observe(
in: dbQueue,
// Opt in for immediate notification of the initial value
scheduling: .immediate)
.subscribe(...)
```
</details>
2. ValueObservation used to notify one fresh value for each and every database transaction that had an impact on the tracked value. Now, it may coalesce notifications. If your application relies on exactly one notification per transaction, use [DatabaseRegionObservation] instead.
3. Some value observations used to automatically remove duplicate values. This is no longer automatic. If your application relies on distinct consecutive values, use the [removeDuplicates] operator.
4. ValueObservation used to prevent a database connection (DatabaseQueue or DatabasePool) from closing. Now an observation just stops emitting any fresh value when the database connection closes.
5. ValueObservation used to be able to restart notifying fresh values after it has notified an error. Now an error marks the end of the observation.
6. ValueObservation used to have a `scheduling` property, which has been removed.
You can remove the explicit request to dispatch fresh values asynchronously on the main dispatch queue, because it is now the default behavior:
```swift
// BEFORE: GRDB 4
var observation = ValueObservation.tracking(...)
observation.scheduling = .async(onQueue: .main, startImmediately: true)
observation.start(in: dbQueue, onError: ..., onChange: ...)
// NEW: GRDB 5
let observation = ValueObservation.tracking(...)
observation.start(in: dbQueue, onError: ..., onChange: ...)
```
For other dispatch queues, use the `scheduling` parameter of the `start` method:
```swift
let queue: DispatchQueue = ...
// BEFORE: GRDB 4
var observation = ValueObservation.tracking(...)
observation.scheduling = .async(onQueue: queue, startImmediately: true)
observation.start(in: dbQueue, onError: ..., onChange: ...)
// NEW: GRDB 5
let observation = ValueObservation.tracking(...)
observation.start(in: dbQueue, scheduling: .async(onQueue: queue), onError: ..., onChange: ...)
```
The GRDB 4 `startImmediately` parameter is no longer supported: ValueObservation now always emits an initial value, without waiting for changes. It is up to your application to ignore this initial value if it wants to.
### Removed ValueObservation Methods
1. ValueObservation used to have a `compactMap` method. This method has been removed without any replacement.
If your application uses Combine publishers or RxGRDB, then use the `compactMap` method from Combine or RxSwift instead.
2. ValueObservation used to have a `combine` method. This method has been removed without any replacement.
In your application, replace combined observations with a single observation:
```swift
struct HallOfFame {
var totalPlayerCount: Int
var bestPlayers: [Player]
}
// BEFORE: GRDB 4
let totalPlayerCountObservation = ValueObservation.tracking(Player.fetchCount)
let bestPlayersObservation = ValueObservation.tracking(Player
.limit(10)
.order(Column("score").desc)
.fetchAll)
let observation = ValueObservation
.combine(totalPlayerCountObservation, bestPlayersObservation)
.map(HallOfFame.init)
// NEW: GRDB 5
let observation = ValueObservation.tracking { db -> HallOfFame in
let totalPlayerCount = try Player.fetchCount(db)
let bestPlayers = try Player
.order(Column("score").desc)
.limit(10)
.fetchAll(db)
return HallOfFame(
totalPlayerCount: totalPlayerCount,
bestPlayers: bestPlayers)
}
```
As in previous versions of GRDB, do not use the `combineLatest` operators of Combine or RxSwift in order to combine several ValueObservation instances. You would lose all guarantees of [data consistency](https://en.wikipedia.org/wiki/Consistency_(database_systems)).
## Combine Integration
GRDB 4 had a companion library named GRDBCombine. Combine support is now embedded right into GRDB 5, and you have to remove any dependency on GRDBCombine.
GRDBCombine used to define a `fetchOnSubscription()` method of the ValueObservation subscriber. It has been removed. Replace it with `scheduling: .immediate` for the same effect (an initial value is notified immediately, synchronously, when the publisher is subscribed):
```swift
// BEFORE: GRDB 4 + GRDBCombine
let observation = ValueObservation.tracking { db in ... }
let publisher = observation
.publisher(in: dbQueue)
.fetchOnSubscription()
// NEW: GRDB 5
let observation = ValueObservation.tracking { db in ... }
let publisher = observation
.publisher(in: dbQueue, scheduling: .immediate)
```
## Other Changes
1. The `Configuration.trace` property has been removed. You now use the `Database.trace(options:_:)` method instead:
```swift
// BEFORE: GRDB 4
var config = Configuration()
config.trace = { print($0) }
let dbQueue = try DatabaseQueue(path: dbPath, configuration: config)
// NEW: GRDB 5
var config = Configuration()
config.prepareDatabase { db in
db.trace { print($0) }
}
let dbQueue = try DatabaseQueue(path: dbPath, configuration: config)
```
2. [Batch updates] used to rely on the `<-` operator. This operator has been removed. Use the `set(to:)` method instead:
```swift
// BEFORE: GRDB 4
try Player.updateAll(db, Column("score") <- 0)
// NEW: GRDB 5
try Player.updateAll(db, Column("score").set(to: 0))
```
> :question: This change avoids conflicts with other libraries that define the same operator.
3. [SQL Interpolation] no longer wraps subqueries in parentheses:
```swift
// BEFORE: GRDB 4
let maximumScore: SQLRequest<Int> = "SELECT MAX(score) FROM player"
let bestPlayers: SQLRequest<Player> = "SELECT * FROM player WHERE score = \(maximumScore)"
// NEW: GRDB 5
let maximumScore: SQLRequest<Int> = "SELECT MAX(score) FROM player"
let bestPlayers: SQLRequest<Player> = "SELECT * FROM player WHERE score = (\(maximumScore))"
// extra parentheses required: ^ ^
```
> :question: This change makes it possible to concatenate subqueries with the UNION operator.
4. In order to extract the raw SQL string from an [SQL literal], you now need a database connection:
```swift
// BEFORE: GRDB 4
let query: SQLLiteral = "UPDATE player SET name = \(name) WHERE id = \(id)"
print(query.sql) // prints "UPDATE player SET name = ? WHERE id = ?"
print(query.arguments) // prints ["O'Brien", 42]
// NEW: GRDB 5
let query: SQL = "UPDATE player SET name = \(name) WHERE id = \(id)"
let (sql, arguments) = try dbQueue.read { db in
try query.build(db)
}
print(sql) // prints "UPDATE player SET name = ? WHERE id = ?"
print(arguments) // prints ["O'Brien", 42]
```
5. In order to extract the raw SQL string from a request ([SQLRequest] or [QueryInterfaceRequest]), you now need to call the `makePreparedRequest()` method:
```swift
// BEFORE: GRDB 4
try dbQueue.read { db in
let request = Player.filter(Column("name") == "O'Brien")
let sqlRequest = try SQLRequest(db, request: request)
print(sqlRequest.sql) // "SELECT * FROM player WHERE name = ?"
print(sqlRequest.arguments) // ["O'Brien"]
}
// NEW: GRDB 5
try dbQueue.read { db in
let request = Player.filter(Column("name") == "O'Brien")
let statement = try request.makePreparedRequest(db, forSingleResult: false).statement
print(statement.sql) // "SELECT * FROM player WHERE name = ?"
print(statement.arguments) // ["O'Brien"]
}
```
6. The `TableRecord.selectionSQL()` method is no longer available. When you need to embed the columns selected by a record type in an SQL request, you now have to use [SQL Interpolation]:
```swift
// BEFORE: GRDB 4
let sql = "SELECT \(Player.selectionSQL()) FROM player"
let players = try Player.fetchAll(db, sql: sql)
// NEW: GRDB 5
let request: SQLRequest<Player> = "SELECT \(columnsOf: Player.self) FROM player"
let players = try request.fetchAll(db)
```
7. [Custom SQL functions] are now [callable values](https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md):
```swift
// BEFORE: GRDB 4
Player.select(myFunction.call(Column("name")))
// NEW: GRDB 5
Player.select(myFunction(Column("name")))
```
8. Defining custom `FetchRequest` types is no longer supported.
Refactor your app around [SQLRequest] and [QueryInterfaceRequest], which are supposed to fully address your needs.
9. The module name for [custom SQLite builds](CustomSQLiteBuilds.md) is now the plain `GRDB`:
```swift
// BEFORE: GRDB 4
import GRDBCustomSQLite
// NEW: GRDB 5
import GRDB
```
10. Importing the `GRDB` module grants access to the [SQLite C interface](https://www.sqlite.org/c3ref/intro.html). You no longer need to import the underlying SQLite library:
```swift
// BEFORE: GRDB 4
import CSQLite // When GRDB is included with the Swift Package Manager
import SQLCipher // When GRDB is linked to SQLCipher
import SQLite3 // When GRDB is linked to System SQLite
let sqliteVersion = String(cString: sqlite3_libversion())
// NEW: GRDB 5
import GRDB
let sqliteVersion = String(cString: sqlite3_libversion())
```
11. `FetchedRecordsController` was removed from GRDB 5. The [Database Observation] chapter describes the other ways to observe the database.
12. Defining custom `RowAdapter` types is no longer supported. A new [RenameColumnAdapter](../README.md#renamecolumnadapter) adapter makes it possible to process column names.
13. Many types and methods that support the query builder used to be publicly exposed and flagged as experimental. They are now private, or renamed with an underscore prefix, which means they are not for public use.
14. Explicit boolean tests `expression == true` and `expression == false` generate different SQL:
```swift
// GRDB 4: SELECT * FROM player WHERE isActive
// GRDB 5: SELECT * FROM player WHERE isActive = 1
Player.filter(Column("isActive") == true)
// GRDB 4: SELECT * FROM player WHERE NOT isActive
// GRDB 5: SELECT * FROM player WHERE isActive = 0
Player.filter(Column("isActive") == false)
// GRDB 4 & 5: SELECT * FROM player WHERE isActive
Player.filter(Column("isActive"))
// GRDB 4 & 5: SELECT * FROM player WHERE NOT isActive
Player.filter(!Column("isActive"))
```
This change is innocuous for database boolean values that are `0`, `1`, or `NULL`. However, it is a breaking change for all other database values.
[ValueObservation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation
[DatabaseRegionObservation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseregionobservation
[RxGRDB]: https://github.com/RxSwiftCommunity/RxGRDB
[removeDuplicates]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation/removeduplicates()
[Custom SQL functions]: ../README.md#custom-sql-functions
[Batch updates]: ../README.md#update-requests
[SQL Interpolation]: SQLInterpolation.md
[SQL literal]: SQLInterpolation.md#sql-literal
[SQLRequest]: ../README.md#custom-requests
[QueryInterfaceRequest]: ../README.md#requests
[Combine publishers]: Combine.md
[Database Observation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseobservation
+383
View File
@@ -0,0 +1,383 @@
Migrating From GRDB 5 to GRDB 6
===============================
**This guide aims at helping you upgrade your applications from GRDB 5 to GRDB 6.**
- [Preparing the Migration to GRDB 6](#preparing-the-migration-to-grdb-6)
- [New requirements](#new-requirements)
- [Primary Associated Types](#primary-associated-types)
- [Record Changes](#record-changes)
- [Other Changes](#other-changes)
## Preparing the Migration to GRDB 6
If you haven't made it yet, upgrade to the [latest GRDB 5 release](https://github.com/groue/GRDB.swift/tags) first, and fix any deprecation warning prior to the GRDB 6 upgrade.
You can then upgrade to GRDB 6. Due to the breaking changes, it is possible that your application code no longer compiles. Follow the fix-its that suggest simple syntactic changes. Other modifications that you need to apply are described below.
## New requirements
GRDB requirements have been bumped:
- **Swift 5.7+** (was Swift 5.3+)
- **Xcode 14.0+** (was Xcode 12.0+)
- iOS 11.0+ (unchanged)
- **macOS 10.13+** (was macOS 10.10+)
- **tvOS 11.0+** (was tvOS 9.0+)
- **watchOS 4.0+** (was watchOS 2.0+)
- **SQLite 3.19.3+** (was SQLite 3.8.5+)
## Primary Associated Types
Request protocols now come with a primary associated type, enabled by [SE-0346](https://github.com/apple/swift-evolution/blob/main/proposals/0346-light-weight-same-type-syntax.md). This is a great opportunity to simplify your extensions:
```diff
-extension DerivableRequest where RowDecoder == Book {
+extension DerivableRequest<Book> {
/// Order books by title, in a localized case-insensitive fashion
func orderByTitle() -> Self {
order(Column("title").collating(.localizedCaseInsensitiveCompare))
}
}
```
Your extensions to `QueryInterfaceRequest` can be streamlined as well, thanks to [SE-0361](https://github.com/apple/swift-evolution/blob/main/proposals/0361-bound-generic-extensions.md):
```diff
-extension QueryInterfaceRequest where RowDecoder == Player {
+extension QueryInterfaceRequest<Player> {
func selectID() -> QueryInterfaceRequest<Int64> {
selectPrimaryKey()
}
}
```
The `Cursor` protocol has also gained a primary associated type (the type of its elements).
## Record Changes
The record protocols have been refactored. We tried to keep the amount of modifications to your existing code as small as possible, but some changes could not be avoided.
- **The `FetchableRecord.init(row:)` initializer can now throw errors.**
```diff
-let player = Player(row: row)
+let player = try Player(row: row)
```
Decodable records that derive their `FetchableRecord` implementation from the standard `Decodable` protocol now throw errors when they find unexpected database values (they used to crash in GRDB 5).
If you subclass the `Record` type, you have to update your override of `init(row:)`:
```diff
class Player: Record {
- required init(row: Row) {
+ required init(row: Row) throws {
self.id = row["id"]
self.name = row["name"]
- super.init(row: row)
+ try super.init(row: row)
}
}
```
In record types that do not derive their `FetchableRecord.init(row:)` implementation from the standard `Decodable` protocol, you are responsible for throwing decoding errors, as in the sample code below:
<details>
<summary>Handling untrusted input</summary>
For example:
```swift
struct LogEntry: FetchableRecord {
var date: Date
init(row: Row) throws {
let dbValue: DatabaseValue = row["date"]
if dbValue.isNull {
// Handle NULL
throw ...
} else if let date = Date.fromDatabaseValue(dbValue) {
self.date = date
} else {
// Handle invalid date
throw ...
}
}
}
```
</details>
- **The `EncodableRecord.encode(to:)` method can now throw errors.**
Encodable records that derive their `EncodableRecord` implementation from the standard `Encodable` protocol now throw errors when they can't be encoded into database values (they used to crash in GRDB 5).
If you subclass the `Record` type, you have to update your override of `encode(to:)`:
```diff
class Player: Record {
- override func encode(to container: inout PersistenceContainer) {
+ override func encode(to container: inout PersistenceContainer) throws {
container["id"] = id
container["name"] = name
}
}
```
This change has an impact on a few other apis, that can now throw errors as well:
```diff
-let dictionary = player.databaseDictionary
-let changes = newPlayer.databaseChanges(from: oldPlayer)
-let changes = player.databaseChanges // Record class only
+let dictionary = try player.databaseDictionary
+let changes = try newPlayer.databaseChanges(from: oldPlayer)
+let changes = try player.databaseChanges // Record class only
```
- **The signature of the `didInsert` method has changed**.
You have to update all the `didInsert` methods in your application:
```diff
struct Player: MutablePersistableRecord {
var id: Int64?
// Update auto-incremented id upon successful insertion
- mutating func didInsert(with rowID: Int64, for column: String?) {
- id = rowID
+ mutating func didInsert(_ inserted: InsertionSuccess) {
+ id = inserted.rowID
}
}
```
If you subclass the `Record` class, you have to call `super` at some point in your implementation:
```diff
class Player: Record {
var id: Int64?
// Update auto-incremented id upon successful insertion
- override func didInsert(with rowID: Int64, for column: String?) {
- id = rowID
+ override func didInsert(_ inserted: InsertionSuccess) {
+ super.didInsert(inserted)
+ id = inserted.rowID
}
}
```
- **PersistableRecord types now customize persistence methods with "persistence callbacks"**.
It is no longer possible to override persistence methods such as `insert` or `update`. Customizing the persistence methods is now possible with callbacks such as `willSave`, `willInsert`, or `didDelete` (see [persistence callbacks] for the full list of callbacks).
**You have to remove the methods below from your own code base**:
```swift
// GRDB 6: remove those methods from your code
func insert(_ db: Database) throws
func didInsert(with rowID: Int64, for column: String?)
func update(_ db: Database, columns: Set<String>) throws
func save(_ db: Database) throws
func delete(_ db: Database) throws -> Bool
func exists(_ db: Database) throws -> Bool
```
- `insert(_:)`: customization is now made with [persistence callbacks].
- `didInsert(with:for:)`: this method was renamed `didInsert(_:)` (see previous bullet point).
- `update(_:columns:)`: customization is now made with [persistence callbacks].
- `save(_:)`: customization is now made with [persistence callbacks].
- `delete(_:)`: customization is now made with [persistence callbacks].
- `exists(_:)`: this method is no longer customizable.
To help you update your applications with persistence callbacks, let's look at two examples.
First, check the updated [Single-Row Tables](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/singlerowtables) guide, if your application defines a "singleton record".
Next, let's consider a record that performs some validation before insertion and updates. In GRDB 5, this would look like:
```swift
// GRDB 5
struct Link: PersistableRecord {
var url: URL
func insert(_ db: Database) throws {
try validate()
try performInsert(db)
}
func update(_ db: Database, columns: Set<String>) throws {
try validate()
try performUpdate(db, columns: columns)
}
func validate() throws {
if url.host == nil {
throw ValidationError("url must be absolute.")
}
}
}
```
With GRDB 6, record validation can be implemented with the `willSave` callback:
```swift
// GRDB 6
struct Link: PersistableRecord {
var url: URL
func willSave(_ db: Database) throws {
if url.host == nil {
throw ValidationError("url must be absolute.")
}
}
}
try link.insert(db) // Calls the willSave callback
try link.update(db) // Calls the willSave callback
try link.save(db) // Calls the willSave callback
try link.upsert(db) // Calls the willSave callback
```
If you subclass the `Record` class, you have to call `super` at some point in your implementation:
```swift
// GRDB 6
class Link: Record {
var url: URL
override func willSave(_ db: Database) throws {
try super.willSave(db)
if url.host == nil {
throw ValidationError("url must be absolute.")
}
}
}
```
- **Handling of the `IGNORE` conflict policy**
The SQLite [IGNORE](https://www.sqlite.org/lang_conflict.html) conflict policy has SQLite skip insertions and updates that violate a schema constraint, without reporting any error. You can skip this paragraph if you do not use this policy.
GRDB 6 has slightly changed the handling of the `IGNORE` policy.
The `didInsert` callback is now always called on `INSERT OR IGNORE` insertions. In GRDB 5, `didInsert` was not called for record types that specify the `.ignore` conflict policy on inserts:
```swift
// Given a record with ignore conflict policy for inserts...
struct Player: TableRecord, FetchableRecord {
static let persistenceConflictPolicy = PersistenceConflictPolicy(insert: .ignore)
}
// GRDB 5: Does not call didInsert
// GRDB 6: Calls didInsert
try player.insert(db)
```
Since `INSERT OR IGNORE` may silently fail, the `didInsert` method will be called with some random rowid in case of failed insert. You can detect failed insertions with the new method `insertAndFetch`:
```swift
// How to detect failed `INSERT OR IGNORE`:
// INSERT OR IGNORE INTO player ... RETURNING *
if let insertedPlayer = try player.insertAndFetch(db) {
// Successful insertion
} else {
// Ignored failure
}
```
## Other Changes
- The initializer of in-memory databases can now throw errors:
```diff
-let dbQueue = DatabaseQueue()
+let dbQueue = try DatabaseQueue()
```
- The `selectID()` method is removed. You can provide your own implementation, based on the new `selectPrimaryKey(as:)` method:
```swift
extension QueryInterfaceRequest<Player> {
func selectID() -> QueryInterfaceRequest<Int64> {
selectPrimaryKey()
}
}
```
- `Cursor.isEmpty` is now a throwing property, instead of a method:
```diff
-if try cursor.isEmpty() { ... }
+if try cursor.isEmpty { ... }
```
- The `Record.copy()` method was removed, without replacement.
- The `DerivableRequest.limit(_:offset:)` method was removed, without replacement.
You can still limit `QueryInterfaceRequest`, but associations can no longer be limited:
```swift
// Still OK: a limited request of authors
let request = Author.limit(10)
// Still OK: a limited request of books
let request = author.request(for: Author.books).limit(10)
// No longer possible: including a limited association
let request = Author.including(all: Author.books.limit(10))
```
- `DatabaseRegionObservation.start(in:onError:onChange:)` now returns a cancellable.
```swift
let observation = DatabaseRegionObservation.tracking(Player.all())
// GRDB 5
do {
let observer = try observation.start(in: dbQueue) { db in
print("Players were modified")
}
} catch {
// handle error
}
// GRDB 6
let cancellable = observation.start(
in: dbQueue,
onError: { error in /* handle error */ },
onChange: { db in
print("Players were modified")
})
```
The `DatabaseRegionObservation.extent` property was removed. You now control the duration of the observation with the cancellable returned from the `start` method.
- Database cursors no longer have a `statement` property. When you want information about the database statement used by a cursor, use dedicated cursor properties. For example:
```diff
-let sql = cursor.statement.sql
-let columns = cursor.statement.columnNames
+let sql = cursor.sql
+let columns = cursor.columnNames
```
- The transaction hook `Database.afterNextTransactionCommit(_:)` was renamed `Database.afterNextTransaction(onCommit:onRollback:)`, and is now able to report rollbacks as well as commits.
```diff
-db.afterNextTransactionCommit { db in
+db.afterNextTransaction { db in
print("Successful commit")
}
```
- If your application directly embeds the `GRDB.xcodeproj` or `GRDBCustom.xcodeproj` project, then you have to update your dependencies. Those projects now define cross-platform targets, and you must perform the following actions:
- In the **Target Dependencies** section of the **Build Phases** tab of your **application targets**, replace the GRDB target with `GRDB` or `GRDBCustom`.
- In the **Embedded Binaries** section of the **General** tab of your **application target**, replace the GRDB framework with `GRDB.framework` or `GRDBCustom.framework`.
[persistence callbacks]: ../README.md#persistence-callbacks
+282
View File
@@ -0,0 +1,282 @@
Migrating From GRDB 6 to GRDB 7
===============================
**This guide helps you upgrade your applications from GRDB 6 to GRDB 7.**
- [Preparing the Migration to GRDB 7](#preparing-the-migration-to-grdb-7)
- [Recommendations Regarding Swift Concurrency](#recommendations-regarding-swift-concurrency)
- [New requirements](#new-requirements)
- [Companion Libraries](#companion-libraries)
- [Column Coding Strategies](#column-coding-strategies)
- [Cancellable Async Database Accesses](#cancellable-async-database-accesses)
- [Default Transaction Kind](#default-transaction-kind)
- [Associations to record types named Bias, Focus, Gas, and Lens](#associations-to-record-types-named-bias-focus-gas-and-lens)
- [ValueObservation and the Main Actor](#valueobservation-and-the-main-actor)
- [Access to SQLite C functions](#access-to-sqlite-c-functions)
- [The Record Base Class is Discouraged](#the-record-base-class-is-discouraged)
- [Other Changes](#other-changes)
## Preparing the Migration to GRDB 7
Before upgrading, ensure you are using the [latest GRDB 6 release](https://github.com/groue/GRDB.swift/tags) and address any deprecation warnings. Once this is done, proceed with upgrading to GRDB 7. Due to breaking changes, your application may no longer compile. Follow the fix-it suggestions for simple syntax updates, and review the specific modifications described below.
## Recommendations Regarding Swift Concurrency
GRDB 7 requires Xcode 16+ and a Swift 6 compiler.
Depending on the language mode and level of concurrency checking used by your application, you may see warnings or errors. See [Migrating to Swift 6] on swift.org for more information about Swift 6. See [Swift Concurrency and GRDB] for GRDB-focused advice.
## New requirements
GRDB requirements have been bumped:
- **Swift Compiler 6+** (was Swift 5.7+).
- **Xcode 16.0+** (was Xcode 14.0+)
- **iOS 13+** (was iOS 11+)
- **macOS 10.15+** (was macOS 10.13+)
- **tvOS 13+** (was tvOS 11+)
- **watchOS 7.0+** (was watchOS 4+)
- **SQLite 3.20.0+** (was SQLite 3.19.3+)
## Companion Libraries
Companion libraries have been updated for GRDB 7:
- [GRDBQuery releases](https://github.com/groue/GRDBQuery/releases) (SwiftUI)
- [GRDBSnapshotTesting releases](https://github.com/groue/GRDBSnapshotTesting/releases) (Snapshot Testing)
## Column Coding Strategies
In GRDB 6, Codable record types can specify how `Data`, `Date`, and `UUID` properties are stored in the database:
```swift
// GRDB 6
struct Player {
static let databaseDataDecodingStrategy = ...
static let databaseDateDecodingStrategy = ...
static let databaseDataEncodingStrategy = ...
static let databaseDateEncodingStrategy = ...
static let databaseUUIDEncodingStrategy = ...
}
```
These properties have been removed in GRDB 7. You must now define methods that accept a column argument:
```swift
// GRDB 7
struct Player {
static func databaseDataDecodingStrategy(for column: String) -> DatabaseDataDecodingStrategy { ... }
static func databaseDateDecodingStrategy(for column: String) -> DatabaseDateDecodingStrategy { ...}
static func databaseDataEncodingStrategy(for column: String) -> DatabaseDataEncodingStrategy { ... }
static func databaseDateEncodingStrategy(for column: String) -> DatabaseDateEncodingStrategy { ... }
static func databaseUUIDEncodingStrategy(for column: String) -> DatabaseUUIDEncodingStrategy { ... }
}
```
## Cancellable Async Database Accesses
In GRDB 6, asynchronous database accesses such as `try await read { ... }` or `try await write { ... }` complete even if the wrapper Task is cancelled.
In GRDB 7, asynchronous database accesses respect Task cancellation. If a Task is cancelled, reads and writes throw a `CancellationError`, pending transactions are rolled back, and the database is not modified. The only SQL statement that can execute in a cancelled database access is `ROLLBACK`.
The effect of this change on your application depends on how it uses tasks. For example, take care of database jobs initiated from the [`task`](https://developer.apple.com/documentation/swiftui/view/task(priority:_:)) SwiftUI modifier.
If you want an asynchronous database access to always complete, regardless of Task cancellation, wrap it in an unstructured Task:
```swift
// Create a new Task in order to ignore
// cancellation of the current task, and
// make sure database changes are always
// committed to disk.
let task = Task {
try await writer.write { ... }
}
// If needed, wait for the database job to complete:
try await task.value
```
Other asynchronous database accesses, such as methods accepting a completion block (`asyncRead`, etc.), Combine publishers, RxSwift observables, do not handle cancellation and will proceed to completion by default.
## Associations to record types named Bias, Focus, Gas, and Lens
GRDB 7 has fixed its singularization and pluralization rules for database tables named "bias", "focus", "gas", and "lens".
If your application defines associations to those tables, you can now rely on proper inflections (pluralization and singularization).
With GRDB 7, you can remove custom association keys:
```swift
struct Camera: TableRecord {
// GRDB 6: fix incorrect GRDB inflection
static let lenses = hasMany(Lens.self).forKey("lenses")
// GRDB 7
static let lenses = hasMany(Lens.self)
}
```
If your application was not specifying custom association keys in order to fix the wrong inflections, then it may define types that will no longer decode their properties as intended:
```swift
// Works in GRDB 6, breaks in GRDB 7
struct CameraWithLenses: Decodable, FetchableRecord {
var camera: Camera
var lens: [Lens] // <- incorrect pluralization
}
let results = Camera
.including(all: Camera.lenses)
.asRequest(of: CameraWithLenses.self)
.fetchAll(db)
```
There are two possible solutions. One is to rename properties, the other is to keep on using the wrong inflection (it's your call):
```swift
// GRDB 7, alternative 1
struct CameraWithLenses: Decodable, FetchableRecord {
var camera: Camera
var lenses: [Lens] // <- fixed pluralization
}
// GRDB 7, alternative 2
struct Camera: TableRecord {
// Use "lens" instead of "lenses" for GRDB 6 compatibility.
static let lenses = hasMany(Lens.self).forKey("lens")
}
```
## Default Transaction Kind
Some applications specify a default transaction kind, which was previously recommended in the [Sharing a Database] guide:
```swift
// GRDB 6
var config = Configuration()
config.defaultTransactionKind = .immediate
```
In GRDB 7, `Configuration` no longer has a `defaultTransactionKind` property, because transactions are automatically managed. Reads use DEFERRED transactions, and writes use IMMEDIATE transactions.
You can still specify a transaction kind explicitly when necessary. See [Transaction Kinds] for details.
## ValueObservation and the Main Actor
In GRDB 7, `ValueObservation` favors the main actor, because it is frequently used to automatically update database values on screen.
By default, its [`start`](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation/start(in:scheduling:onerror:onchange:)) method must be called on the main actor, and its notification callbacks run on the main actor as well.
It is not necessary to call `MainActor.assumeIsolated` in `ValueObservation` callbacks:
```swift
// GRDB 7
@MainActor func startObservation() {
let observation = ValueObservation.tracking { ... }
let cancellable = observation.start(in: dbQueue) { error in
// This closure is MainActor-isolated.
} onChange: { value in
// This closure is MainActor-isolated.
print("Fresh value", value)
}
}
```
You can opt-out of the main actor with a specific scheduler such as `.async(onQueue:)`:
```swift
func startObservation() {
let observation = ValueObservation.tracking { ... }
let cancellable = observation.start(
in: dbQueue,
scheduling: .async(onQueue: .main))
{ error in
// Called on the specified dispatch queue.
} onChange: { value in
// Called on the specified dispatch queue.
print("Fresh value", value)
}
}
```
## Access to SQLite C functions
In GRDB 6, the underlying C SQLite library is implicitly available:
```swift
// GRDB 6
import GRDB
let sqliteVersion = sqlite3_libversion_number()
```
In GRDB 7, you may need an additional import, depending on how GRDB is integrated:
- If your app uses the GRDB Swift Package Manager (SPM) package:
```swift
import SQLite3
let sqliteVersion = sqlite3_libversion_number()
```
The GRDB 6 SPM package included a product named "CSQLite." In GRDB 7, this product has been renamed "GRDBSQLite." Update your dependencies accordingly. It is unclear at the time of writing whether some projects can remove this dependency.
- If your app uses SQLCipher:
```swift
import SQLCipher
let sqliteVersion = sqlite3_libversion_number()
```
- In other cases, no additional import is needed.
## The Record Base Class is Discouraged
Subclassing the [Record] class is **discouraged** in GRDB 7. Present in GRDB 1.0, in 2017, it has served its purpose.
It is not recommended to define any new type that subclasses `Record`.
It is recommended to refactor `Record` subclasses into Swift structs, before you enable the strict concurrency checking or the Swift 6 language mode. See [Migrating to Swift 6] for more information about Swift 6 language modes.
For example:
```swift
// GRDB 6
class Player: Record {
var id: UUID
var name: String
var score: Int
override class var databaseTableName: String { "player" }
init(id: UUID, name: String, score: Int) { ... }
required init(row: Row) throws { ... }
override func encode(to container: inout PersistenceContainer) throws { ...}
}
// GRDB 7
struct Player: Codable {
var id: UUID
var name: String
var score: Int
}
extension Player: FetchableRecord, PersistableRecord { }
```
Do not miss [Swift Concurrency and GRDB], for more recommendations regarding non-Sendable record types in GRDB.
## Other Changes
- `DatabasePool.concurrentRead` has been removed. Use [`asyncConcurrentRead`](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasepool/asyncconcurrentread(_:)) instead.
- The `PersistenceContainer` subscript no longer guarantees that the value returned is the same as what was previously set. It only guarantees that both values are encoded identically in the database.
- The async sequence returned by [`ValueObservation.values`](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation/values(in:scheduling:bufferingpolicy:)) now iterates on the cooperative thread pool by default. Use .mainActor as the scheduler if you need the previous behavior.
[Migrating to Swift 6]: https://www.swift.org/migration/documentation/migrationguide
[Sharing a Database]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasesharing
[Transaction Kinds]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/transactions#Transaction-Kinds
[Swift Concurrency and GRDB]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/swiftconcurrency
[Record]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/record
@@ -1,729 +1,4 @@
Good Practices for Designing Record Types
=========================================
This guide aims at helping you leverage the best of GRDB [records] and [associations].
Since GRDB sits right between low-level libraries like SQLite itself or [FMDB], and high-level ORM like [Core Data] or [Realm], you may face questions when designing the model layer of your application.
To support this guide, we'll design a simple library application that lets the user crawl through books and their authors.
- [Trust SQLite More Than Yourself]
- [Persistable Record Types are Responsible for Their Tables]
- [Define Record Requests]
- [Compose Records]
- [How to Design Database Managers]
- [Observe the Database and Refetch when Needed]
## Trust SQLite More Than Yourself
It is important to put things in the right order. An SQLite database stored on one of your user's device is more important than the Swift code that accesses it. When a user installs a new version of your application, all the code may change, but the database remains the same.
This is why we recommend defining a **robust database schema** even before playing with record types.
SQLite is a battle-tested database. Even if you don't know it well, and aren't familiar with the SQL language, you are able to take profit from its solid foundation. It is very difficult to corrupt an SQLite database file. And it can make sure that only valid information is persisted on disk.
This is important because we developers write bugs, and some of them will ship in the wild, affecting the users of our applications. But SQLite will prevent many of those bugs from corrupting our precious users' data.
For example, if we were to define a [migration] that sets up our library database, made of books and their authors, we could write:
```swift
var migrator = DatabaseMigrator()
migrator.registerMigration("createLibrary") { db in
try db.create(table: "author") { t in // (1)
t.autoIncrementedPrimaryKey("id") // (2)
t.column("name", .text).notNull() // (3)
t.column("country", .text) // (4)
}
try db.create(table: "book") { t in
t.autoIncrementedPrimaryKey("id")
t.column("title", .text).notNull() // (5)
t.column("authorId", .integer) // (6)
.notNull() // (7)
.indexed() // (8)
.references("author", onDelete: .cascade) // (9)
}
}
try migrator.migrate(dbQueue)
```
1. Our database table names follow the [recommended convention]: they are English, singular, and camelCased. They look like Swift identifiers: `author`, `book`, `postalAddress`, `httpRequest`.
2. Each author has a unique id.
3. An author must have a name.
4. The country of an author is not always known.
5. A book must have a title.
6. The `book.authorId` column is used to link a book to the author it belongs to.
7. The `book.authorId` column is not null so that SQLite guarantees that all books have an author.
8. The `book.authorId` column is indexed in order to ease the selection of an author's books.
9. We define a foreign key from `book.authorId` column to `authors.id`, so that SQLite guarantees that no book can refer to a missing author. On top of that, the `onDelete: .cascade` option has SQLite automatically delete all of an author's books when that author is deleted. See [Foreign Key Actions] for more information.
Thanks to this database schema, you can be confident that no matter how wrong our application goes, it will always process *consistent data*. Even after a hard crash, application will always find the author of any book, all books will have a non-nil title, etc.
> :bulb: **Tip**: Don't look at your local SQLite database as you look at the JSON you load from a remote server. You can't control the JSON, its format and content: your application must defend itself against wacky servers. But you can control the database. Put the database on your side, make it trustable. Learn about relational databases, and how they can help you guarantee the quality of your application data. Put as much energy as you can in the proper definition of your database schema.
>
> :bulb: **Tip**: Plan early for future versions of your application, and use [migrations].
>
> :bulb: **Tip**: In the definition of your migrations, define tables and their columns with **strings**:
>
> ```swift
> migrator.registerMigration("createLibrary") { db in
> // RECOMMENDED
> try db.create(table: "author") { t in
> t.autoIncrementedPrimaryKey("id")
> ...
> }
>
> // NOT RECOMMENDED
> try db.create(table: Author.databaseTableName) { t in
> t.autoIncrementedPrimaryKey(Author.Columns.id.name)
> ...
> }
> }
> ```
>
> By using strings, you make sure that you will not have to change the Swift code of your migrations in the future. Even if author columns eventually change. Even if the Author type eventually gets replaced with another type. Even when your startup eventually pivots and starts selling pet food. A good migration that never changes is easy to test once and for good. A good migration that never changes will run smoothly on all devices in the wild, even if a user upgrades straight from version 1.0 to version 5.0 of your application.
>
> So make sure that migrations don't use application types and values: migrations should talk to the database, only to the database, and use the database language: **strings**.
## Persistable Record Types are Responsible for Their Tables
Define one record type per database table, and make it adopt a [PersistableRecord] protocol.
In this sample code, we'll use Codable structs, but there are [other ways](../README.md#examples-of-record-definitions) to define records.
```swift
struct Author: Codable {
var id: Int64?
var name: String
var country: String?
}
struct Book: Codable {
var id: Int64?
var authorId: Int64
var title: String
}
// Add Database access
extension Author: FetchableRecord, MutablePersistableRecord {
// Update auto-incremented id upon successful insertion
mutating func didInsert(with rowID: Int64, for column: String?) {
id = rowID
}
}
extension Book: FetchableRecord, MutablePersistableRecord {
// Update auto-incremented id upon successful insertion
mutating func didInsert(with rowID: Int64, for column: String?) {
id = rowID
}
}
```
That's it. The `Author` type can read and write in the `author` database table. `Book` as well, in `book`. See [record protocols] for more information.
> :bulb: **Tip**: When a column of a database table can't be NULL, store it in a non-optional property of your record type. On the other side, when the database may contain NULL, define an optional property.
>
> :bulb: **Tip**: When a database table uses an auto-incremented identifier, make the `id` property optional (so that you can instantiate a record before it gets inserted and gains an id), and implement the `didInsert(with:for:)` method:
>
> ```swift
> try dbQueue.write { db in
> var author = Author(id: nil, name: "Hermann Melville", country: "United States")
> try author.insert(db)
> print(author.id!) // Guaranteed non-nil id
> }
> ```
Since `Author` and `Book` can insert, update, and delete rows in the `author` and `book` database tables, they are *responsible for modifying those database tables*.
Applying the **[Single Responsibility Principle]** has a consequence: don't even try to have an author responsible for its books. Don't add a `books: [Book]` property in Author. Don't let Author write in the `book` table. When a new fellow coworker joins your team and asks you "who is saving books in the database?", you don't want to answer "it depends." You want to confidently answer: "the Book type".
> :bulb: **Tip**: Make sure each record type deals with one database table, and only one database table.
## Define Record Requests
Now that we have record types that are able to read and write in the database, we'd like to put them to good use.
> :bulb: **Tip**: Define an enumeration of columns that you will use in order to filter, sort, etc.
When your record type is a [Codable Record], derive columns from the [CodingKeys] enum:
```swift
// For a codable record
extension Author {
// Define database columns from CodingKeys
enum Columns {
static let id = Column(CodingKeys.id)
static let name = Column(CodingKeys.name)
static let country = Column(CodingKeys.country)
}
}
```
Otherwise, declare a plain String enum that conforms to the ColumnExpression protocol:
```swift
// For a non-codable record
extension Author {
// Define database columns as an enum
enum Columns: String, ColumnExpression {
case id, name, country
}
}
```
> :bulb: **Tip**: Define commonly used requests in a constrained extension of the `DerivableRequest` protocol.
The `DerivableRequest` protocol generally lets you filter, sort, and join or include associations (we'll talk about associations in the [Compose Records] chapter below).
Here is how you define those requests:
```swift
// Some requests of Author --------------------v
extension DerivableRequest where RowDecoder == Author {
/// Returns a request for all authors ordered by name, in a localized
/// case-insensitive fashion
func orderByName() -> Self {
let name = Author.Columns.name
return order(name.collating(.localizedCaseInsensitiveCompare))
}
/// Returns a request for all authors from a country
func filter(country: String) -> Self {
return filter(Author.Columns.country == country)
}
}
```
Those methods defined on the `DerivableRequest` protocol hide intimate database details. They allow you to compose database requests in a fluent style:
```swift
try dbQueue.read { db in
let sortedAuthors: [Author] = try Author.all()
.orderByName()
.fetchAll(db)
let frenchAuthors: [Author] = try Author.all()
.filter(country: "France")
.fetchAll(db)
let sortedSpanishAuthors: [Author] = try Author.all()
.filter(country: "Spain")
.orderByName()
.fetchAll(db)
}
```
Those customized request methods are also available on record associations, because associations conform to the `DerivableRequest` protocol:
```swift
// Some requests of Book
extension DerivableRequest where RowDecoder == Book {
/// Returns a request for all books from a country
func filter(authorCountry: String) -> Self {
// A book is from a country if it can be
// joined with an author from that country:
// ---------------------------------v
return joining(required: Book.author.filter(country: authorCountry))
}
}
try dbQueue.read { db in
let italianBooks = try Book.all()
.filter(authorCountry: "Italy")
.fetchAll(db)
}
```
Not *every requests* can be expressed on `DerivableRequest`. For example, [Association Aggregates] are out of scope. When this happens, define your requests in a constrained extension to `QueryInterfaceRequest`:
```swift
// More requests of Author -------------------------v
extension QueryInterfaceRequest where RowDecoder == Author {
/// Returns a request for all authors with at least one book
func havingBooks() -> QueryInterfaceRequest<Author> {
return having(Author.books.isEmpty == false)
}
}
```
Those requests defined on `QueryInterfaceRequest` still compose fluently:
```swift
try dbQueue.read { db in
let sortedFrenchAuthorsHavingBooks = try Author.all()
.filter(country: "France")
.havingBooks() // <-
.orderByName()
.fetchAll(db)
}
```
Finally, when it happens that a request only makes sense when defined on the Record type itself, just go ahead and define a static method or property of your Record type:
```swift
extension MySingletonRecord {
/// The one any only record stored in the database
static let shared = all().limit(1)
}
let singleton = try dbQueue.read { db
try MySingletonRecord.shared.fetchOne(db)
}
```
## Compose Records
We'd like to navigate from books to authors and vice-versa: we may want to know an author's books, or a book's author.
GRDB can help you do this with [associations]. In our case, each author **has many** books, and each book **belongs to** its author. Here is how you define those associations:
```swift
extension Author {
static let books = hasMany(Book.self)
}
extension Book {
static let author = belongsTo(Author.self)
}
```
Thanks to this setup, you can fetch associated records, or compute aggregated values from associated records. For example:
```swift
// Fetch all authors and their number of books
struct AuthorInfo: Decodable, FetchableRecord {
var author: Author
var bookCount: Int
}
let authorInfos: [AuthorInfo] = try dbQueue.read { db in
let request = Author.annotated(with: Author.books.count)
return try AuthorInfo.fetchAll(db, request)
}
// Fetch all Colombian books and their authors:
struct Authorship: Decodable, FetchableRecord {
var book: Book
var author: Author
}
let authorships: [Authorship] = try dbQueue.read { db in
let request = Book.including(required: Book.author.filter(country: "Colombia"))
return try Authorship.fetchAll(db, request)
}
```
As in the sample code above, requests which feed from several associated records will often have you define extra record types, such as `AuthorInfo` and `Authorship`. Those extra record types are designed to be able to decode database requests. The names and types of their properties follow the conventions defined by [associations]. Make them conform to the Decodable and FetchableRecord protocols so that they can decode database rows in a breeze.
Unlike the primitive persistable record types `Author` and `Book`, those records can not write in the database. They are simple data types, passive views on the database content. Remember, only [Persistable Record Types are Responsible for Their Tables].
> :question: **Note**: The example `AuthorInfo` and `Authorship` types above may look superfluous to you. After all, other ORMs out there are able to navigate in complex graphs of records without much fuss, aren't they?
>
> That is because other ORMs perform lazy loading:
>
> ```ruby
> # Ruby's Active Record
> author = Author.find(123) # fetch author
> book_count = author.books.count # lazily counts books on demand
> ```
>
> GRDB does not perform lazy loading. Lazy loading either requires records to be *managed* (as in [Core Data] and [Realm]), or that all data processing happens in a *single function* (think of an HTTP request handled with a web-oriented ORM like [Active Record] and [Django]). The underlying issue is *data consistency*: you always want your memory objects to accurately represent your application data, without any glitch, ever. This involves the subtle database concept of [isolation] against concurrent changes. In a GUI application, this can't be achieved without a very complex record management, and non-trivial pain points for the application developer.
>
> This is why GRDB has removed lazy loading from the list of desirable features. Instead, it provides the tooling needed to fetch data, even complex ones, in a single and safe stroke. See the "Solving Problems" chapter of [Why Adopt GRDB?](WhyAdoptGRDB.md#solving-problems) for more information.
Granted with primitive and derived record types, your application will load the data it needs, at the moment it needs it, as below:
1. Prepare the application screen that lists all authors:
```swift
let authors: [Author] = try dbQueue.read { db in
try Author.all().orderByName().fetchAll(db)
}
```
2. Prepare the application screen that displays an author and her books:
```swift
struct AuthorInfo: Codable, FetchableRecord {
var author: Author
var books: [Book]
}
let authorId = 123
let authorInfo: AuthorInfo? = try dbQueue.read { db in
let request = Author
.filter(key: authorId)
.including(all: Author.books)
return try AuthorInfo.fetchOne(db, request)
}
```
3. Prepare the application screen that displays a book information:
```swift
struct BookInfo: Decodable, FetchableRecord {
var book: Book
var author: Author
}
let bookId = 123
let bookInfo: BookInfo? = try dbQueue.read { db in
let request = Book
.filter(key: bookId)
.including(required: Book.author)
return try BookInfo.fetchOne(db, request)
}
```
> :bulb: **Tip**: Identify the various **graph of objects** needed by the various parts of your application. Design them independently, by composing primitive record types linked by associations. Fetch the data your application needs, at the moment it needs it, no more, no less.
A last extension on your record types will further help navigation from records to associated ones:
```swift
extension Author {
/// The request for the author's books
var books: QueryInterfaceRequest<Book> {
return request(for: Author.books)
}
}
extension Book {
/// The request for the author of the book
var author: QueryInterfaceRequest<Author> {
return request(for: Book.author)
}
}
```
Those properties provide an alternative way to feed our application:
1. Prepare the application screen that displays an author and her books:
```swift
struct AuthorInfo {
var author: Author
var books: [Book]
}
let authorId = 123
let authorInfo: AuthorInfo? = try dbQueue.read { db in
guard let author = try Author.fetchOne(db, key: authorId) else {
return nil
}
let books = try author.books.fetchAll(db)
return AuthorInfo(
author: author,
books: books)
}
```
2. Prepare the application screen that displays a book information:
```swift
struct BookInfo {
var book: Book
var author: Author
}
let bookId = 123
let bookInfo: BookInfo? = try dbQueue.read { db in
guard let book = try Book.fetchOne(db, key: bookId) else {
return nil
}
guard let author = try book.author.fetchOne(db) else {
return nil
}
return BookInfo(book: book, author: author)
}
```
## How to Design Database Managers
Many developpers want to hide GRDB database queues and pools inside "database managers":
```swift
// LibraryManager grants access to the library database.
class LibraryManager {
private let dbQueue: DatabaseQueue
init(dbQueue: DatabaseQueue) {
self.dbQueue = dbQueue
}
}
```
> :bulb: **Tip**: Don't let your database managers create their own databases. Instead, give them a database created by, say, the ApplicationDelegate. This will allow you to efficiently test the database manager with an in-memory database, for example.
Design your database managers with the [GRDB concurrency rules] in mind.
Practically, let's start with a naive example, and gradually improve it:
```swift
// A naive manager that we will improve
class NaiveLibraryManager {
private let dbQueue: DatabaseQueue
init(dbQueue: DatabaseQueue) {
self.dbQueue = dbQueue
}
func author(id: Int64) -> Author? {
do {
return try dbQueue.read { db in
try Author.fetchOne(db, key: id)
}
} catch {
return nil
}
}
func book(id: Int64) -> Book? {
do {
return try dbQueue.read { db in
try Book.fetchOne(db, key: id)
}
} catch {
return nil
}
}
func books(writtenBy author: Author) -> [Book] {
do {
return try dbQueue.read { db in
try author.books.fetchAll(db)
}
} catch {
return []
}
}
}
```
**This manager can be improved in two ways.**
- [Embrace Errors]
- [Thread-Safety is also an Application Concern]
### Embrace Errors
Have database managers throw database errors instead of catching them.
Consider Apple's [CNContactStore](https://developer.apple.com/documentation/contacts/cncontactstore), for example. Does it hide errors when you fetch or save address book contacts? No it does not. Keychain, Media assets, File system, Core Data? No they do not hide errors either. Follow the practices of Apple engineers: do not hide errors :muscle:
Exposing errors will help you building your application:
- You will be able to inspect errors during development, and fix bugs. `do { ... } catch { print(error) }` will save you hours of clueless questioning.
- You will be able to opt in for advanced OS features like [data protection].
> :bulb: **Tip**: Don't hide database errors. Let the application handle them, because only application can decide how to handle them.
This gives the improved manager below. And it has less code, which means less bugs :bowtie:
```swift
// An improved manager that does not hide errors
class ImprovedLibraryManager {
private let dbQueue: DatabaseQueue
init(dbQueue: DatabaseQueue) {
self.dbQueue = dbQueue
}
func author(id: Int64) throws -> Author? {
return try dbQueue.read { db in
try Author.fetchOne(db, key: id)
}
}
func book(id: Int64) throws -> Book? {
return try dbQueue.read { db in
try Book.fetchOne(db, key: id)
}
}
func books(writtenBy author: Author) throws -> [Book] {
return try dbQueue.read { db in
try author.books.fetchAll(db)
}
}
}
```
### Thread-Safety is also an Application Concern
Now, let's make our database manager **thread-safe**.
This one is more subtle. In order to understand what is wrong in our naive manager, one has to consider how it is used by the application.
For example, in the screen that displays an author and her books, we would write:
```swift
let authorId = 123
if let author = libraryManager.author(id: authorId) {
let books = libraryManager.books(writtenBy: author)
// Use author and books
}
```
This code is not thread-safe, because other application threads may have modified the database between the two database accesses. You may end up with an author without any book, and this sure does not make a pretty application screen.
Such bugs are uneasy to reproduce. Sometimes your application will refresh the library content from the network, and delete an author right at the wrong time. The more users your application has, the more users will see weird screens. And of course, you'll be bitten right on the day of the demo in front of the boss.
Fortunately, GRDB has all the tools you need to prevent such nasty data races:
> :bulb: **Tip**: Make sure you fetch all the data your application needs at a given moment of time, in a **single database read**.
This gives a much safer manager:
```swift
// A manager that actually manages
class LibraryManager {
private let dbQueue: DatabaseQueue
init(dbQueue: DatabaseQueue) {
self.dbQueue = dbQueue
}
}
// Feeds the list of authors
extension LibraryManager {
struct AuthorListItem: Decodable, FetchableRecord {
let author: Author
let bookCount: Int
}
func authorList() throws -> [AuthorListItem] {
return try dbQueue.read { db in
let request = Author
.annotated(with: Author.books.count)
.orderByName()
return try AuthorListItem.fetchAll(db, request)
}
}
}
// Feeds a book screen
extension LibraryManager {
struct BookInfo {
var book: Book
var author: Author
}
func bookInfo(bookId: Int64) throws -> BookInfo? {
return try dbQueue.read { db in
guard let book = try Book.fetchOne(db, key: bookId) else {
return nil
}
guard let author = try book.author.fetchOne(db) else {
return nil
}
return BookInfo(book: book, author: author)
}
}
}
// Feeds an author screen
extension LibraryManager {
struct AuthorInfo {
var author: Author
var books: [Book]
}
func authorInfo(authorId: Int64) throws -> AuthorInfo? {
return try dbQueue.read { db in
guard let author = try Author.fetchOne(db, key: authorId) else {
return nil
}
let books = try author.books.fetchAll(db)
return AuthorInfo(author: author, books: books)
}
}
}
```
The `AuthorListItem`, `BookInfo`, `AuthorInfo` types returned by the manager are designed to feed your views.
When a new screen is added to your application, and you want to make sure it displays **consistent data** free from any data race, make sure you update the manager if needed. The rule is very simple: consumed data must come from a **single** database access method (`dbQueue.read`, `write`, etc.), or [ValueObservation].
In other words: since GRDB is an unmanaged ORM, some amount of management must be imported into your application in order to make it fully thread-safe.
> :question: **Note**: Wrapping several fetches in a single `read` method may look like an inconvenience to you. After all, other ORMs don't require that much ceremony:
>
> ```ruby
> # Ruby's Active Record
> book = Book.find(123) # fetch book
> author = book.author # fetch author
> # use book and author
> ```
>
> The problem is that it is very hard to guarantee that you will surely fetch an author after you have fetched a book, despite the constraints of the database schema. One has to perform subsequent fetches in the proper [isolation] level, so that eventual concurrent writes that modify the database are unable to mess with subsequent requests.
>
> This isolation can be achieved with record management, as in [Core Data] or [Realm], that target long-running multi-threaded applications. On the other side, most web-oriented ORMs rely on short-lived database transactions, so that each HTTP request can be processed independently of others.
>
> GRDB is not a managed ORM. It thus has to use the same isolation techniques as web-oriented ORMs. But unlike web-oriented ORMs, GRDB can't provide implicit isolation: the application must decide when it wants to safely read information in the database, and this decision is made explicit, in your application code, with database access methods such as `dbQueue.read`.
>
> See the [Concurrency Guide] for detailed information, and the "Solving Problems" chapter of [Why Adopt GRDB?](WhyAdoptGRDB.md#solving-problems) for more rationale.
## Observe the Database and Refetch when Needed
We have seen above that the primitive Author and Book record types are [responsible](#persistable-record-types-are-responsible-for-their-tables) for their own database tables. Later we built [requests](#define-record-requests) and [composed](#compose-records) records into more complex ones such as BookInfo or AuthorInfo. We have shown how [database managers](#how-to-design-database-managers) should expose database content to the rest of the application.
Database content which has been fetched into memory eventually becomes obsoleted, as the application modifies the database content.
It is up to the application to decide how long it should keep fetched information in memory. Very often though, the application will want to keep memory information synchronized with the database content.
This synchronization is not automatic with GRDB: records do not "auto-update". That is because applications do not always want this feature, and because it is difficult to write correct multi-threaded applications when values can change in unexpected ways.
Instead, have a look at [Database Observation]:
> :bulb: **Tip**: [ValueObservation] performs automated tracking of database changes.
>
> :bulb: **Tip**: [GRDBCombine] performs automated tracking of database changes, in the [Combine](https://developer.apple.com/documentation/combine) way.
>
> :bulb: **Tip**: [RxGRDB] performs automated tracking of database changes, in the [RxSwift](https://github.com/ReactiveX/RxSwift) way.
>
> :bulb: **Tip**: [TransactionObserver] provides low-level database observation, for your most advanced needs.
>
> :bulb: **Tip**: Don't try to write complex methods that both modify the database and the values in memory at the same time. Instead, modify the database with plain record types, and rely on database observation for automatically refreshing values, even complex ones.
[records]: ../README.md#records
[associations]: AssociationsBasics.md
[FMDB]: https://github.com/ccgus/fmdb
[Core Data]: https://developer.apple.com/documentation/coredata
[Realm]: https://realm.io
[Active Record]: http://guides.rubyonrails.org/active_record_basics.html
[Django]: https://docs.djangoproject.com/en/2.0/topics/db/
[record protocols]: ../README.md#record-protocols-overview
[Separation of Concerns]: https://en.wikipedia.org/wiki/Separation_of_concerns
[Single Responsibility Principle]: https://en.wikipedia.org/wiki/Single_responsibility_principle
[Single Source of Truth]: https://en.wikipedia.org/wiki/Single_source_of_truth
[Divide and Conquer]: https://en.wikipedia.org/wiki/Divide_and_rule
[Why Adopt GRDB?]: WhyAdoptGRDB.md
[isolation]: https://en.wikipedia.org/wiki/Isolation_(database_systems)
[migrations]: ../README.md#migrations
[migration]: ../README.md#migrations
[Foreign Key Actions]: https://sqlite.org/foreignkeys.html#fk_actions
[Concurrency Guide]: ../README.md#concurrency
[GRDB concurrency rules]: ../README.md#concurrency
[PersistableRecord]: ../README.md#persistablerecord-protocol
[Database Observation]: ../README.md#database-changes-observation
[ValueObservation]: ../README.md#valueobservation
[RxGRDB]: http://github.com/RxSwiftCommunity/RxGRDB
[GRDBCombine]: http://github.com/groue/GRDBCombine
[TransactionObserver]: ../README.md#transactionobserver-protocol
[Trust SQLite More Than Yourself]: #trust-sqlite-more-than-yourself
[Persistable Record Types are Responsible for Their Tables]: #persistable-record-types-are-responsible-for-their-tables
[Define Record Requests]: #define-record-requests
[Compose Records]: #compose-records
[How to Design Database Managers]: #how-to-design-database-managers
[Observe the Database and Refetch when Needed]: #observe-the-database-and-refetch-when-needed
[query interface]: ../README.md#the-query-interface
[observe database changes]: ../README.md#database-changes-observation
[data protection]: ../README.md#data-protection
[Embrace Errors]: #embrace-errors
[Thread-Safety is also an Application Concern]: #thread-safety-is-also-an-application-concern
[recommended convention]: AssociationsBasics.md#associations-and-the-database-schema
[Association Aggregates]: AssociationsBasics.md#association-aggregates
[Codable Record]: ../README.md#codable-records
[CodingKeys]: https://developer.apple.com/documentation/foundation/archives_and_serialization/encoding_and_decoding_custom_types
This guide [has moved](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/recordrecommendedpractices).
@@ -0,0 +1,337 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="496px" height="270px" viewBox="0 0 496 270" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>DatabasePoolConcurrentRead</title>
<defs>
<filter x="-19.5%" y="-53.8%" width="139.1%" height="207.5%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="3" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
<linearGradient x1="50%" y1="99.532889%" x2="50%" y2="1.11022302e-14%" id="linearGradient-2">
<stop stop-color="#FFFFFF" stop-opacity="0" offset="0%"></stop>
<stop stop-color="#FFFFFF" offset="100%"></stop>
</linearGradient>
<filter x="-19.5%" y="-53.8%" width="139.1%" height="207.5%" filterUnits="objectBoundingBox" id="filter-3">
<feOffset dx="0" dy="3" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
<filter x="-19.5%" y="-53.8%" width="139.1%" height="207.5%" filterUnits="objectBoundingBox" id="filter-4">
<feOffset dx="0" dy="3" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
<rect id="path-5" x="0" y="0" width="449" height="40"></rect>
<filter x="-19.5%" y="-17.9%" width="139.1%" height="135.8%" filterUnits="objectBoundingBox" id="filter-7">
<feOffset dx="0" dy="3" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
<linearGradient x1="50%" y1="99.532889%" x2="50%" y2="1.11022302e-14%" id="linearGradient-8">
<stop stop-color="#FFFFFF" stop-opacity="0" offset="0%"></stop>
<stop stop-color="#FFFFFF" offset="100%"></stop>
</linearGradient>
</defs>
<g id="DatabasePoolConcurrentRead" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Threads">
<g transform="translate(46.000000, 0.000000)">
<rect id="Rectangle" fill="#FFFFFF" x="0" y="1" width="450" height="269"></rect>
<rect id="Rectangle" fill-opacity="0.02" fill="#000000" x="150" y="1" width="150" height="269"></rect>
<line x1="0.5" y1="0.307517084" x2="0.5" y2="269.692483" id="Line" stroke="#CCCCCC" stroke-linecap="square"></line>
<line x1="150.5" y1="0.307517084" x2="150.5" y2="269.692483" id="Line-Copy" stroke="#CCCCCC" stroke-linecap="square"></line>
<line x1="299.5" y1="0.307517084" x2="299.5" y2="269.692483" id="Line-Copy-2" stroke="#CCCCCC" stroke-linecap="square"></line>
<line x1="449.5" y1="0.307517084" x2="449.5" y2="269.692483" id="Line-Copy-3" stroke="#CCCCCC" stroke-linecap="square"></line>
<line x1="0.584415584" y1="0.5" x2="449.415584" y2="0.5" id="Line-2" stroke="#CCCCCC" stroke-linecap="square"></line>
<line x1="0.584415584" y1="269.5" x2="449.415584" y2="269.5" id="Line-3" stroke="#CCCCCC" stroke-linecap="square"></line>
<g id="Thread-1" transform="translate(47.748535, 10.705078)" fill="#000000" fill-rule="nonzero">
<polygon id="T" points="3.17871094 10.2949219 4.40917969 10.2949219 4.40917969 1.53808594 7.58789062 1.53808594 7.58789062 0.430664062 0 0.430664062 0 1.53808594 3.17871094 1.53808594"></polygon>
<path d="M9.25585938,10.2949219 L10.4453125,10.2949219 L10.4453125,5.93359375 C10.4453125,5.50065104 10.5239258,5.12923177 10.6811523,4.81933594 C10.8383789,4.5094401 11.0605469,4.27018229 11.3476562,4.1015625 C11.6347656,3.93294271 11.9742839,3.84863281 12.3662109,3.84863281 C12.9541016,3.84863281 13.3881836,4.00927734 13.668457,4.33056641 C13.9487305,4.65185547 14.0888672,5.14518229 14.0888672,5.81054688 L14.0888672,10.2949219 L15.2783203,10.2949219 L15.2783203,5.5234375 C15.2783203,4.94010417 15.1780599,4.44563802 14.9775391,4.04003906 C14.7770182,3.6344401 14.4853516,3.32568359 14.1025391,3.11376953 C13.7197266,2.90185547 13.2526042,2.79589844 12.7011719,2.79589844 C12.1588542,2.79589844 11.7122396,2.90413411 11.3613281,3.12060547 C11.0104167,3.33707682 10.7415365,3.64127604 10.5546875,4.03320312 L10.4453125,4.03320312 L10.4453125,0 L9.25585938,0 L9.25585938,10.2949219 Z" id="h"></path>
<path d="M17.2744141,10.2949219 L18.4638672,10.2949219 L18.4638672,5.72851562 C18.4638672,5.36848958 18.5470378,5.05403646 18.7133789,4.78515625 C18.8797201,4.51627604 19.108724,4.30664062 19.4003906,4.15625 C19.6920573,4.00585938 20.0270182,3.93066406 20.4052734,3.93066406 C20.5374349,3.93066406 20.6616211,3.93636068 20.777832,3.94775391 C20.894043,3.95914714 21.0136719,3.97623698 21.1367188,3.99902344 L21.1367188,2.84375 C21.077474,2.83463542 20.9920247,2.82438151 20.8803711,2.81298828 C20.7687174,2.80159505 20.6559245,2.79589844 20.5419922,2.79589844 C20.0452474,2.79589844 19.6282552,2.90299479 19.2910156,3.1171875 C18.953776,3.33138021 18.7145182,3.63216146 18.5732422,4.01953125 L18.4638672,4.01953125 L18.4638672,2.92578125 L17.2744141,2.92578125 L17.2744141,10.2949219 Z" id="r"></path>
<path d="M25.2587891,10.4248047 C25.6917318,10.4248047 26.0825195,10.3689779 26.4311523,10.2573242 C26.7797852,10.1456706 27.0817057,9.99527995 27.3369141,9.80615234 C27.5921224,9.61702474 27.8006185,9.40511068 27.9624023,9.17041016 C28.1241862,8.93570964 28.2369792,8.69303385 28.3007812,8.44238281 L28.3144531,8.38769531 L27.125,8.38769531 L27.0976562,8.44921875 C27.0338542,8.59505208 26.9222005,8.73860677 26.7626953,8.87988281 C26.6031901,9.02115885 26.4003906,9.13736979 26.1542969,9.22851562 C25.9082031,9.31966146 25.6188151,9.36523438 25.2861328,9.36523438 C24.8395182,9.36523438 24.4521484,9.26611328 24.1240234,9.06787109 C23.7958984,8.86962891 23.5429688,8.58479818 23.3652344,8.21337891 C23.1875,7.84195964 23.0986328,7.39420573 23.0986328,6.87011719 L23.0986328,6.3984375 C23.0986328,5.84700521 23.1897786,5.38216146 23.3720703,5.00390625 C23.554362,4.62565104 23.8015951,4.33968099 24.1137695,4.14599609 C24.425944,3.9523112 24.7802734,3.85546875 25.1767578,3.85546875 C25.5732422,3.85546875 25.9241536,3.94775391 26.2294922,4.13232422 C26.5348307,4.31689453 26.7740885,4.59602865 26.9472656,4.96972656 C27.1204427,5.34342448 27.2070312,5.81966146 27.2070312,6.3984375 L27.2070312,6.87011719 L27.7949219,6.00195312 L22.4970703,6.00195312 L22.4970703,6.95214844 L28.4033203,6.95214844 L28.4033203,6.48730469 C28.4033203,5.75358073 28.2745768,5.10986328 28.0170898,4.55615234 C27.7596029,4.00244141 27.3904622,3.57063802 26.909668,3.26074219 C26.4288737,2.95084635 25.8535156,2.79589844 25.1835938,2.79589844 C24.5182292,2.79589844 23.9371745,2.95768229 23.4404297,3.28125 C22.9436849,3.60481771 22.5597331,4.05371094 22.2885742,4.62792969 C22.0174154,5.20214844 21.8818359,5.86979167 21.8818359,6.63085938 L21.8818359,6.63769531 C21.8818359,7.4078776 22.0174154,8.07666016 22.2885742,8.64404297 C22.5597331,9.21142578 22.9471029,9.6500651 23.4506836,9.95996094 C23.9542643,10.2698568 24.5569661,10.4248047 25.2587891,10.4248047 Z" id="e"></path>
<path d="M32.1220703,10.4248047 C32.4547526,10.4248047 32.7600911,10.3780924 33.0380859,10.284668 C33.3160807,10.1912435 33.5655924,10.0533854 33.7866211,9.87109375 C34.0076497,9.68880208 34.195638,9.46777344 34.3505859,9.20800781 L34.4599609,9.20800781 L34.4599609,10.2949219 L35.6494141,10.2949219 L35.6494141,5.25 C35.6494141,4.73958333 35.5411784,4.30094401 35.324707,3.93408203 C35.1082357,3.56722005 34.7915039,3.28580729 34.3745117,3.08984375 C33.9575195,2.89388021 33.4482422,2.79589844 32.8466797,2.79589844 C32.3225911,2.79589844 31.8554688,2.87679036 31.4453125,3.03857422 C31.0351562,3.20035807 30.7013346,3.42594401 30.4438477,3.71533203 C30.1863607,4.00472005 30.0257161,4.34309896 29.9619141,4.73046875 L29.9550781,4.77148438 L31.1445312,4.77148438 L31.1513672,4.75097656 C31.2470703,4.46386719 31.4361979,4.24169922 31.71875,4.08447266 C32.0013021,3.92724609 32.3636068,3.84863281 32.8056641,3.84863281 C33.3570964,3.84863281 33.7706706,3.96826172 34.0463867,4.20751953 C34.3221029,4.44677734 34.4599609,4.79427083 34.4599609,5.25 L34.4599609,7.546875 C34.4599609,7.89778646 34.3699544,8.21223958 34.1899414,8.49023438 C34.0099284,8.76822917 33.7626953,8.98811849 33.4482422,9.14990234 C33.1337891,9.3116862 32.773763,9.39257812 32.3681641,9.39257812 C31.9397786,9.39257812 31.5843099,9.28889974 31.3017578,9.08154297 C31.0192057,8.8741862 30.8779297,8.58365885 30.8779297,8.20996094 L30.8779297,8.19628906 C30.8779297,7.83170573 31.0066732,7.54915365 31.2641602,7.34863281 C31.5216471,7.14811198 31.9306641,7.03190104 32.4912109,7 L35.0546875,6.8359375 L35.0546875,5.88574219 L32.3476562,6.04980469 C31.4908854,6.0999349 30.8289388,6.31070964 30.3618164,6.68212891 C29.894694,7.05354818 29.6611328,7.56738281 29.6611328,8.22363281 L29.6611328,8.23730469 C29.6611328,8.68391927 29.7693685,9.07128906 29.9858398,9.39941406 C30.2023112,9.72753906 30.4962565,9.98046875 30.8676758,10.1582031 C31.2390951,10.3359375 31.6572266,10.4248047 32.1220703,10.4248047 Z" id="a"></path>
<path d="M40.3935547,10.4248047 C40.9085286,10.4248047 41.3642578,10.3097331 41.7607422,10.0795898 C42.1572266,9.84944661 42.4671224,9.52929688 42.6904297,9.11914062 L42.7998047,9.11914062 L42.7998047,10.2949219 L43.9892578,10.2949219 L43.9892578,0 L42.7998047,0 L42.7998047,4.08789062 L42.6904297,4.08789062 C42.4899089,3.69596354 42.183431,3.38264974 41.7709961,3.14794922 C41.3585612,2.9132487 40.8994141,2.79589844 40.3935547,2.79589844 C39.7692057,2.79589844 39.2257487,2.953125 38.7631836,3.26757812 C38.3006185,3.58203125 37.9417318,4.02408854 37.6865234,4.59375 C37.4313151,5.16341146 37.3037109,5.83333333 37.3037109,6.60351562 L37.3037109,6.6171875 C37.3037109,7.3828125 37.4313151,8.05159505 37.6865234,8.62353516 C37.9417318,9.19547526 38.3017578,9.63867188 38.7666016,9.953125 C39.2314453,10.2675781 39.773763,10.4248047 40.3935547,10.4248047 Z M40.6669922,9.37207031 C40.2203776,9.37207031 39.8364258,9.26155599 39.5151367,9.04052734 C39.1938477,8.8194987 38.9477539,8.50276693 38.7768555,8.09033203 C38.605957,7.67789714 38.5205078,7.18684896 38.5205078,6.6171875 L38.5205078,6.60351562 C38.5205078,6.02929688 38.605957,5.53710938 38.7768555,5.12695312 C38.9477539,4.71679688 39.1938477,4.40120443 39.5151367,4.18017578 C39.8364258,3.95914714 40.2203776,3.84863281 40.6669922,3.84863281 C41.1136068,3.84863281 41.4986979,3.96028646 41.8222656,4.18359375 C42.1458333,4.40690104 42.3942057,4.72363281 42.5673828,5.13378906 C42.7405599,5.54394531 42.8271484,6.03385417 42.8271484,6.60351562 L42.8271484,6.6171875 C42.8271484,7.18229167 42.7405599,7.6710612 42.5673828,8.08349609 C42.3942057,8.49593099 42.1458333,8.81380208 41.8222656,9.03710938 C41.4986979,9.26041667 41.1136068,9.37207031 40.6669922,9.37207031 Z" id="d"></path>
<polygon id="1" points="52.3154297 10.2949219 53.5458984 10.2949219 53.5458984 0.430664062 52.3222656 0.430664062 49.6972656 2.31738281 49.6972656 3.61621094 52.2060547 1.79785156 52.3154297 1.79785156"></polygon>
</g>
<g id="Thread-2" transform="translate(196.770996, 10.705078)" fill="#000000" fill-rule="nonzero">
<polygon id="T" points="3.17871094 10.2949219 4.40917969 10.2949219 4.40917969 1.53808594 7.58789062 1.53808594 7.58789062 0.430664062 0 0.430664062 0 1.53808594 3.17871094 1.53808594"></polygon>
<path d="M9.25585938,10.2949219 L10.4453125,10.2949219 L10.4453125,5.93359375 C10.4453125,5.50065104 10.5239258,5.12923177 10.6811523,4.81933594 C10.8383789,4.5094401 11.0605469,4.27018229 11.3476562,4.1015625 C11.6347656,3.93294271 11.9742839,3.84863281 12.3662109,3.84863281 C12.9541016,3.84863281 13.3881836,4.00927734 13.668457,4.33056641 C13.9487305,4.65185547 14.0888672,5.14518229 14.0888672,5.81054688 L14.0888672,10.2949219 L15.2783203,10.2949219 L15.2783203,5.5234375 C15.2783203,4.94010417 15.1780599,4.44563802 14.9775391,4.04003906 C14.7770182,3.6344401 14.4853516,3.32568359 14.1025391,3.11376953 C13.7197266,2.90185547 13.2526042,2.79589844 12.7011719,2.79589844 C12.1588542,2.79589844 11.7122396,2.90413411 11.3613281,3.12060547 C11.0104167,3.33707682 10.7415365,3.64127604 10.5546875,4.03320312 L10.4453125,4.03320312 L10.4453125,0 L9.25585938,0 L9.25585938,10.2949219 Z" id="h"></path>
<path d="M17.2744141,10.2949219 L18.4638672,10.2949219 L18.4638672,5.72851562 C18.4638672,5.36848958 18.5470378,5.05403646 18.7133789,4.78515625 C18.8797201,4.51627604 19.108724,4.30664062 19.4003906,4.15625 C19.6920573,4.00585938 20.0270182,3.93066406 20.4052734,3.93066406 C20.5374349,3.93066406 20.6616211,3.93636068 20.777832,3.94775391 C20.894043,3.95914714 21.0136719,3.97623698 21.1367188,3.99902344 L21.1367188,2.84375 C21.077474,2.83463542 20.9920247,2.82438151 20.8803711,2.81298828 C20.7687174,2.80159505 20.6559245,2.79589844 20.5419922,2.79589844 C20.0452474,2.79589844 19.6282552,2.90299479 19.2910156,3.1171875 C18.953776,3.33138021 18.7145182,3.63216146 18.5732422,4.01953125 L18.4638672,4.01953125 L18.4638672,2.92578125 L17.2744141,2.92578125 L17.2744141,10.2949219 Z" id="r"></path>
<path d="M25.2587891,10.4248047 C25.6917318,10.4248047 26.0825195,10.3689779 26.4311523,10.2573242 C26.7797852,10.1456706 27.0817057,9.99527995 27.3369141,9.80615234 C27.5921224,9.61702474 27.8006185,9.40511068 27.9624023,9.17041016 C28.1241862,8.93570964 28.2369792,8.69303385 28.3007812,8.44238281 L28.3144531,8.38769531 L27.125,8.38769531 L27.0976562,8.44921875 C27.0338542,8.59505208 26.9222005,8.73860677 26.7626953,8.87988281 C26.6031901,9.02115885 26.4003906,9.13736979 26.1542969,9.22851562 C25.9082031,9.31966146 25.6188151,9.36523438 25.2861328,9.36523438 C24.8395182,9.36523438 24.4521484,9.26611328 24.1240234,9.06787109 C23.7958984,8.86962891 23.5429688,8.58479818 23.3652344,8.21337891 C23.1875,7.84195964 23.0986328,7.39420573 23.0986328,6.87011719 L23.0986328,6.3984375 C23.0986328,5.84700521 23.1897786,5.38216146 23.3720703,5.00390625 C23.554362,4.62565104 23.8015951,4.33968099 24.1137695,4.14599609 C24.425944,3.9523112 24.7802734,3.85546875 25.1767578,3.85546875 C25.5732422,3.85546875 25.9241536,3.94775391 26.2294922,4.13232422 C26.5348307,4.31689453 26.7740885,4.59602865 26.9472656,4.96972656 C27.1204427,5.34342448 27.2070312,5.81966146 27.2070312,6.3984375 L27.2070312,6.87011719 L27.7949219,6.00195312 L22.4970703,6.00195312 L22.4970703,6.95214844 L28.4033203,6.95214844 L28.4033203,6.48730469 C28.4033203,5.75358073 28.2745768,5.10986328 28.0170898,4.55615234 C27.7596029,4.00244141 27.3904622,3.57063802 26.909668,3.26074219 C26.4288737,2.95084635 25.8535156,2.79589844 25.1835938,2.79589844 C24.5182292,2.79589844 23.9371745,2.95768229 23.4404297,3.28125 C22.9436849,3.60481771 22.5597331,4.05371094 22.2885742,4.62792969 C22.0174154,5.20214844 21.8818359,5.86979167 21.8818359,6.63085938 L21.8818359,6.63769531 C21.8818359,7.4078776 22.0174154,8.07666016 22.2885742,8.64404297 C22.5597331,9.21142578 22.9471029,9.6500651 23.4506836,9.95996094 C23.9542643,10.2698568 24.5569661,10.4248047 25.2587891,10.4248047 Z" id="e"></path>
<path d="M32.1220703,10.4248047 C32.4547526,10.4248047 32.7600911,10.3780924 33.0380859,10.284668 C33.3160807,10.1912435 33.5655924,10.0533854 33.7866211,9.87109375 C34.0076497,9.68880208 34.195638,9.46777344 34.3505859,9.20800781 L34.4599609,9.20800781 L34.4599609,10.2949219 L35.6494141,10.2949219 L35.6494141,5.25 C35.6494141,4.73958333 35.5411784,4.30094401 35.324707,3.93408203 C35.1082357,3.56722005 34.7915039,3.28580729 34.3745117,3.08984375 C33.9575195,2.89388021 33.4482422,2.79589844 32.8466797,2.79589844 C32.3225911,2.79589844 31.8554688,2.87679036 31.4453125,3.03857422 C31.0351562,3.20035807 30.7013346,3.42594401 30.4438477,3.71533203 C30.1863607,4.00472005 30.0257161,4.34309896 29.9619141,4.73046875 L29.9550781,4.77148438 L31.1445312,4.77148438 L31.1513672,4.75097656 C31.2470703,4.46386719 31.4361979,4.24169922 31.71875,4.08447266 C32.0013021,3.92724609 32.3636068,3.84863281 32.8056641,3.84863281 C33.3570964,3.84863281 33.7706706,3.96826172 34.0463867,4.20751953 C34.3221029,4.44677734 34.4599609,4.79427083 34.4599609,5.25 L34.4599609,7.546875 C34.4599609,7.89778646 34.3699544,8.21223958 34.1899414,8.49023438 C34.0099284,8.76822917 33.7626953,8.98811849 33.4482422,9.14990234 C33.1337891,9.3116862 32.773763,9.39257812 32.3681641,9.39257812 C31.9397786,9.39257812 31.5843099,9.28889974 31.3017578,9.08154297 C31.0192057,8.8741862 30.8779297,8.58365885 30.8779297,8.20996094 L30.8779297,8.19628906 C30.8779297,7.83170573 31.0066732,7.54915365 31.2641602,7.34863281 C31.5216471,7.14811198 31.9306641,7.03190104 32.4912109,7 L35.0546875,6.8359375 L35.0546875,5.88574219 L32.3476562,6.04980469 C31.4908854,6.0999349 30.8289388,6.31070964 30.3618164,6.68212891 C29.894694,7.05354818 29.6611328,7.56738281 29.6611328,8.22363281 L29.6611328,8.23730469 C29.6611328,8.68391927 29.7693685,9.07128906 29.9858398,9.39941406 C30.2023112,9.72753906 30.4962565,9.98046875 30.8676758,10.1582031 C31.2390951,10.3359375 31.6572266,10.4248047 32.1220703,10.4248047 Z" id="a"></path>
<path d="M40.3935547,10.4248047 C40.9085286,10.4248047 41.3642578,10.3097331 41.7607422,10.0795898 C42.1572266,9.84944661 42.4671224,9.52929688 42.6904297,9.11914062 L42.7998047,9.11914062 L42.7998047,10.2949219 L43.9892578,10.2949219 L43.9892578,0 L42.7998047,0 L42.7998047,4.08789062 L42.6904297,4.08789062 C42.4899089,3.69596354 42.183431,3.38264974 41.7709961,3.14794922 C41.3585612,2.9132487 40.8994141,2.79589844 40.3935547,2.79589844 C39.7692057,2.79589844 39.2257487,2.953125 38.7631836,3.26757812 C38.3006185,3.58203125 37.9417318,4.02408854 37.6865234,4.59375 C37.4313151,5.16341146 37.3037109,5.83333333 37.3037109,6.60351562 L37.3037109,6.6171875 C37.3037109,7.3828125 37.4313151,8.05159505 37.6865234,8.62353516 C37.9417318,9.19547526 38.3017578,9.63867188 38.7666016,9.953125 C39.2314453,10.2675781 39.773763,10.4248047 40.3935547,10.4248047 Z M40.6669922,9.37207031 C40.2203776,9.37207031 39.8364258,9.26155599 39.5151367,9.04052734 C39.1938477,8.8194987 38.9477539,8.50276693 38.7768555,8.09033203 C38.605957,7.67789714 38.5205078,7.18684896 38.5205078,6.6171875 L38.5205078,6.60351562 C38.5205078,6.02929688 38.605957,5.53710938 38.7768555,5.12695312 C38.9477539,4.71679688 39.1938477,4.40120443 39.5151367,4.18017578 C39.8364258,3.95914714 40.2203776,3.84863281 40.6669922,3.84863281 C41.1136068,3.84863281 41.4986979,3.96028646 41.8222656,4.18359375 C42.1458333,4.40690104 42.3942057,4.72363281 42.5673828,5.13378906 C42.7405599,5.54394531 42.8271484,6.03385417 42.8271484,6.60351562 L42.8271484,6.6171875 C42.8271484,7.18229167 42.7405599,7.6710612 42.5673828,8.08349609 C42.3942057,8.49593099 42.1458333,8.81380208 41.8222656,9.03710938 C41.4986979,9.26041667 41.1136068,9.37207031 40.6669922,9.37207031 Z" id="d"></path>
<path d="M49.9023438,10.2949219 L56.2871094,10.2949219 L56.2871094,9.1875 L51.3105469,9.1875 L51.6113281,9.39257812 L51.6113281,8.82519531 L51.3037109,9.39257812 L53.8535156,6.76074219 C54.4505208,6.14550781 54.9130859,5.62711589 55.2412109,5.20556641 C55.5693359,4.78401693 55.7983398,4.4000651 55.9282227,4.05371094 C56.0581055,3.70735677 56.1230469,3.34733073 56.1230469,2.97363281 L56.1230469,2.95996094 C56.1230469,2.42675781 55.9897461,1.95279948 55.7231445,1.53808594 C55.456543,1.1233724 55.093099,0.796386719 54.6328125,0.557128906 C54.172526,0.317871094 53.6552734,0.198242188 53.0810547,0.198242188 C52.4521484,0.198242188 51.8938802,0.326985677 51.40625,0.584472656 C50.9186198,0.841959635 50.5358073,1.19742839 50.2578125,1.65087891 C49.9798177,2.10432943 49.8385417,2.62272135 49.8339844,3.20605469 L49.8476562,3.21289062 L51.0234375,3.21972656 L51.0302734,3.20605469 C51.0302734,2.8186849 51.1123047,2.48030599 51.2763672,2.19091797 C51.4404297,1.90152995 51.6705729,1.67594401 51.9667969,1.51416016 C52.2630208,1.3523763 52.6070964,1.27148438 52.9990234,1.27148438 C53.3863932,1.27148438 53.7190755,1.35123698 53.9970703,1.51074219 C54.2750651,1.6702474 54.4892578,1.88671875 54.6396484,2.16015625 C54.7900391,2.43359375 54.8652344,2.74348958 54.8652344,3.08984375 L54.8652344,3.10351562 C54.8652344,3.390625 54.8173828,3.65494792 54.7216797,3.89648438 C54.6259766,4.13802083 54.4596354,4.40804036 54.2226562,4.70654297 C53.9856771,5.00504557 53.6575521,5.38216146 53.2382812,5.83789062 L49.9023438,9.44726562 L49.9023438,10.2949219 Z" id="2"></path>
</g>
<g id="Thread-3" transform="translate(346.606934, 10.705078)" fill="#000000" fill-rule="nonzero">
<polygon id="T" points="3.17871094 10.2949219 4.40917969 10.2949219 4.40917969 1.53808594 7.58789062 1.53808594 7.58789062 0.430664062 0 0.430664062 0 1.53808594 3.17871094 1.53808594"></polygon>
<path d="M9.25585938,10.2949219 L10.4453125,10.2949219 L10.4453125,5.93359375 C10.4453125,5.50065104 10.5239258,5.12923177 10.6811523,4.81933594 C10.8383789,4.5094401 11.0605469,4.27018229 11.3476562,4.1015625 C11.6347656,3.93294271 11.9742839,3.84863281 12.3662109,3.84863281 C12.9541016,3.84863281 13.3881836,4.00927734 13.668457,4.33056641 C13.9487305,4.65185547 14.0888672,5.14518229 14.0888672,5.81054688 L14.0888672,10.2949219 L15.2783203,10.2949219 L15.2783203,5.5234375 C15.2783203,4.94010417 15.1780599,4.44563802 14.9775391,4.04003906 C14.7770182,3.6344401 14.4853516,3.32568359 14.1025391,3.11376953 C13.7197266,2.90185547 13.2526042,2.79589844 12.7011719,2.79589844 C12.1588542,2.79589844 11.7122396,2.90413411 11.3613281,3.12060547 C11.0104167,3.33707682 10.7415365,3.64127604 10.5546875,4.03320312 L10.4453125,4.03320312 L10.4453125,0 L9.25585938,0 L9.25585938,10.2949219 Z" id="h"></path>
<path d="M17.2744141,10.2949219 L18.4638672,10.2949219 L18.4638672,5.72851562 C18.4638672,5.36848958 18.5470378,5.05403646 18.7133789,4.78515625 C18.8797201,4.51627604 19.108724,4.30664062 19.4003906,4.15625 C19.6920573,4.00585938 20.0270182,3.93066406 20.4052734,3.93066406 C20.5374349,3.93066406 20.6616211,3.93636068 20.777832,3.94775391 C20.894043,3.95914714 21.0136719,3.97623698 21.1367188,3.99902344 L21.1367188,2.84375 C21.077474,2.83463542 20.9920247,2.82438151 20.8803711,2.81298828 C20.7687174,2.80159505 20.6559245,2.79589844 20.5419922,2.79589844 C20.0452474,2.79589844 19.6282552,2.90299479 19.2910156,3.1171875 C18.953776,3.33138021 18.7145182,3.63216146 18.5732422,4.01953125 L18.4638672,4.01953125 L18.4638672,2.92578125 L17.2744141,2.92578125 L17.2744141,10.2949219 Z" id="r"></path>
<path d="M25.2587891,10.4248047 C25.6917318,10.4248047 26.0825195,10.3689779 26.4311523,10.2573242 C26.7797852,10.1456706 27.0817057,9.99527995 27.3369141,9.80615234 C27.5921224,9.61702474 27.8006185,9.40511068 27.9624023,9.17041016 C28.1241862,8.93570964 28.2369792,8.69303385 28.3007812,8.44238281 L28.3144531,8.38769531 L27.125,8.38769531 L27.0976562,8.44921875 C27.0338542,8.59505208 26.9222005,8.73860677 26.7626953,8.87988281 C26.6031901,9.02115885 26.4003906,9.13736979 26.1542969,9.22851562 C25.9082031,9.31966146 25.6188151,9.36523438 25.2861328,9.36523438 C24.8395182,9.36523438 24.4521484,9.26611328 24.1240234,9.06787109 C23.7958984,8.86962891 23.5429688,8.58479818 23.3652344,8.21337891 C23.1875,7.84195964 23.0986328,7.39420573 23.0986328,6.87011719 L23.0986328,6.3984375 C23.0986328,5.84700521 23.1897786,5.38216146 23.3720703,5.00390625 C23.554362,4.62565104 23.8015951,4.33968099 24.1137695,4.14599609 C24.425944,3.9523112 24.7802734,3.85546875 25.1767578,3.85546875 C25.5732422,3.85546875 25.9241536,3.94775391 26.2294922,4.13232422 C26.5348307,4.31689453 26.7740885,4.59602865 26.9472656,4.96972656 C27.1204427,5.34342448 27.2070312,5.81966146 27.2070312,6.3984375 L27.2070312,6.87011719 L27.7949219,6.00195312 L22.4970703,6.00195312 L22.4970703,6.95214844 L28.4033203,6.95214844 L28.4033203,6.48730469 C28.4033203,5.75358073 28.2745768,5.10986328 28.0170898,4.55615234 C27.7596029,4.00244141 27.3904622,3.57063802 26.909668,3.26074219 C26.4288737,2.95084635 25.8535156,2.79589844 25.1835938,2.79589844 C24.5182292,2.79589844 23.9371745,2.95768229 23.4404297,3.28125 C22.9436849,3.60481771 22.5597331,4.05371094 22.2885742,4.62792969 C22.0174154,5.20214844 21.8818359,5.86979167 21.8818359,6.63085938 L21.8818359,6.63769531 C21.8818359,7.4078776 22.0174154,8.07666016 22.2885742,8.64404297 C22.5597331,9.21142578 22.9471029,9.6500651 23.4506836,9.95996094 C23.9542643,10.2698568 24.5569661,10.4248047 25.2587891,10.4248047 Z" id="e"></path>
<path d="M32.1220703,10.4248047 C32.4547526,10.4248047 32.7600911,10.3780924 33.0380859,10.284668 C33.3160807,10.1912435 33.5655924,10.0533854 33.7866211,9.87109375 C34.0076497,9.68880208 34.195638,9.46777344 34.3505859,9.20800781 L34.4599609,9.20800781 L34.4599609,10.2949219 L35.6494141,10.2949219 L35.6494141,5.25 C35.6494141,4.73958333 35.5411784,4.30094401 35.324707,3.93408203 C35.1082357,3.56722005 34.7915039,3.28580729 34.3745117,3.08984375 C33.9575195,2.89388021 33.4482422,2.79589844 32.8466797,2.79589844 C32.3225911,2.79589844 31.8554688,2.87679036 31.4453125,3.03857422 C31.0351562,3.20035807 30.7013346,3.42594401 30.4438477,3.71533203 C30.1863607,4.00472005 30.0257161,4.34309896 29.9619141,4.73046875 L29.9550781,4.77148438 L31.1445312,4.77148438 L31.1513672,4.75097656 C31.2470703,4.46386719 31.4361979,4.24169922 31.71875,4.08447266 C32.0013021,3.92724609 32.3636068,3.84863281 32.8056641,3.84863281 C33.3570964,3.84863281 33.7706706,3.96826172 34.0463867,4.20751953 C34.3221029,4.44677734 34.4599609,4.79427083 34.4599609,5.25 L34.4599609,7.546875 C34.4599609,7.89778646 34.3699544,8.21223958 34.1899414,8.49023438 C34.0099284,8.76822917 33.7626953,8.98811849 33.4482422,9.14990234 C33.1337891,9.3116862 32.773763,9.39257812 32.3681641,9.39257812 C31.9397786,9.39257812 31.5843099,9.28889974 31.3017578,9.08154297 C31.0192057,8.8741862 30.8779297,8.58365885 30.8779297,8.20996094 L30.8779297,8.19628906 C30.8779297,7.83170573 31.0066732,7.54915365 31.2641602,7.34863281 C31.5216471,7.14811198 31.9306641,7.03190104 32.4912109,7 L35.0546875,6.8359375 L35.0546875,5.88574219 L32.3476562,6.04980469 C31.4908854,6.0999349 30.8289388,6.31070964 30.3618164,6.68212891 C29.894694,7.05354818 29.6611328,7.56738281 29.6611328,8.22363281 L29.6611328,8.23730469 C29.6611328,8.68391927 29.7693685,9.07128906 29.9858398,9.39941406 C30.2023112,9.72753906 30.4962565,9.98046875 30.8676758,10.1582031 C31.2390951,10.3359375 31.6572266,10.4248047 32.1220703,10.4248047 Z" id="a"></path>
<path d="M40.3935547,10.4248047 C40.9085286,10.4248047 41.3642578,10.3097331 41.7607422,10.0795898 C42.1572266,9.84944661 42.4671224,9.52929688 42.6904297,9.11914062 L42.7998047,9.11914062 L42.7998047,10.2949219 L43.9892578,10.2949219 L43.9892578,0 L42.7998047,0 L42.7998047,4.08789062 L42.6904297,4.08789062 C42.4899089,3.69596354 42.183431,3.38264974 41.7709961,3.14794922 C41.3585612,2.9132487 40.8994141,2.79589844 40.3935547,2.79589844 C39.7692057,2.79589844 39.2257487,2.953125 38.7631836,3.26757812 C38.3006185,3.58203125 37.9417318,4.02408854 37.6865234,4.59375 C37.4313151,5.16341146 37.3037109,5.83333333 37.3037109,6.60351562 L37.3037109,6.6171875 C37.3037109,7.3828125 37.4313151,8.05159505 37.6865234,8.62353516 C37.9417318,9.19547526 38.3017578,9.63867188 38.7666016,9.953125 C39.2314453,10.2675781 39.773763,10.4248047 40.3935547,10.4248047 Z M40.6669922,9.37207031 C40.2203776,9.37207031 39.8364258,9.26155599 39.5151367,9.04052734 C39.1938477,8.8194987 38.9477539,8.50276693 38.7768555,8.09033203 C38.605957,7.67789714 38.5205078,7.18684896 38.5205078,6.6171875 L38.5205078,6.60351562 C38.5205078,6.02929688 38.605957,5.53710938 38.7768555,5.12695312 C38.9477539,4.71679688 39.1938477,4.40120443 39.5151367,4.18017578 C39.8364258,3.95914714 40.2203776,3.84863281 40.6669922,3.84863281 C41.1136068,3.84863281 41.4986979,3.96028646 41.8222656,4.18359375 C42.1458333,4.40690104 42.3942057,4.72363281 42.5673828,5.13378906 C42.7405599,5.54394531 42.8271484,6.03385417 42.8271484,6.60351562 L42.8271484,6.6171875 C42.8271484,7.18229167 42.7405599,7.6710612 42.5673828,8.08349609 C42.3942057,8.49593099 42.1458333,8.81380208 41.8222656,9.03710938 C41.4986979,9.26041667 41.1136068,9.37207031 40.6669922,9.37207031 Z" id="d"></path>
<path d="M53.2587891,10.4589844 C53.9195964,10.4589844 54.507487,10.3347982 55.0224609,10.0864258 C55.5374349,9.83805339 55.9430339,9.49739583 56.2392578,9.06445312 C56.5354818,8.63151042 56.6835938,8.14160156 56.6835938,7.59472656 L56.6835938,7.58105469 C56.6835938,6.87923177 56.4614258,6.31526693 56.0170898,5.88916016 C55.5727539,5.46305339 54.9905599,5.2203776 54.2705078,5.16113281 L54.2705078,5.13378906 C54.6806641,5.04720052 55.0429688,4.89908854 55.3574219,4.68945312 C55.671875,4.47981771 55.9179688,4.21777344 56.0957031,3.90332031 C56.2734375,3.58886719 56.3623047,3.22884115 56.3623047,2.82324219 L56.3623047,2.80957031 C56.3623047,2.30826823 56.2335612,1.86735026 55.9760742,1.48681641 C55.7185872,1.10628255 55.3562826,0.807779948 54.8891602,0.591308594 C54.4220378,0.37483724 53.8740234,0.266601562 53.2451172,0.266601562 C52.6298828,0.266601562 52.0864258,0.378255208 51.6147461,0.6015625 C51.1430664,0.824869792 50.7648112,1.13704427 50.4799805,1.53808594 C50.1951497,1.9391276 50.0253906,2.40852865 49.9707031,2.94628906 L49.9638672,3.01464844 L51.1464844,3.01464844 L51.1533203,2.94628906 C51.1897786,2.61360677 51.2991536,2.3264974 51.4814453,2.08496094 C51.663737,1.84342448 51.9064128,1.65771484 52.2094727,1.52783203 C52.5125326,1.39794922 52.8577474,1.33300781 53.2451172,1.33300781 C53.6461589,1.33300781 53.9868164,1.3968099 54.2670898,1.52441406 C54.5473633,1.65201823 54.7604167,1.83658854 54.90625,2.078125 C55.0520833,2.31966146 55.125,2.61360677 55.125,2.95996094 L55.125,2.97363281 C55.125,3.30175781 55.0406901,3.5945638 54.8720703,3.85205078 C54.7034505,4.10953776 54.46875,4.31233724 54.1679688,4.46044922 C53.8671875,4.6085612 53.5208333,4.68261719 53.1289062,4.68261719 L51.9462891,4.68261719 L51.9462891,5.72167969 L53.1835938,5.72167969 C53.8763021,5.72167969 54.4243164,5.88460286 54.8276367,6.21044922 C55.230957,6.53629557 55.4326172,7.00227865 55.4326172,7.60839844 L55.4326172,7.62207031 C55.4326172,7.96842448 55.3414714,8.27490234 55.1591797,8.54150391 C54.976888,8.80810547 54.722819,9.01660156 54.3969727,9.16699219 C54.0711263,9.31738281 53.6917318,9.39257812 53.2587891,9.39257812 C52.6025391,9.39257812 52.0670573,9.23990885 51.6523438,8.93457031 C51.2376302,8.62923177 51.0052083,8.23502604 50.9550781,7.75195312 L50.9482422,7.68359375 L49.765625,7.68359375 L49.7724609,7.765625 C49.8180339,8.28515625 49.987793,8.74772135 50.2817383,9.15332031 C50.5756836,9.55891927 50.9755859,9.87792969 51.4814453,10.1103516 C51.9873047,10.3427734 52.5797526,10.4589844 53.2587891,10.4589844 Z" id="3"></path>
</g>
</g>
<g id="Time" fill="#000000" fill-rule="nonzero">
<g transform="translate(7.755859, 10.568359)">
<polygon id="T" points="3.17871094 10.4316406 4.40917969 10.4316406 4.40917969 1.67480469 7.58789062 1.67480469 7.58789062 0.567382812 0 0.567382812 0 1.67480469 3.17871094 1.67480469"></polygon>
<path d="M9.078125,10.4316406 L10.2675781,10.4316406 L10.2675781,3.0625 L9.078125,3.0625 L9.078125,10.4316406 Z M9.6796875,1.640625 C9.90755208,1.640625 10.101237,1.55973307 10.2607422,1.39794922 C10.4202474,1.23616536 10.5,1.04361979 10.5,0.8203125 C10.5,0.592447917 10.4202474,0.398763021 10.2607422,0.239257813 C10.101237,0.0797526042 9.90755208,0 9.6796875,0 C9.45638021,0 9.26383464,0.0797526042 9.10205078,0.239257813 C8.94026693,0.398763021 8.859375,0.592447917 8.859375,0.8203125 C8.859375,1.04361979 8.94026693,1.23616536 9.10205078,1.39794922 C9.26383464,1.55973307 9.45638021,1.640625 9.6796875,1.640625 Z" id="i"></path>
<path d="M12.359375,10.4316406 L13.5488281,10.4316406 L13.5488281,5.86523438 C13.5488281,5.51888021 13.6228841,5.20328776 13.7709961,4.91845703 C13.9191081,4.6336263 14.1219076,4.40690104 14.3793945,4.23828125 C14.6368815,4.06966146 14.9251302,3.98535156 15.2441406,3.98535156 C15.7089844,3.98535156 16.0804036,4.1163737 16.3583984,4.37841797 C16.6363932,4.64046224 16.7753906,4.99023438 16.7753906,5.42773438 L16.7753906,10.4316406 L17.9648438,10.4316406 L17.9648438,5.69433594 C17.9648438,5.37988281 18.0354818,5.09391276 18.1767578,4.83642578 C18.3180339,4.5789388 18.516276,4.37272135 18.7714844,4.21777344 C19.0266927,4.06282552 19.3251953,3.98535156 19.6669922,3.98535156 C20.1865234,3.98535156 20.5727539,4.12093099 20.8256836,4.39208984 C21.0786133,4.6632487 21.2050781,5.06998698 21.2050781,5.61230469 L21.2050781,10.4316406 L22.3945312,10.4316406 L22.3945312,5.33886719 C22.3945312,4.82389323 22.3033854,4.38753255 22.1210938,4.02978516 C21.9388021,3.67203776 21.6733398,3.39973958 21.324707,3.21289062 C20.9760742,3.02604167 20.5511068,2.93261719 20.0498047,2.93261719 C19.7125651,2.93261719 19.3969727,2.98616536 19.1030273,3.09326172 C18.809082,3.20035807 18.5504557,3.3507487 18.3271484,3.54443359 C18.1038411,3.73811849 17.9261068,3.96484375 17.7939453,4.22460938 L17.6845703,4.22460938 C17.570638,3.96940104 17.4179688,3.74495443 17.2265625,3.55126953 C17.0351562,3.35758464 16.8072917,3.20605469 16.5429688,3.09667969 C16.2786458,2.98730469 15.9801432,2.93261719 15.6474609,2.93261719 C15.164388,2.93261719 14.7530924,3.04199219 14.4135742,3.26074219 C14.074056,3.47949219 13.8222656,3.78710938 13.6582031,4.18359375 L13.5488281,4.18359375 L13.5488281,3.0625 L12.359375,3.0625 L12.359375,10.4316406 Z" id="m"></path>
<path d="M27.3984375,10.5615234 C27.8313802,10.5615234 28.222168,10.5056966 28.5708008,10.394043 C28.9194336,10.2823893 29.2213542,10.1319987 29.4765625,9.94287109 C29.7317708,9.75374349 29.9402669,9.54182943 30.1020508,9.30712891 C30.2638346,9.07242839 30.3766276,8.8297526 30.4404297,8.57910156 L30.4541016,8.52441406 L29.2646484,8.52441406 L29.2373047,8.5859375 C29.1735026,8.73177083 29.061849,8.87532552 28.9023438,9.01660156 C28.7428385,9.1578776 28.5400391,9.27408854 28.2939453,9.36523438 C28.0478516,9.45638021 27.7584635,9.50195312 27.4257812,9.50195312 C26.9791667,9.50195312 26.5917969,9.40283203 26.2636719,9.20458984 C25.9355469,9.00634766 25.6826172,8.72151693 25.5048828,8.35009766 C25.3271484,7.97867839 25.2382812,7.53092448 25.2382812,7.00683594 L25.2382812,6.53515625 C25.2382812,5.98372396 25.3294271,5.51888021 25.5117188,5.140625 C25.6940104,4.76236979 25.9412435,4.47639974 26.253418,4.28271484 C26.5655924,4.08902995 26.9199219,3.9921875 27.3164062,3.9921875 C27.7128906,3.9921875 28.0638021,4.08447266 28.3691406,4.26904297 C28.6744792,4.45361328 28.913737,4.7327474 29.0869141,5.10644531 C29.2600911,5.48014323 29.3466797,5.95638021 29.3466797,6.53515625 L29.3466797,7.00683594 L29.9345703,6.13867188 L24.6367188,6.13867188 L24.6367188,7.08886719 L30.5429688,7.08886719 L30.5429688,6.62402344 C30.5429688,5.89029948 30.4142253,5.24658203 30.1567383,4.69287109 C29.8992513,4.13916016 29.5301107,3.70735677 29.0493164,3.39746094 C28.5685221,3.0875651 27.9931641,2.93261719 27.3232422,2.93261719 C26.6578776,2.93261719 26.0768229,3.09440104 25.5800781,3.41796875 C25.0833333,3.74153646 24.6993815,4.19042969 24.4282227,4.76464844 C24.1570638,5.33886719 24.0214844,6.00651042 24.0214844,6.76757812 L24.0214844,6.77441406 C24.0214844,7.54459635 24.1570638,8.21337891 24.4282227,8.78076172 C24.6993815,9.34814453 25.0867513,9.78678385 25.590332,10.0966797 C26.0939128,10.4065755 26.6966146,10.5615234 27.3984375,10.5615234 Z" id="e"></path>
</g>
<path id="Line-4" d="M22.9978866,32.8564159 L22.9999956,33.3564115 L23.964,261.941 L27.9641081,261.924237 L23.5021089,270.943138 L18.9641882,261.962198 L22.964,261.945 L22.0000044,33.3606294 L21.9978955,32.8606338 L22.9978866,32.8564159 Z"></path>
</g>
</g>
<g id="Write-A" transform="translate(66.000000, 50.000000)">
<g id="Background" filter="url(#filter-1)" fill="#D7E6F7">
<g id="RectangleBackground">
<rect id="RectangleBackgroundRectangle" x="0" y="0" width="110" height="40" rx="10"></rect>
</g>
</g>
<rect id="Overlay" stroke-opacity="0.25" stroke="#000000" fill="url(#linearGradient-2)" x="-0.5" y="-0.5" width="111" height="41" rx="10"></rect>
<g id="Text" transform="translate(13.843073, 14.396606)" fill="#000000" fill-rule="nonzero">
<polygon id="W" points="2.6602478 10.6033936 4.11064148 10.6033936 6.22476196 3.2358551 6.3168335 3.2358551 8.43714905 10.6033936 9.88380432 10.6033936 12.5440521 0.739135742 10.9479675 0.739135742 9.14648438 8.40296936 9.05451965 8.40296936 6.98429871 0.739135742 5.55718994 0.739135742 3.49957275 8.40296936 3.40750122 8.40296936 1.60099792 0.739135742 0 0.739135742"></polygon>
<path d="M13.6347213,10.6033936 L15.1199355,10.6033936 L15.1199355,6.16729736 C15.1199355,5.80898031 15.2001866,5.49789174 15.3606887,5.23403168 C15.5211908,4.97017161 15.7445515,4.76534271 16.0307708,4.61954498 C16.3169901,4.47374725 16.6492273,4.40084839 17.0274825,4.40084839 C17.1688298,4.40084839 17.3043024,4.40800476 17.4339004,4.4223175 C17.5634983,4.43663025 17.6944137,4.45767212 17.8266463,4.48544312 L17.8266463,3.11590576 C17.75316,3.09924316 17.6570474,3.08416494 17.5383086,3.07067108 C17.4195698,3.05717723 17.299033,3.0504303 17.1766982,3.0504303 C16.6833002,3.0504303 16.2696548,3.15962728 15.9357619,3.37802124 C15.6018691,3.5964152 15.3680587,3.90346273 15.2343307,4.29916382 L15.1199355,4.29916382 L15.1199355,3.17657471 L13.6347213,3.17657471 L13.6347213,10.6033936 Z" id="r"></path>
<path d="M19.1169329,10.6033936 L20.6021471,10.6033936 L20.6021471,3.17657471 L19.1169329,3.17657471 L19.1169329,10.6033936 Z M19.8650408,1.85243225 C20.1230262,1.85243225 20.3428443,1.76151784 20.5244951,1.57968903 C20.7061459,1.39786021 20.7969713,1.18026733 20.7969713,0.9269104 C20.7969713,0.668924967 20.7061459,0.449943542 20.5244951,0.269966125 C20.3428443,0.0899887085 20.1230262,0 19.8650408,0 C19.6116838,0 19.3930407,0.0899887085 19.2091112,0.269966125 C19.0251818,0.449943542 18.933217,0.668924967 18.933217,0.9269104 C18.933217,1.18026733 19.0251818,1.39786021 19.2091112,1.57968903 C19.3930407,1.76151784 19.6116838,1.85243225 19.8650408,1.85243225 Z" id="i"></path>
<path d="M25.412344,10.6480408 C25.5583909,10.6480408 25.6994534,10.6405818 25.8355312,10.6256638 C25.9716091,10.6107457 26.0982876,10.5933177 26.2155666,10.5733795 L26.2155666,9.38873291 C26.1112474,9.39784749 26.0198167,9.40489705 25.9412746,9.40988159 C25.8627326,9.41486613 25.7668514,9.4173584 25.6536312,9.4173584 C25.2875525,9.4173584 25.0243689,9.32863363 24.8640804,9.15118408 C24.7037919,8.97373454 24.6236477,8.68609111 24.6236477,8.28825378 L24.6236477,4.35150146 L26.2155666,4.35150146 L26.2155666,3.17657471 L24.6236477,3.17657471 L24.6236477,1.30950928 L23.1048946,1.30950928 L23.1048946,3.17657471 L21.944067,3.17657471 L21.944067,4.35150146 L23.1048946,4.35150146 L23.1048946,8.647995 C23.1048946,9.35985819 23.2859402,9.87116496 23.6480312,10.1819153 C24.0101223,10.4926656 24.5982265,10.6480408 25.412344,10.6480408 Z" id="t"></path>
<path d="M30.8317854,10.7445984 C31.3073816,10.7445984 31.7295185,10.6835378 32.0981963,10.5614166 C32.466874,10.4392955 32.7817366,10.2774048 33.042784,10.0757446 C33.3038313,9.87408447 33.5141966,9.65173848 33.6738799,9.40870667 C33.8335631,9.16567485 33.9440596,8.92175293 34.0053694,8.67694092 L34.020323,8.61595154 L32.5852034,8.61723328 L32.5604231,8.6711731 C32.5032434,8.79778035 32.4011672,8.92734273 32.2541945,9.05986023 C32.1072218,9.19237773 31.9182189,9.30315908 31.6871855,9.39220428 C31.4561522,9.48124949 31.1818068,9.52577209 30.8641493,9.52577209 C30.4492934,9.52577209 30.0901218,9.43375397 29.7866347,9.24971771 C29.4831475,9.06568146 29.2494439,8.80091349 29.0855238,8.45541382 C28.9216038,8.10991414 28.8396437,7.69349162 28.8396437,7.20614624 L28.8396437,6.61291504 C28.8396437,6.10328166 28.923473,5.67290243 29.0911314,5.32177734 C29.2587899,4.97065226 29.4870106,4.7049408 29.7757933,4.52464294 C30.0645761,4.34434509 30.3933953,4.25419617 30.7622511,4.25419617 C31.1320326,4.25419617 31.4583062,4.34062449 31.7410719,4.51348114 C32.0238376,4.68633779 32.2453469,4.94645945 32.4055998,5.29384613 C32.5658527,5.64123281 32.6459792,6.08092244 32.6459792,6.61291504 L32.6459792,7.20368958 L33.3616164,6.22016907 L28.0989058,6.22016907 L28.0989058,7.28070068 L34.0991499,7.28070068 L34.0991499,6.75946045 C34.0991499,6.01569621 33.9647632,5.36466217 33.6959898,4.80635834 C33.4272165,4.2480545 33.0428196,3.8133316 32.5427992,3.50218964 C32.0427789,3.19104767 31.446557,3.03547668 30.7541335,3.03547668 C30.0644871,3.03547668 29.4635654,3.19704692 28.9513686,3.52018738 C28.4391717,3.84332784 28.0431146,4.29451752 27.7631972,4.87375641 C27.4832798,5.4529953 27.3433211,6.13023376 27.3433211,6.9054718 L27.3433211,6.91230774 C27.3433211,7.69502258 27.4834934,8.37320455 27.7638381,8.94685364 C28.0441827,9.52050273 28.4444945,9.96353912 28.9647734,10.2759628 C29.4850523,10.5883865 30.1073897,10.7445984 30.8317854,10.7445984 Z" id="e"></path>
<path d="M42.8889222,10.8432922 C43.6544048,10.8432922 44.3193599,10.7182515 44.8837876,10.4681702 C45.4482153,10.2180888 45.8843624,9.8641154 46.1922288,9.40625 C46.5000952,8.9483846 46.6540284,8.40514119 46.6540284,7.77651978 L46.6540284,7.76968384 C46.6540284,7.03781128 46.4269471,6.45353444 45.9727845,6.01685333 C45.5186219,5.58017222 44.7736471,5.25081889 43.7378602,5.02879333 L42.662909,4.79402161 C42.0255291,4.65815735 41.567272,4.46812185 41.2881379,4.2239151 C41.0090038,3.97970835 40.8694367,3.67499288 40.8694367,3.30976868 L40.8694367,3.30293274 C40.8694367,2.99253845 40.9568798,2.72857157 41.1317658,2.5110321 C41.3066519,2.29349264 41.5445924,2.12613678 41.8455873,2.00896454 C42.1465821,1.8917923 42.4887706,1.83320618 42.8721528,1.83320618 C43.2704886,1.82950338 43.6187119,1.88830312 43.9168229,2.00960541 C44.2149339,2.13090769 44.4536398,2.29557546 44.6329408,2.5036087 C44.8122417,2.71164195 44.9233969,2.95148722 44.9664063,3.22314453 L44.9800782,3.30944824 L46.4725556,3.30944824 L46.4657197,3.21748352 C46.4296174,2.70357768 46.2604458,2.24190267 45.9582047,1.8324585 C45.6559637,1.42301432 45.2439739,1.09844971 44.7222352,0.858764648 C44.2004965,0.61907959 43.59103,0.499237061 42.8938355,0.499237061 C42.1964275,0.499237061 41.5788789,0.620646159 41.0411897,0.863464355 C40.5035005,1.10628255 40.0824494,1.44400279 39.7780366,1.87662506 C39.4736238,2.30924733 39.3195659,2.81070964 39.3158631,3.38101196 L39.3158631,3.3878479 C39.3158631,4.11587524 39.5434429,4.71264903 39.9986024,5.17816925 C40.4537619,5.64368947 41.1820741,5.9841512 42.1835389,6.19955444 L43.2584901,6.42877197 C43.9133159,6.56997681 44.3840165,6.76526388 44.6705918,7.01463318 C44.9571671,7.26400248 45.1004548,7.57788595 45.1004548,7.95628357 L45.1004548,7.96311951 C45.1004548,8.26575216 45.008134,8.53359985 44.8234925,8.7666626 C44.638851,8.99972534 44.3851558,9.18176778 44.062407,9.31278992 C43.7396582,9.44381205 43.3691824,9.50932312 42.9509797,9.50932312 C42.510489,9.50932312 42.1183127,9.44824473 41.7744508,9.32608795 C41.4305889,9.20393117 41.1567063,9.03305054 40.9528031,8.81344604 C40.7488999,8.59384155 40.6318523,8.33500163 40.6016603,8.03692627 L40.5948243,7.96546936 L39.0848298,7.96546936 L39.0916657,8.05198669 C39.1384492,8.6035614 39.3212749,9.08891296 39.6401429,9.50804138 C39.9590109,9.9271698 40.3941255,10.2544937 40.9454865,10.4900131 C41.4968476,10.7255325 42.1446595,10.8432922 42.8889222,10.8432922 Z" id="S"></path>
<path d="M51.1482117,10.6480408 C51.2942587,10.6480408 51.4353211,10.6405818 51.571399,10.6256638 C51.7074769,10.6107457 51.8341553,10.5933177 51.9514344,10.5733795 L51.9514344,9.38873291 C51.8471151,9.39784749 51.7556845,9.40489705 51.6771424,9.40988159 C51.5986003,9.41486613 51.5027192,9.4173584 51.3894989,9.4173584 C51.0234203,9.4173584 50.7602367,9.32863363 50.5999482,9.15118408 C50.4396597,8.97373454 50.3595154,8.68609111 50.3595154,8.28825378 L50.3595154,4.35150146 L51.9514344,4.35150146 L51.9514344,3.17657471 L50.3595154,3.17657471 L50.3595154,1.30950928 L48.8407624,1.30950928 L48.8407624,3.17657471 L47.6799347,3.17657471 L47.6799347,4.35150146 L48.8407624,4.35150146 L48.8407624,8.647995 C48.8407624,9.35985819 49.0218079,9.87116496 49.383899,10.1819153 C49.74599,10.4926656 50.3340943,10.6480408 51.1482117,10.6480408 Z" id="t"></path>
<path d="M55.5667207,10.729538 C55.8977652,10.729538 56.2024985,10.6836624 56.4809206,10.5919113 C56.7593426,10.5001602 57.0076082,10.3658447 57.2257173,10.1889648 C57.4438264,10.012085 57.6249076,9.79920959 57.7689607,9.55033875 L57.8833559,9.55033875 L57.8833559,10.6033936 L59.3585298,10.6033936 L59.3585298,5.52461243 C59.3585298,5.00500997 59.2454876,4.55926768 59.0194032,4.18738556 C58.7933188,3.81550344 58.463022,3.5305481 58.0285127,3.33251953 C57.5940034,3.13449097 57.0638266,3.03547668 56.4379823,3.03547668 C55.8755128,3.03547668 55.3772905,3.12012482 54.9433153,3.28942108 C54.50934,3.45871735 54.1592119,3.69494883 53.8929307,3.99811554 C53.6266496,4.30128225 53.4637086,4.65659078 53.4041078,5.06404114 L53.3972719,5.11381531 L54.8273714,5.11381531 L54.835489,5.09074402 C54.9253531,4.82706197 55.1011115,4.62308757 55.3627641,4.4788208 C55.6244167,4.33455404 55.9612113,4.26242065 56.3731477,4.26242065 C56.872812,4.26242065 57.2494295,4.37054952 57.503,4.58680725 C57.7565706,4.80306498 57.8833559,5.11566671 57.8833559,5.52461243 L57.8833559,7.85908508 C57.8833559,8.17823792 57.8006659,8.4644928 57.6352861,8.71784973 C57.4699063,8.97120667 57.2431454,9.17167409 56.9550035,9.31925201 C56.6668616,9.46682994 56.3379355,9.5406189 55.9682252,9.5406189 C55.5699607,9.5406189 55.2410346,9.44488017 54.981447,9.25340271 C54.7218594,9.06192525 54.5920656,8.79564412 54.5920656,8.45455933 L54.5920656,8.44088745 C54.5920656,8.10884603 54.7122463,7.85029093 54.9526079,7.66522217 C55.1929694,7.4801534 55.5687857,7.37295024 56.0800569,7.34361267 L58.6209962,7.1807251 L58.6209962,6.13279724 L55.8801057,6.29814148 C54.9940685,6.34990946 54.3105994,6.56422679 53.8296983,6.94109344 C53.3487972,7.3179601 53.1083467,7.83825684 53.1083467,8.50198364 L53.1083467,8.51565552 C53.1083467,8.96561686 53.2153184,9.35676066 53.4292619,9.68908691 C53.6432054,10.0214132 53.935691,10.2779032 54.3067186,10.4585571 C54.6777462,10.639211 55.0977469,10.729538 55.5667207,10.729538 Z" id="a"></path>
<path d="M64.1054292,10.6480408 C64.2514761,10.6480408 64.3925385,10.6405818 64.5286164,10.6256638 C64.6646943,10.6107457 64.7913728,10.5933177 64.9086518,10.5733795 L64.9086518,9.38873291 C64.8043326,9.39784749 64.7129019,9.40489705 64.6343598,9.40988159 C64.5558178,9.41486613 64.4599366,9.4173584 64.3467164,9.4173584 C63.9806377,9.4173584 63.7174541,9.32863363 63.5571656,9.15118408 C63.3968771,8.97373454 63.3167329,8.68609111 63.3167329,8.28825378 L63.3167329,4.35150146 L64.9086518,4.35150146 L64.9086518,3.17657471 L63.3167329,3.17657471 L63.3167329,1.30950928 L61.7979798,1.30950928 L61.7979798,3.17657471 L60.6371522,3.17657471 L60.6371522,4.35150146 L61.7979798,4.35150146 L61.7979798,8.647995 C61.7979798,9.35985819 61.9790254,9.87116496 62.3411164,10.1819153 C62.7032075,10.4926656 63.2913117,10.6480408 64.1054292,10.6480408 Z" id="t"></path>
<path d="M69.5248706,10.7445984 C70.0004667,10.7445984 70.4226037,10.6835378 70.7912815,10.5614166 C71.1599592,10.4392955 71.4748218,10.2774048 71.7358692,10.0757446 C71.9969165,9.87408447 72.2072818,9.65173848 72.3669651,9.40870667 C72.5266483,9.16567485 72.6371448,8.92175293 72.6984546,8.67694092 L72.7134082,8.61595154 L71.2782886,8.61723328 L71.2535083,8.6711731 C71.1963286,8.79778035 71.0942523,8.92734273 70.9472797,9.05986023 C70.800307,9.19237773 70.611304,9.30315908 70.3802707,9.39220428 C70.1492374,9.48124949 69.874892,9.52577209 69.5572345,9.52577209 C69.1423786,9.52577209 68.783207,9.43375397 68.4797199,9.24971771 C68.1762327,9.06568146 67.9425291,8.80091349 67.778609,8.45541382 C67.614689,8.10991414 67.5327289,7.69349162 67.5327289,7.20614624 L67.5327289,6.61291504 C67.5327289,6.10328166 67.6165582,5.67290243 67.7842166,5.32177734 C67.9518751,4.97065226 68.1800958,4.7049408 68.4688785,4.52464294 C68.7576613,4.34434509 69.0864805,4.25419617 69.4553363,4.25419617 C69.8251178,4.25419617 70.1513914,4.34062449 70.4341571,4.51348114 C70.7169228,4.68633779 70.9384321,4.94645945 71.098685,5.29384613 C71.2589379,5.64123281 71.3390644,6.08092244 71.3390644,6.61291504 L71.3390644,7.20368958 L72.0547016,6.22016907 L66.791991,6.22016907 L66.791991,7.28070068 L72.7922351,7.28070068 L72.7922351,6.75946045 C72.7922351,6.01569621 72.6578484,5.36466217 72.389075,4.80635834 C72.1203016,4.2480545 71.7359048,3.8133316 71.2358844,3.50218964 C70.7358641,3.19104767 70.1396422,3.03547668 69.4472187,3.03547668 C68.7575723,3.03547668 68.1566506,3.19704692 67.6444538,3.52018738 C67.1322569,3.84332784 66.7361998,4.29451752 66.4562824,4.87375641 C66.176365,5.4529953 66.0364063,6.13023376 66.0364063,6.9054718 L66.0364063,6.91230774 C66.0364063,7.69502258 66.1765786,8.37320455 66.4569232,8.94685364 C66.7372679,9.52050273 67.1375797,9.96353912 67.6578586,10.2759628 C68.1781375,10.5883865 68.8004749,10.7445984 69.5248706,10.7445984 Z" id="e"></path>
<path d="M77.4835424,10.6033936 L79.0975714,10.6033936 L81.8167791,2.47108459 L82.2854681,2.47108459 L82.2854681,0.739135742 L81.0437841,0.739135742 L77.4835424,10.6033936 Z M79.1998968,7.93812561 L84.5504065,7.93812561 L84.1225195,6.70915222 L79.6278906,6.70915222 L79.1998968,7.93812561 Z M84.650382,10.6033936 L86.2645178,10.6033936 L82.7042761,0.739135742 L81.9311743,0.739135742 L81.9311743,2.47108459 L84.650382,10.6033936 Z" id="A"></path>
</g>
</g>
<g id="Write-C" transform="translate(366.000000, 188.000000)">
<g id="Background" filter="url(#filter-3)" fill="#FFEEB3">
<g id="RectangleBackground">
<rect id="RectangleBackgroundRectangle" x="0" y="0" width="110" height="40" rx="10"></rect>
</g>
</g>
<rect id="Overlay" stroke-opacity="0.25" stroke="#000000" fill="url(#linearGradient-2)" x="-0.5" y="-0.5" width="111" height="41" rx="10"></rect>
<g id="Text" transform="translate(11.800964, 14.396606)" fill="#000000" fill-rule="nonzero">
<polygon id="W" points="2.6602478 10.6033936 4.11064148 10.6033936 6.22476196 3.2358551 6.3168335 3.2358551 8.43714905 10.6033936 9.88380432 10.6033936 12.5440521 0.739135742 10.9479675 0.739135742 9.14648438 8.40296936 9.05451965 8.40296936 6.98429871 0.739135742 5.55718994 0.739135742 3.49957275 8.40296936 3.40750122 8.40296936 1.60099792 0.739135742 0 0.739135742"></polygon>
<path d="M13.6347213,10.6033936 L15.1199355,10.6033936 L15.1199355,6.16729736 C15.1199355,5.80898031 15.2001866,5.49789174 15.3606887,5.23403168 C15.5211908,4.97017161 15.7445515,4.76534271 16.0307708,4.61954498 C16.3169901,4.47374725 16.6492273,4.40084839 17.0274825,4.40084839 C17.1688298,4.40084839 17.3043024,4.40800476 17.4339004,4.4223175 C17.5634983,4.43663025 17.6944137,4.45767212 17.8266463,4.48544312 L17.8266463,3.11590576 C17.75316,3.09924316 17.6570474,3.08416494 17.5383086,3.07067108 C17.4195698,3.05717723 17.299033,3.0504303 17.1766982,3.0504303 C16.6833002,3.0504303 16.2696548,3.15962728 15.9357619,3.37802124 C15.6018691,3.5964152 15.3680587,3.90346273 15.2343307,4.29916382 L15.1199355,4.29916382 L15.1199355,3.17657471 L13.6347213,3.17657471 L13.6347213,10.6033936 Z" id="r"></path>
<path d="M19.1169329,10.6033936 L20.6021471,10.6033936 L20.6021471,3.17657471 L19.1169329,3.17657471 L19.1169329,10.6033936 Z M19.8650408,1.85243225 C20.1230262,1.85243225 20.3428443,1.76151784 20.5244951,1.57968903 C20.7061459,1.39786021 20.7969713,1.18026733 20.7969713,0.9269104 C20.7969713,0.668924967 20.7061459,0.449943542 20.5244951,0.269966125 C20.3428443,0.0899887085 20.1230262,0 19.8650408,0 C19.6116838,0 19.3930407,0.0899887085 19.2091112,0.269966125 C19.0251818,0.449943542 18.933217,0.668924967 18.933217,0.9269104 C18.933217,1.18026733 19.0251818,1.39786021 19.2091112,1.57968903 C19.3930407,1.76151784 19.6116838,1.85243225 19.8650408,1.85243225 Z" id="i"></path>
<path d="M25.412344,10.6480408 C25.5583909,10.6480408 25.6994534,10.6405818 25.8355312,10.6256638 C25.9716091,10.6107457 26.0982876,10.5933177 26.2155666,10.5733795 L26.2155666,9.38873291 C26.1112474,9.39784749 26.0198167,9.40489705 25.9412746,9.40988159 C25.8627326,9.41486613 25.7668514,9.4173584 25.6536312,9.4173584 C25.2875525,9.4173584 25.0243689,9.32863363 24.8640804,9.15118408 C24.7037919,8.97373454 24.6236477,8.68609111 24.6236477,8.28825378 L24.6236477,4.35150146 L26.2155666,4.35150146 L26.2155666,3.17657471 L24.6236477,3.17657471 L24.6236477,1.30950928 L23.1048946,1.30950928 L23.1048946,3.17657471 L21.944067,3.17657471 L21.944067,4.35150146 L23.1048946,4.35150146 L23.1048946,8.647995 C23.1048946,9.35985819 23.2859402,9.87116496 23.6480312,10.1819153 C24.0101223,10.4926656 24.5982265,10.6480408 25.412344,10.6480408 Z" id="t"></path>
<path d="M30.8317854,10.7445984 C31.3073816,10.7445984 31.7295185,10.6835378 32.0981963,10.5614166 C32.466874,10.4392955 32.7817366,10.2774048 33.042784,10.0757446 C33.3038313,9.87408447 33.5141966,9.65173848 33.6738799,9.40870667 C33.8335631,9.16567485 33.9440596,8.92175293 34.0053694,8.67694092 L34.020323,8.61595154 L32.5852034,8.61723328 L32.5604231,8.6711731 C32.5032434,8.79778035 32.4011672,8.92734273 32.2541945,9.05986023 C32.1072218,9.19237773 31.9182189,9.30315908 31.6871855,9.39220428 C31.4561522,9.48124949 31.1818068,9.52577209 30.8641493,9.52577209 C30.4492934,9.52577209 30.0901218,9.43375397 29.7866347,9.24971771 C29.4831475,9.06568146 29.2494439,8.80091349 29.0855238,8.45541382 C28.9216038,8.10991414 28.8396437,7.69349162 28.8396437,7.20614624 L28.8396437,6.61291504 C28.8396437,6.10328166 28.923473,5.67290243 29.0911314,5.32177734 C29.2587899,4.97065226 29.4870106,4.7049408 29.7757933,4.52464294 C30.0645761,4.34434509 30.3933953,4.25419617 30.7622511,4.25419617 C31.1320326,4.25419617 31.4583062,4.34062449 31.7410719,4.51348114 C32.0238376,4.68633779 32.2453469,4.94645945 32.4055998,5.29384613 C32.5658527,5.64123281 32.6459792,6.08092244 32.6459792,6.61291504 L32.6459792,7.20368958 L33.3616164,6.22016907 L28.0989058,6.22016907 L28.0989058,7.28070068 L34.0991499,7.28070068 L34.0991499,6.75946045 C34.0991499,6.01569621 33.9647632,5.36466217 33.6959898,4.80635834 C33.4272165,4.2480545 33.0428196,3.8133316 32.5427992,3.50218964 C32.0427789,3.19104767 31.446557,3.03547668 30.7541335,3.03547668 C30.0644871,3.03547668 29.4635654,3.19704692 28.9513686,3.52018738 C28.4391717,3.84332784 28.0431146,4.29451752 27.7631972,4.87375641 C27.4832798,5.4529953 27.3433211,6.13023376 27.3433211,6.9054718 L27.3433211,6.91230774 C27.3433211,7.69502258 27.4834934,8.37320455 27.7638381,8.94685364 C28.0441827,9.52050273 28.4444945,9.96353912 28.9647734,10.2759628 C29.4850523,10.5883865 30.1073897,10.7445984 30.8317854,10.7445984 Z" id="e"></path>
<path d="M42.8889222,10.8432922 C43.6544048,10.8432922 44.3193599,10.7182515 44.8837876,10.4681702 C45.4482153,10.2180888 45.8843624,9.8641154 46.1922288,9.40625 C46.5000952,8.9483846 46.6540284,8.40514119 46.6540284,7.77651978 L46.6540284,7.76968384 C46.6540284,7.03781128 46.4269471,6.45353444 45.9727845,6.01685333 C45.5186219,5.58017222 44.7736471,5.25081889 43.7378602,5.02879333 L42.662909,4.79402161 C42.0255291,4.65815735 41.567272,4.46812185 41.2881379,4.2239151 C41.0090038,3.97970835 40.8694367,3.67499288 40.8694367,3.30976868 L40.8694367,3.30293274 C40.8694367,2.99253845 40.9568798,2.72857157 41.1317658,2.5110321 C41.3066519,2.29349264 41.5445924,2.12613678 41.8455873,2.00896454 C42.1465821,1.8917923 42.4887706,1.83320618 42.8721528,1.83320618 C43.2704886,1.82950338 43.6187119,1.88830312 43.9168229,2.00960541 C44.2149339,2.13090769 44.4536398,2.29557546 44.6329408,2.5036087 C44.8122417,2.71164195 44.9233969,2.95148722 44.9664063,3.22314453 L44.9800782,3.30944824 L46.4725556,3.30944824 L46.4657197,3.21748352 C46.4296174,2.70357768 46.2604458,2.24190267 45.9582047,1.8324585 C45.6559637,1.42301432 45.2439739,1.09844971 44.7222352,0.858764648 C44.2004965,0.61907959 43.59103,0.499237061 42.8938355,0.499237061 C42.1964275,0.499237061 41.5788789,0.620646159 41.0411897,0.863464355 C40.5035005,1.10628255 40.0824494,1.44400279 39.7780366,1.87662506 C39.4736238,2.30924733 39.3195659,2.81070964 39.3158631,3.38101196 L39.3158631,3.3878479 C39.3158631,4.11587524 39.5434429,4.71264903 39.9986024,5.17816925 C40.4537619,5.64368947 41.1820741,5.9841512 42.1835389,6.19955444 L43.2584901,6.42877197 C43.9133159,6.56997681 44.3840165,6.76526388 44.6705918,7.01463318 C44.9571671,7.26400248 45.1004548,7.57788595 45.1004548,7.95628357 L45.1004548,7.96311951 C45.1004548,8.26575216 45.008134,8.53359985 44.8234925,8.7666626 C44.638851,8.99972534 44.3851558,9.18176778 44.062407,9.31278992 C43.7396582,9.44381205 43.3691824,9.50932312 42.9509797,9.50932312 C42.510489,9.50932312 42.1183127,9.44824473 41.7744508,9.32608795 C41.4305889,9.20393117 41.1567063,9.03305054 40.9528031,8.81344604 C40.7488999,8.59384155 40.6318523,8.33500163 40.6016603,8.03692627 L40.5948243,7.96546936 L39.0848298,7.96546936 L39.0916657,8.05198669 C39.1384492,8.6035614 39.3212749,9.08891296 39.6401429,9.50804138 C39.9590109,9.9271698 40.3941255,10.2544937 40.9454865,10.4900131 C41.4968476,10.7255325 42.1446595,10.8432922 42.8889222,10.8432922 Z" id="S"></path>
<path d="M51.1482117,10.6480408 C51.2942587,10.6480408 51.4353211,10.6405818 51.571399,10.6256638 C51.7074769,10.6107457 51.8341553,10.5933177 51.9514344,10.5733795 L51.9514344,9.38873291 C51.8471151,9.39784749 51.7556845,9.40489705 51.6771424,9.40988159 C51.5986003,9.41486613 51.5027192,9.4173584 51.3894989,9.4173584 C51.0234203,9.4173584 50.7602367,9.32863363 50.5999482,9.15118408 C50.4396597,8.97373454 50.3595154,8.68609111 50.3595154,8.28825378 L50.3595154,4.35150146 L51.9514344,4.35150146 L51.9514344,3.17657471 L50.3595154,3.17657471 L50.3595154,1.30950928 L48.8407624,1.30950928 L48.8407624,3.17657471 L47.6799347,3.17657471 L47.6799347,4.35150146 L48.8407624,4.35150146 L48.8407624,8.647995 C48.8407624,9.35985819 49.0218079,9.87116496 49.383899,10.1819153 C49.74599,10.4926656 50.3340943,10.6480408 51.1482117,10.6480408 Z" id="t"></path>
<path d="M55.5667207,10.729538 C55.8977652,10.729538 56.2024985,10.6836624 56.4809206,10.5919113 C56.7593426,10.5001602 57.0076082,10.3658447 57.2257173,10.1889648 C57.4438264,10.012085 57.6249076,9.79920959 57.7689607,9.55033875 L57.8833559,9.55033875 L57.8833559,10.6033936 L59.3585298,10.6033936 L59.3585298,5.52461243 C59.3585298,5.00500997 59.2454876,4.55926768 59.0194032,4.18738556 C58.7933188,3.81550344 58.463022,3.5305481 58.0285127,3.33251953 C57.5940034,3.13449097 57.0638266,3.03547668 56.4379823,3.03547668 C55.8755128,3.03547668 55.3772905,3.12012482 54.9433153,3.28942108 C54.50934,3.45871735 54.1592119,3.69494883 53.8929307,3.99811554 C53.6266496,4.30128225 53.4637086,4.65659078 53.4041078,5.06404114 L53.3972719,5.11381531 L54.8273714,5.11381531 L54.835489,5.09074402 C54.9253531,4.82706197 55.1011115,4.62308757 55.3627641,4.4788208 C55.6244167,4.33455404 55.9612113,4.26242065 56.3731477,4.26242065 C56.872812,4.26242065 57.2494295,4.37054952 57.503,4.58680725 C57.7565706,4.80306498 57.8833559,5.11566671 57.8833559,5.52461243 L57.8833559,7.85908508 C57.8833559,8.17823792 57.8006659,8.4644928 57.6352861,8.71784973 C57.4699063,8.97120667 57.2431454,9.17167409 56.9550035,9.31925201 C56.6668616,9.46682994 56.3379355,9.5406189 55.9682252,9.5406189 C55.5699607,9.5406189 55.2410346,9.44488017 54.981447,9.25340271 C54.7218594,9.06192525 54.5920656,8.79564412 54.5920656,8.45455933 L54.5920656,8.44088745 C54.5920656,8.10884603 54.7122463,7.85029093 54.9526079,7.66522217 C55.1929694,7.4801534 55.5687857,7.37295024 56.0800569,7.34361267 L58.6209962,7.1807251 L58.6209962,6.13279724 L55.8801057,6.29814148 C54.9940685,6.34990946 54.3105994,6.56422679 53.8296983,6.94109344 C53.3487972,7.3179601 53.1083467,7.83825684 53.1083467,8.50198364 L53.1083467,8.51565552 C53.1083467,8.96561686 53.2153184,9.35676066 53.4292619,9.68908691 C53.6432054,10.0214132 53.935691,10.2779032 54.3067186,10.4585571 C54.6777462,10.639211 55.0977469,10.729538 55.5667207,10.729538 Z" id="a"></path>
<path d="M64.1054292,10.6480408 C64.2514761,10.6480408 64.3925385,10.6405818 64.5286164,10.6256638 C64.6646943,10.6107457 64.7913728,10.5933177 64.9086518,10.5733795 L64.9086518,9.38873291 C64.8043326,9.39784749 64.7129019,9.40489705 64.6343598,9.40988159 C64.5558178,9.41486613 64.4599366,9.4173584 64.3467164,9.4173584 C63.9806377,9.4173584 63.7174541,9.32863363 63.5571656,9.15118408 C63.3968771,8.97373454 63.3167329,8.68609111 63.3167329,8.28825378 L63.3167329,4.35150146 L64.9086518,4.35150146 L64.9086518,3.17657471 L63.3167329,3.17657471 L63.3167329,1.30950928 L61.7979798,1.30950928 L61.7979798,3.17657471 L60.6371522,3.17657471 L60.6371522,4.35150146 L61.7979798,4.35150146 L61.7979798,8.647995 C61.7979798,9.35985819 61.9790254,9.87116496 62.3411164,10.1819153 C62.7032075,10.4926656 63.2913117,10.6480408 64.1054292,10.6480408 Z" id="t"></path>
<path d="M69.5248706,10.7445984 C70.0004667,10.7445984 70.4226037,10.6835378 70.7912815,10.5614166 C71.1599592,10.4392955 71.4748218,10.2774048 71.7358692,10.0757446 C71.9969165,9.87408447 72.2072818,9.65173848 72.3669651,9.40870667 C72.5266483,9.16567485 72.6371448,8.92175293 72.6984546,8.67694092 L72.7134082,8.61595154 L71.2782886,8.61723328 L71.2535083,8.6711731 C71.1963286,8.79778035 71.0942523,8.92734273 70.9472797,9.05986023 C70.800307,9.19237773 70.611304,9.30315908 70.3802707,9.39220428 C70.1492374,9.48124949 69.874892,9.52577209 69.5572345,9.52577209 C69.1423786,9.52577209 68.783207,9.43375397 68.4797199,9.24971771 C68.1762327,9.06568146 67.9425291,8.80091349 67.778609,8.45541382 C67.614689,8.10991414 67.5327289,7.69349162 67.5327289,7.20614624 L67.5327289,6.61291504 C67.5327289,6.10328166 67.6165582,5.67290243 67.7842166,5.32177734 C67.9518751,4.97065226 68.1800958,4.7049408 68.4688785,4.52464294 C68.7576613,4.34434509 69.0864805,4.25419617 69.4553363,4.25419617 C69.8251178,4.25419617 70.1513914,4.34062449 70.4341571,4.51348114 C70.7169228,4.68633779 70.9384321,4.94645945 71.098685,5.29384613 C71.2589379,5.64123281 71.3390644,6.08092244 71.3390644,6.61291504 L71.3390644,7.20368958 L72.0547016,6.22016907 L66.791991,6.22016907 L66.791991,7.28070068 L72.7922351,7.28070068 L72.7922351,6.75946045 C72.7922351,6.01569621 72.6578484,5.36466217 72.389075,4.80635834 C72.1203016,4.2480545 71.7359048,3.8133316 71.2358844,3.50218964 C70.7358641,3.19104767 70.1396422,3.03547668 69.4472187,3.03547668 C68.7575723,3.03547668 68.1566506,3.19704692 67.6444538,3.52018738 C67.1322569,3.84332784 66.7361998,4.29451752 66.4562824,4.87375641 C66.176365,5.4529953 66.0364063,6.13023376 66.0364063,6.9054718 L66.0364063,6.91230774 C66.0364063,7.69502258 66.1765786,8.37320455 66.4569232,8.94685364 C66.7372679,9.52050273 67.1375797,9.96353912 67.6578586,10.2759628 C68.1781375,10.5883865 68.8004749,10.7445984 69.5248706,10.7445984 Z" id="e"></path>
<path d="M82.2927313,10.8432922 C83.0288051,10.8432922 83.6864258,10.7116826 84.2655935,10.4484634 C84.8447612,10.1852442 85.319129,9.81747437 85.6886969,9.34515381 C86.0582647,8.87283325 86.2910782,8.32001241 86.3871374,7.68669128 L86.3883123,7.64920044 L84.863471,7.64920044 L84.8497992,7.67921448 C84.7603623,8.0474294 84.5970297,8.36688487 84.3598013,8.63758087 C84.1225729,8.90827688 83.8281825,9.11684418 83.4766302,9.26328278 C83.1250779,9.40972137 82.7308722,9.48294067 82.294013,9.48294067 C81.7022772,9.48294067 81.1907924,9.32808177 80.7595587,9.01836395 C80.328325,8.70864614 79.9959453,8.26908112 79.7624197,7.69966888 C79.5288941,7.13025665 79.4121313,6.45672099 79.4121313,5.67906189 L79.4121313,5.66539001 C79.4121313,4.88395691 79.5288941,4.20896149 79.7624197,3.64040375 C79.9959453,3.07184601 80.328325,2.63290405 80.7595587,2.32357788 C81.1907924,2.01425171 81.6999985,1.85958862 82.2871771,1.85958862 C82.7203334,1.85958862 83.1123851,1.94160207 83.4633322,2.10562897 C83.8142792,2.26965586 84.110432,2.50024414 84.3517904,2.7973938 C84.5931489,3.09454346 84.7610032,3.44541931 84.8553534,3.85002136 L84.8621893,3.87501526 L86.3814764,3.87501526 L86.3858557,3.83506775 C86.3018306,3.18273417 86.0725419,2.60572052 85.6979895,2.10402679 C85.3234371,1.60233307 84.8426428,1.20944468 84.2556067,0.925361633 C83.6685705,0.641278585 83.0124273,0.499237061 82.2871771,0.499237061 C81.3713751,0.499237061 80.5812368,0.708658854 79.9167624,1.12750244 C79.2522879,1.54634603 78.7396994,2.14148204 78.3789968,2.91291046 C78.0182943,3.68433889 77.8379431,4.60222371 77.8379431,5.66656494 L77.8379431,5.68023682 C77.8379431,6.74087524 78.0182943,7.65690867 78.3789968,8.4283371 C78.7396994,9.19976552 79.2534272,9.79511515 79.9201803,10.214386 C80.5869335,10.6336568 81.3777838,10.8432922 82.2927313,10.8432922 Z" id="C"></path>
</g>
</g>
<g id="Write-C" transform="translate(66.000000, 130.000000)">
<g id="Background" filter="url(#filter-4)" fill="#E6F0C7">
<g id="RectangleBackground">
<rect id="RectangleBackgroundRectangle" x="0" y="0" width="110" height="40" rx="10"></rect>
</g>
</g>
<rect id="Overlay" stroke-opacity="0.25" stroke="#000000" fill="url(#linearGradient-2)" x="-0.5" y="-0.5" width="111" height="41" rx="10"></rect>
<g id="Text" transform="translate(12.183546, 14.396606)" fill="#000000" fill-rule="nonzero">
<polygon id="W" points="2.6602478 10.6033936 4.11064148 10.6033936 6.22476196 3.2358551 6.3168335 3.2358551 8.43714905 10.6033936 9.88380432 10.6033936 12.5440521 0.739135742 10.9479675 0.739135742 9.14648438 8.40296936 9.05451965 8.40296936 6.98429871 0.739135742 5.55718994 0.739135742 3.49957275 8.40296936 3.40750122 8.40296936 1.60099792 0.739135742 0 0.739135742"></polygon>
<path d="M13.6347213,10.6033936 L15.1199355,10.6033936 L15.1199355,6.16729736 C15.1199355,5.80898031 15.2001866,5.49789174 15.3606887,5.23403168 C15.5211908,4.97017161 15.7445515,4.76534271 16.0307708,4.61954498 C16.3169901,4.47374725 16.6492273,4.40084839 17.0274825,4.40084839 C17.1688298,4.40084839 17.3043024,4.40800476 17.4339004,4.4223175 C17.5634983,4.43663025 17.6944137,4.45767212 17.8266463,4.48544312 L17.8266463,3.11590576 C17.75316,3.09924316 17.6570474,3.08416494 17.5383086,3.07067108 C17.4195698,3.05717723 17.299033,3.0504303 17.1766982,3.0504303 C16.6833002,3.0504303 16.2696548,3.15962728 15.9357619,3.37802124 C15.6018691,3.5964152 15.3680587,3.90346273 15.2343307,4.29916382 L15.1199355,4.29916382 L15.1199355,3.17657471 L13.6347213,3.17657471 L13.6347213,10.6033936 Z" id="r"></path>
<path d="M19.1169329,10.6033936 L20.6021471,10.6033936 L20.6021471,3.17657471 L19.1169329,3.17657471 L19.1169329,10.6033936 Z M19.8650408,1.85243225 C20.1230262,1.85243225 20.3428443,1.76151784 20.5244951,1.57968903 C20.7061459,1.39786021 20.7969713,1.18026733 20.7969713,0.9269104 C20.7969713,0.668924967 20.7061459,0.449943542 20.5244951,0.269966125 C20.3428443,0.0899887085 20.1230262,0 19.8650408,0 C19.6116838,0 19.3930407,0.0899887085 19.2091112,0.269966125 C19.0251818,0.449943542 18.933217,0.668924967 18.933217,0.9269104 C18.933217,1.18026733 19.0251818,1.39786021 19.2091112,1.57968903 C19.3930407,1.76151784 19.6116838,1.85243225 19.8650408,1.85243225 Z" id="i"></path>
<path d="M25.412344,10.6480408 C25.5583909,10.6480408 25.6994534,10.6405818 25.8355312,10.6256638 C25.9716091,10.6107457 26.0982876,10.5933177 26.2155666,10.5733795 L26.2155666,9.38873291 C26.1112474,9.39784749 26.0198167,9.40489705 25.9412746,9.40988159 C25.8627326,9.41486613 25.7668514,9.4173584 25.6536312,9.4173584 C25.2875525,9.4173584 25.0243689,9.32863363 24.8640804,9.15118408 C24.7037919,8.97373454 24.6236477,8.68609111 24.6236477,8.28825378 L24.6236477,4.35150146 L26.2155666,4.35150146 L26.2155666,3.17657471 L24.6236477,3.17657471 L24.6236477,1.30950928 L23.1048946,1.30950928 L23.1048946,3.17657471 L21.944067,3.17657471 L21.944067,4.35150146 L23.1048946,4.35150146 L23.1048946,8.647995 C23.1048946,9.35985819 23.2859402,9.87116496 23.6480312,10.1819153 C24.0101223,10.4926656 24.5982265,10.6480408 25.412344,10.6480408 Z" id="t"></path>
<path d="M30.8317854,10.7445984 C31.3073816,10.7445984 31.7295185,10.6835378 32.0981963,10.5614166 C32.466874,10.4392955 32.7817366,10.2774048 33.042784,10.0757446 C33.3038313,9.87408447 33.5141966,9.65173848 33.6738799,9.40870667 C33.8335631,9.16567485 33.9440596,8.92175293 34.0053694,8.67694092 L34.020323,8.61595154 L32.5852034,8.61723328 L32.5604231,8.6711731 C32.5032434,8.79778035 32.4011672,8.92734273 32.2541945,9.05986023 C32.1072218,9.19237773 31.9182189,9.30315908 31.6871855,9.39220428 C31.4561522,9.48124949 31.1818068,9.52577209 30.8641493,9.52577209 C30.4492934,9.52577209 30.0901218,9.43375397 29.7866347,9.24971771 C29.4831475,9.06568146 29.2494439,8.80091349 29.0855238,8.45541382 C28.9216038,8.10991414 28.8396437,7.69349162 28.8396437,7.20614624 L28.8396437,6.61291504 C28.8396437,6.10328166 28.923473,5.67290243 29.0911314,5.32177734 C29.2587899,4.97065226 29.4870106,4.7049408 29.7757933,4.52464294 C30.0645761,4.34434509 30.3933953,4.25419617 30.7622511,4.25419617 C31.1320326,4.25419617 31.4583062,4.34062449 31.7410719,4.51348114 C32.0238376,4.68633779 32.2453469,4.94645945 32.4055998,5.29384613 C32.5658527,5.64123281 32.6459792,6.08092244 32.6459792,6.61291504 L32.6459792,7.20368958 L33.3616164,6.22016907 L28.0989058,6.22016907 L28.0989058,7.28070068 L34.0991499,7.28070068 L34.0991499,6.75946045 C34.0991499,6.01569621 33.9647632,5.36466217 33.6959898,4.80635834 C33.4272165,4.2480545 33.0428196,3.8133316 32.5427992,3.50218964 C32.0427789,3.19104767 31.446557,3.03547668 30.7541335,3.03547668 C30.0644871,3.03547668 29.4635654,3.19704692 28.9513686,3.52018738 C28.4391717,3.84332784 28.0431146,4.29451752 27.7631972,4.87375641 C27.4832798,5.4529953 27.3433211,6.13023376 27.3433211,6.9054718 L27.3433211,6.91230774 C27.3433211,7.69502258 27.4834934,8.37320455 27.7638381,8.94685364 C28.0441827,9.52050273 28.4444945,9.96353912 28.9647734,10.2759628 C29.4850523,10.5883865 30.1073897,10.7445984 30.8317854,10.7445984 Z" id="e"></path>
<path d="M42.8889222,10.8432922 C43.6544048,10.8432922 44.3193599,10.7182515 44.8837876,10.4681702 C45.4482153,10.2180888 45.8843624,9.8641154 46.1922288,9.40625 C46.5000952,8.9483846 46.6540284,8.40514119 46.6540284,7.77651978 L46.6540284,7.76968384 C46.6540284,7.03781128 46.4269471,6.45353444 45.9727845,6.01685333 C45.5186219,5.58017222 44.7736471,5.25081889 43.7378602,5.02879333 L42.662909,4.79402161 C42.0255291,4.65815735 41.567272,4.46812185 41.2881379,4.2239151 C41.0090038,3.97970835 40.8694367,3.67499288 40.8694367,3.30976868 L40.8694367,3.30293274 C40.8694367,2.99253845 40.9568798,2.72857157 41.1317658,2.5110321 C41.3066519,2.29349264 41.5445924,2.12613678 41.8455873,2.00896454 C42.1465821,1.8917923 42.4887706,1.83320618 42.8721528,1.83320618 C43.2704886,1.82950338 43.6187119,1.88830312 43.9168229,2.00960541 C44.2149339,2.13090769 44.4536398,2.29557546 44.6329408,2.5036087 C44.8122417,2.71164195 44.9233969,2.95148722 44.9664063,3.22314453 L44.9800782,3.30944824 L46.4725556,3.30944824 L46.4657197,3.21748352 C46.4296174,2.70357768 46.2604458,2.24190267 45.9582047,1.8324585 C45.6559637,1.42301432 45.2439739,1.09844971 44.7222352,0.858764648 C44.2004965,0.61907959 43.59103,0.499237061 42.8938355,0.499237061 C42.1964275,0.499237061 41.5788789,0.620646159 41.0411897,0.863464355 C40.5035005,1.10628255 40.0824494,1.44400279 39.7780366,1.87662506 C39.4736238,2.30924733 39.3195659,2.81070964 39.3158631,3.38101196 L39.3158631,3.3878479 C39.3158631,4.11587524 39.5434429,4.71264903 39.9986024,5.17816925 C40.4537619,5.64368947 41.1820741,5.9841512 42.1835389,6.19955444 L43.2584901,6.42877197 C43.9133159,6.56997681 44.3840165,6.76526388 44.6705918,7.01463318 C44.9571671,7.26400248 45.1004548,7.57788595 45.1004548,7.95628357 L45.1004548,7.96311951 C45.1004548,8.26575216 45.008134,8.53359985 44.8234925,8.7666626 C44.638851,8.99972534 44.3851558,9.18176778 44.062407,9.31278992 C43.7396582,9.44381205 43.3691824,9.50932312 42.9509797,9.50932312 C42.510489,9.50932312 42.1183127,9.44824473 41.7744508,9.32608795 C41.4305889,9.20393117 41.1567063,9.03305054 40.9528031,8.81344604 C40.7488999,8.59384155 40.6318523,8.33500163 40.6016603,8.03692627 L40.5948243,7.96546936 L39.0848298,7.96546936 L39.0916657,8.05198669 C39.1384492,8.6035614 39.3212749,9.08891296 39.6401429,9.50804138 C39.9590109,9.9271698 40.3941255,10.2544937 40.9454865,10.4900131 C41.4968476,10.7255325 42.1446595,10.8432922 42.8889222,10.8432922 Z" id="S"></path>
<path d="M51.1482117,10.6480408 C51.2942587,10.6480408 51.4353211,10.6405818 51.571399,10.6256638 C51.7074769,10.6107457 51.8341553,10.5933177 51.9514344,10.5733795 L51.9514344,9.38873291 C51.8471151,9.39784749 51.7556845,9.40489705 51.6771424,9.40988159 C51.5986003,9.41486613 51.5027192,9.4173584 51.3894989,9.4173584 C51.0234203,9.4173584 50.7602367,9.32863363 50.5999482,9.15118408 C50.4396597,8.97373454 50.3595154,8.68609111 50.3595154,8.28825378 L50.3595154,4.35150146 L51.9514344,4.35150146 L51.9514344,3.17657471 L50.3595154,3.17657471 L50.3595154,1.30950928 L48.8407624,1.30950928 L48.8407624,3.17657471 L47.6799347,3.17657471 L47.6799347,4.35150146 L48.8407624,4.35150146 L48.8407624,8.647995 C48.8407624,9.35985819 49.0218079,9.87116496 49.383899,10.1819153 C49.74599,10.4926656 50.3340943,10.6480408 51.1482117,10.6480408 Z" id="t"></path>
<path d="M55.5667207,10.729538 C55.8977652,10.729538 56.2024985,10.6836624 56.4809206,10.5919113 C56.7593426,10.5001602 57.0076082,10.3658447 57.2257173,10.1889648 C57.4438264,10.012085 57.6249076,9.79920959 57.7689607,9.55033875 L57.8833559,9.55033875 L57.8833559,10.6033936 L59.3585298,10.6033936 L59.3585298,5.52461243 C59.3585298,5.00500997 59.2454876,4.55926768 59.0194032,4.18738556 C58.7933188,3.81550344 58.463022,3.5305481 58.0285127,3.33251953 C57.5940034,3.13449097 57.0638266,3.03547668 56.4379823,3.03547668 C55.8755128,3.03547668 55.3772905,3.12012482 54.9433153,3.28942108 C54.50934,3.45871735 54.1592119,3.69494883 53.8929307,3.99811554 C53.6266496,4.30128225 53.4637086,4.65659078 53.4041078,5.06404114 L53.3972719,5.11381531 L54.8273714,5.11381531 L54.835489,5.09074402 C54.9253531,4.82706197 55.1011115,4.62308757 55.3627641,4.4788208 C55.6244167,4.33455404 55.9612113,4.26242065 56.3731477,4.26242065 C56.872812,4.26242065 57.2494295,4.37054952 57.503,4.58680725 C57.7565706,4.80306498 57.8833559,5.11566671 57.8833559,5.52461243 L57.8833559,7.85908508 C57.8833559,8.17823792 57.8006659,8.4644928 57.6352861,8.71784973 C57.4699063,8.97120667 57.2431454,9.17167409 56.9550035,9.31925201 C56.6668616,9.46682994 56.3379355,9.5406189 55.9682252,9.5406189 C55.5699607,9.5406189 55.2410346,9.44488017 54.981447,9.25340271 C54.7218594,9.06192525 54.5920656,8.79564412 54.5920656,8.45455933 L54.5920656,8.44088745 C54.5920656,8.10884603 54.7122463,7.85029093 54.9526079,7.66522217 C55.1929694,7.4801534 55.5687857,7.37295024 56.0800569,7.34361267 L58.6209962,7.1807251 L58.6209962,6.13279724 L55.8801057,6.29814148 C54.9940685,6.34990946 54.3105994,6.56422679 53.8296983,6.94109344 C53.3487972,7.3179601 53.1083467,7.83825684 53.1083467,8.50198364 L53.1083467,8.51565552 C53.1083467,8.96561686 53.2153184,9.35676066 53.4292619,9.68908691 C53.6432054,10.0214132 53.935691,10.2779032 54.3067186,10.4585571 C54.6777462,10.639211 55.0977469,10.729538 55.5667207,10.729538 Z" id="a"></path>
<path d="M64.1054292,10.6480408 C64.2514761,10.6480408 64.3925385,10.6405818 64.5286164,10.6256638 C64.6646943,10.6107457 64.7913728,10.5933177 64.9086518,10.5733795 L64.9086518,9.38873291 C64.8043326,9.39784749 64.7129019,9.40489705 64.6343598,9.40988159 C64.5558178,9.41486613 64.4599366,9.4173584 64.3467164,9.4173584 C63.9806377,9.4173584 63.7174541,9.32863363 63.5571656,9.15118408 C63.3968771,8.97373454 63.3167329,8.68609111 63.3167329,8.28825378 L63.3167329,4.35150146 L64.9086518,4.35150146 L64.9086518,3.17657471 L63.3167329,3.17657471 L63.3167329,1.30950928 L61.7979798,1.30950928 L61.7979798,3.17657471 L60.6371522,3.17657471 L60.6371522,4.35150146 L61.7979798,4.35150146 L61.7979798,8.647995 C61.7979798,9.35985819 61.9790254,9.87116496 62.3411164,10.1819153 C62.7032075,10.4926656 63.2913117,10.6480408 64.1054292,10.6480408 Z" id="t"></path>
<path d="M69.5248706,10.7445984 C70.0004667,10.7445984 70.4226037,10.6835378 70.7912815,10.5614166 C71.1599592,10.4392955 71.4748218,10.2774048 71.7358692,10.0757446 C71.9969165,9.87408447 72.2072818,9.65173848 72.3669651,9.40870667 C72.5266483,9.16567485 72.6371448,8.92175293 72.6984546,8.67694092 L72.7134082,8.61595154 L71.2782886,8.61723328 L71.2535083,8.6711731 C71.1963286,8.79778035 71.0942523,8.92734273 70.9472797,9.05986023 C70.800307,9.19237773 70.611304,9.30315908 70.3802707,9.39220428 C70.1492374,9.48124949 69.874892,9.52577209 69.5572345,9.52577209 C69.1423786,9.52577209 68.783207,9.43375397 68.4797199,9.24971771 C68.1762327,9.06568146 67.9425291,8.80091349 67.778609,8.45541382 C67.614689,8.10991414 67.5327289,7.69349162 67.5327289,7.20614624 L67.5327289,6.61291504 C67.5327289,6.10328166 67.6165582,5.67290243 67.7842166,5.32177734 C67.9518751,4.97065226 68.1800958,4.7049408 68.4688785,4.52464294 C68.7576613,4.34434509 69.0864805,4.25419617 69.4553363,4.25419617 C69.8251178,4.25419617 70.1513914,4.34062449 70.4341571,4.51348114 C70.7169228,4.68633779 70.9384321,4.94645945 71.098685,5.29384613 C71.2589379,5.64123281 71.3390644,6.08092244 71.3390644,6.61291504 L71.3390644,7.20368958 L72.0547016,6.22016907 L66.791991,6.22016907 L66.791991,7.28070068 L72.7922351,7.28070068 L72.7922351,6.75946045 C72.7922351,6.01569621 72.6578484,5.36466217 72.389075,4.80635834 C72.1203016,4.2480545 71.7359048,3.8133316 71.2358844,3.50218964 C70.7358641,3.19104767 70.1396422,3.03547668 69.4472187,3.03547668 C68.7575723,3.03547668 68.1566506,3.19704692 67.6444538,3.52018738 C67.1322569,3.84332784 66.7361998,4.29451752 66.4562824,4.87375641 C66.176365,5.4529953 66.0364063,6.13023376 66.0364063,6.9054718 L66.0364063,6.91230774 C66.0364063,7.69502258 66.1765786,8.37320455 66.4569232,8.94685364 C66.7372679,9.52050273 67.1375797,9.96353912 67.6578586,10.2759628 C68.1781375,10.5883865 68.8004749,10.7445984 69.5248706,10.7445984 Z" id="e"></path>
<path d="M79.0089178,10.6033936 L82.3025579,10.6033936 C83.0051641,10.6033936 83.6069403,10.4914195 84.1078863,10.2674713 C84.6088324,10.0435232 84.9944754,9.72365824 85.2648153,9.30787659 C85.5351553,8.89209493 85.6703253,8.39709473 85.6703253,7.82287598 L85.6703253,7.8092041 C85.6703253,7.38046265 85.5776129,6.99590556 85.3921881,6.65553284 C85.2067633,6.31516012 84.9478877,6.03809102 84.6155615,5.82432556 C84.2832352,5.6105601 83.894014,5.48049927 83.4478979,5.43414307 L83.4478979,5.31974792 C83.7743851,5.26306661 84.0675472,5.13300578 84.327384,4.92956543 C84.5872208,4.72612508 84.7945064,4.47422791 84.9492407,4.1738739 C85.103975,3.8735199 85.1813421,3.55119832 85.1813421,3.20690918 L85.1813421,3.1932373 C85.1813421,2.69029744 85.0623185,2.25539653 84.8242712,1.88853455 C84.5862239,1.52167257 84.246047,1.2383906 83.8037405,1.03868866 C83.361434,0.838986715 82.8309546,0.739135742 82.2123022,0.739135742 L79.0089178,0.739135742 L79.0089178,1.99021912 L81.854804,1.99021912 C82.4211899,1.99021912 82.8618053,2.1188914 83.17665,2.37623596 C83.4914948,2.63358053 83.6489172,2.99453227 83.6489172,3.45909119 L83.6489172,3.47276306 C83.6489172,3.9504954 83.4755621,4.313797 83.1288519,4.56266785 C82.7821417,4.8115387 82.2697668,4.93597412 81.5917273,4.93597412 L79.0089178,4.93597412 L79.0089178,6.10577393 L81.9001989,6.10577393 C82.3817053,6.10577393 82.7854706,6.1658198 83.111495,6.28591156 C83.4375194,6.40600332 83.6831325,6.58530426 83.8483343,6.82381439 C84.0135361,7.06232452 84.096137,7.3577474 84.096137,7.71008301 L84.096137,7.72375488 C84.096137,8.25289917 83.9176728,8.65661112 83.5607443,8.93489075 C83.2038158,9.21317037 82.6806707,9.35231018 81.9913092,9.35231018 L79.0089178,9.35231018 L79.0089178,10.6033936 Z M78.2408361,10.6033936 L79.7771063,10.6033936 L79.7771063,0.739135742 L78.2408361,0.739135742 L78.2408361,10.6033936 Z" id="B"></path>
</g>
</g>
<g id="Group" transform="translate(47.000000, 90.000000)">
<mask id="mask-6" fill="white">
<use xlink:href="#path-5"></use>
</mask>
<g id="Rectangle"></g>
<g mask="url(#mask-6)" id="Stripes-Band" opacity="0.1">
<g transform="translate(-1.000000, 0.000000)">
<g id="Stripes" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(360.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(120.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(240.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(0.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(360.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(120.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(240.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(30.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(390.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(150.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(270.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(30.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(390.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(150.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(270.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(60.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(420.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(180.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(300.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(60.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(420.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(180.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(300.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(90.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(210.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(330.000000, 0.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(90.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(210.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
<g id="Stripes" transform="translate(330.000000, 30.000000)" fill="#000000">
<polygon id="Path" points="0 0 0 15 15 2.08166817e-14"></polygon>
<polygon id="Path-Copy" points="-1.18090979e-14 30 15 30 30 15 30 -3.12250226e-16"></polygon>
</g>
</g>
</g>
</g>
<g id="Read-A" transform="translate(216.000000, 130.000000)">
<g id="Background" filter="url(#filter-7)" fill="#D7E6F7">
<g id="RectangleBackground">
<rect id="RectangleBackgroundRectangle" x="0" y="0" width="110" height="120" rx="10"></rect>
</g>
</g>
<rect id="Overlay" stroke-opacity="0.25" stroke="#000000" fill="url(#linearGradient-8)" x="-0.5" y="-0.5" width="111" height="121" rx="10"></rect>
<g id="Text" transform="translate(15.398436, 54.664917)" fill="#000000" fill-rule="nonzero">
<path d="M0,10.335083 L1.53627014,10.335083 L1.53627014,6.54081726 L3.61268616,6.54081726 C3.62429301,6.54081726 3.63776906,6.54081726 3.65311432,6.54081726 C3.66845957,6.54081726 3.68150838,6.54081726 3.69226074,6.54081726 L5.70309448,10.335083 L7.47509766,10.335083 L5.26708984,6.30551147 C5.86680094,6.10036214 6.33500926,5.74651337 6.67171478,5.24396515 C7.00842031,4.74141693 7.17677307,4.15795898 7.17677307,3.49359131 L7.17677307,3.47991943 C7.17677307,2.86653646 7.04375712,2.33546956 6.77772522,1.88671875 C6.51169332,1.43796794 6.13302867,1.08979797 5.64173126,0.842208862 C5.15043386,0.594619751 4.56672668,0.470825195 3.89060974,0.470825195 L0,0.470825195 L0,10.335083 Z M1.53627014,5.29667664 L1.53627014,1.75630188 L3.69525146,1.75630188 C4.28898112,1.75630188 4.75437673,1.91345723 5.09143829,2.22776794 C5.42849986,2.54207865 5.59703064,2.97270711 5.59703064,3.51965332 L5.59703064,3.5333252 C5.59703064,4.09308879 5.43501536,4.52692159 5.1109848,4.83482361 C4.78695424,5.14272563 4.32992554,5.29667664 3.73989868,5.29667664 L1.53627014,5.29667664 Z" id="R"></path>
<path d="M11.9391818,10.4762878 C12.4147779,10.4762878 12.8369149,10.4152273 13.2055926,10.2931061 C13.5742704,10.1709849 13.889133,10.0090942 14.1501803,9.80743408 C14.4112277,9.60577393 14.621593,9.38342794 14.7812762,9.14039612 C14.9409595,8.8973643 15.051456,8.65344238 15.1127658,8.40863037 L15.1277194,8.34764099 L13.6925998,8.34892273 L13.6678195,8.40286255 C13.6106397,8.52946981 13.5085635,8.65903219 13.3615909,8.79154968 C13.2146182,8.92406718 13.0256152,9.03484853 12.7945819,9.12389374 C12.5635486,9.21293894 12.2892032,9.25746155 11.9715457,9.25746155 C11.5566897,9.25746155 11.1975182,9.16544342 10.894031,8.98140717 C10.5905439,8.79737091 10.3568403,8.53260295 10.1929202,8.18710327 C10.0290001,7.8416036 9.94704008,7.42518107 9.94704008,6.93783569 L9.94704008,6.34460449 C9.94704008,5.83497111 10.0308693,5.40459188 10.1985278,5.0534668 C10.3661863,4.70234172 10.5944069,4.43663025 10.8831897,4.2563324 C11.1719724,4.07603455 11.5007917,3.98588562 11.8696475,3.98588562 C12.239429,3.98588562 12.5657026,4.07231394 12.8484683,4.24517059 C13.131234,4.41802724 13.3527433,4.67814891 13.5129962,5.02553558 C13.6732491,5.37292226 13.7533755,5.8126119 13.7533755,6.34460449 L13.7533755,6.93537903 L14.4690127,5.95185852 L9.20630217,5.95185852 L9.20630217,7.01239014 L15.2065463,7.01239014 L15.2065463,6.4911499 C15.2065463,5.74738566 15.0721596,5.09635162 14.8033862,4.53804779 C14.5346128,3.97974396 14.1502159,3.54502106 13.6501956,3.23387909 C13.1501753,2.92273712 12.5539533,2.76716614 11.8615298,2.76716614 C11.1718834,2.76716614 10.5709618,2.92873637 10.0587649,3.25187683 C9.54656808,3.57501729 9.15051095,4.02620697 8.87059355,4.60544586 C8.59067615,5.18468475 8.45071745,5.86192322 8.45071745,6.63716125 L8.45071745,6.64399719 C8.45071745,7.42671204 8.59088977,8.104894 8.87123442,8.67854309 C9.15157906,9.25219218 9.55189085,9.69522858 10.0721698,10.0076523 C10.5924487,10.320076 11.2147861,10.4762878 11.9391818,10.4762878 Z" id="e"></path>
<path d="M18.8538244,10.4612274 C19.1848689,10.4612274 19.4896022,10.4153519 19.7680242,10.3236008 C20.0464462,10.2318497 20.2947118,10.0975342 20.512821,9.9206543 C20.7309301,9.74377441 20.9120112,9.53089905 21.0560644,9.2820282 L21.1704595,9.2820282 L21.1704595,10.335083 L22.6456335,10.335083 L22.6456335,5.25630188 C22.6456335,4.73669942 22.5325913,4.29095713 22.3065069,3.91907501 C22.0804225,3.54719289 21.7501256,3.26223755 21.3156164,3.06420898 C20.8811071,2.86618042 20.3509303,2.76716614 19.725086,2.76716614 C19.1626165,2.76716614 18.6643941,2.85181427 18.2304189,3.02111053 C17.7964437,3.1904068 17.4463155,3.42663829 17.1800344,3.72980499 C16.9137533,4.0329717 16.7508123,4.38828023 16.6912115,4.79573059 L16.6843755,4.84550476 L18.114475,4.84550476 L18.1225927,4.82243347 C18.2124568,4.55875142 18.3882151,4.35477702 18.6498678,4.21051025 C18.9115204,4.06624349 19.2483149,3.99411011 19.6602514,3.99411011 C20.1599157,3.99411011 20.5365331,4.10223897 20.7901037,4.3184967 C21.0436742,4.53475444 21.1704595,4.84735616 21.1704595,5.25630188 L21.1704595,7.59077454 C21.1704595,7.90992737 21.0877696,8.19618225 20.9223897,8.44953918 C20.7570099,8.70289612 20.530249,8.90336355 20.2421072,9.05094147 C19.9539653,9.19851939 19.6250392,9.27230835 19.2553289,9.27230835 C18.8570643,9.27230835 18.5281382,9.17656962 18.2685506,8.98509216 C18.008963,8.79361471 17.8791692,8.52733358 17.8791692,8.18624878 L17.8791692,8.1725769 C17.8791692,7.84053548 17.99935,7.58198039 18.2397115,7.39691162 C18.4800731,7.21184285 18.8558894,7.10463969 19.3671606,7.07530212 L21.9080999,6.91241455 L21.9080999,5.86448669 L19.1672094,6.02983093 C18.2811722,6.08159892 17.5977031,6.29591624 17.116802,6.6727829 C16.6359009,7.04964956 16.3954504,7.56994629 16.3954504,8.2336731 L16.3954504,8.24734497 C16.3954504,8.69730632 16.5024221,9.08845011 16.7163656,9.42077637 C16.9303091,9.75310262 17.2227946,10.0095927 17.5938222,10.1902466 C17.9648499,10.3709005 18.3848506,10.4612274 18.8538244,10.4612274 Z" id="a"></path>
<path d="M27.2957616,10.4612274 C27.8174291,10.4612274 28.2748316,10.3469925 28.6679692,10.1185226 C29.0611068,9.8900528 29.3639175,9.57155863 29.5764012,9.16304016 L29.6907964,9.16304016 L29.6907964,10.335083 L31.1760106,10.335083 L31.1760106,0 L29.6907964,0 L29.6907964,4.08543396 L29.5764012,4.08543396 C29.3800817,3.68681335 29.0784103,3.36993917 28.6713872,3.1348114 C28.2643641,2.89968363 27.8058222,2.78211975 27.2957616,2.78211975 C26.6672826,2.78211975 26.1230067,2.93850962 25.6629338,3.25128937 C25.202861,3.56406911 24.8471074,4.00696309 24.5956731,4.57997131 C24.3442388,5.15297953 24.2185216,5.83126831 24.2185216,6.61483765 L24.2185216,6.62850952 C24.2185216,7.40666707 24.3448618,8.08317566 24.5975423,8.65803528 C24.8502227,9.2328949 25.2077387,9.67714183 25.6700902,9.99077606 C26.1324417,10.3044103 26.6743321,10.4612274 27.2957616,10.4612274 Z M27.7184148,9.18792725 C27.3069056,9.18792725 26.9526118,9.08533478 26.6555333,8.88014984 C26.3584549,8.6749649 26.1305369,8.38078817 25.9717793,7.99761963 C25.8130218,7.61445109 25.7336431,7.15808105 25.7336431,6.62850952 L25.7336431,6.61483765 C25.7336431,6.08241781 25.8130218,5.62553151 25.9717793,5.24417877 C26.1305369,4.86282603 26.3586507,4.56937917 26.6561208,4.3638382 C26.9535909,4.15829722 27.3076889,4.05552673 27.7184148,4.05552673 C28.129924,4.05552673 28.4851435,4.1590271 28.7840734,4.36602783 C29.0830032,4.57302856 29.3129862,4.8671875 29.4740224,5.24850464 C29.6350586,5.62982178 29.7155766,6.08569336 29.7155766,6.61611938 L29.7155766,6.62979126 C29.7155766,7.15558879 29.6352544,7.61008962 29.4746099,7.99329376 C29.3139653,8.3764979 29.0841959,8.67140452 28.7853017,8.87801361 C28.4864074,9.0846227 28.1307785,9.18792725 27.7184148,9.18792725 Z" id="d"></path>
<path d="M40.4045396,10.5749817 C41.1700222,10.5749817 41.8349773,10.449941 42.399405,10.1998596 C42.9638327,9.94977824 43.3999798,9.59580485 43.7078462,9.13793945 C44.0157126,8.68007406 44.1696458,8.13683065 44.1696458,7.50820923 L44.1696458,7.50137329 C44.1696458,6.76950073 43.9425645,6.1852239 43.4884019,5.74854279 C43.0342393,5.31186167 42.2892645,4.98250834 41.2534776,4.76048279 L40.1785264,4.52571106 C39.5411464,4.3898468 39.0828894,4.1998113 38.8037553,3.95560455 C38.5246212,3.71139781 38.3850541,3.40668233 38.3850541,3.04145813 L38.3850541,3.03462219 C38.3850541,2.72422791 38.4724971,2.46026103 38.6473832,2.24272156 C38.8222693,2.02518209 39.0602098,1.85782623 39.3612046,1.74065399 C39.6621995,1.62348175 40.004388,1.56489563 40.3877702,1.56489563 C40.786106,1.56119283 41.1343293,1.61999257 41.4324403,1.74129486 C41.7305512,1.86259715 41.9692572,2.02726491 42.1485581,2.23529816 C42.3278591,2.4433314 42.4390143,2.68317668 42.4820237,2.95483398 L42.4956956,3.0411377 L43.988173,3.0411377 L43.9813371,2.94917297 C43.9452348,2.43526713 43.7760631,1.97359212 43.4738221,1.56414795 C43.1715811,1.15470378 42.7595913,0.83013916 42.2378526,0.590454102 C41.7161139,0.350769043 41.1066473,0.230926514 40.4094529,0.230926514 C39.7120449,0.230926514 39.0944963,0.352335612 38.556807,0.595153809 C38.0191178,0.837972005 37.5980668,1.17569224 37.293654,1.60831451 C36.9892411,2.04093679 36.8351833,2.54239909 36.8314805,3.11270142 L36.8314805,3.11953735 C36.8314805,3.8475647 37.0590603,4.44433848 37.5142198,4.9098587 C37.9693793,5.37537893 38.6976914,5.71584066 39.6991563,5.9312439 L40.7741075,6.16046143 C41.4289333,6.30166626 41.8996339,6.49695333 42.1862092,6.74632263 C42.4727845,6.99569194 42.6160722,7.3095754 42.6160722,7.68797302 L42.6160722,7.69480896 C42.6160722,7.99744161 42.5237514,8.26528931 42.3391099,8.49835205 C42.1544684,8.73141479 41.9007732,8.91345723 41.5780244,9.04447937 C41.2552756,9.17550151 40.8847998,9.24101257 40.4665971,9.24101257 C40.0261064,9.24101257 39.63393,9.17993418 39.2900681,9.0577774 C38.9462063,8.93562063 38.6723237,8.76473999 38.4684205,8.5451355 C38.2645173,8.32553101 38.1474697,8.06669108 38.1172776,7.76861572 L38.1104417,7.69715881 L36.6004472,7.69715881 L36.6072831,7.78367615 C36.6540666,8.33525085 36.8368923,8.82060242 37.1557603,9.23973083 C37.4746283,9.65885925 37.9097428,9.98618317 38.4611039,10.2217026 C39.012465,10.457222 39.6602769,10.5749817 40.4045396,10.5749817 Z" id="S"></path>
<path d="M48.6638291,10.3797302 C48.809876,10.3797302 48.9509385,10.3722712 49.0870163,10.3573532 C49.2230942,10.3424352 49.3497727,10.3250071 49.4670517,10.305069 L49.4670517,9.12042236 C49.3627325,9.12953695 49.2713018,9.13658651 49.1927598,9.14157104 C49.1142177,9.14655558 49.0183365,9.14904785 48.9051163,9.14904785 C48.5390376,9.14904785 48.275854,9.06032308 48.1155655,8.88287354 C47.955277,8.70542399 47.8751328,8.41778056 47.8751328,8.01994324 L47.8751328,4.08319092 L49.4670517,4.08319092 L49.4670517,2.90826416 L47.8751328,2.90826416 L47.8751328,1.04119873 L46.3563797,1.04119873 L46.3563797,2.90826416 L45.1955521,2.90826416 L45.1955521,4.08319092 L46.3563797,4.08319092 L46.3563797,8.37968445 C46.3563797,9.09154765 46.5374253,9.60285441 46.8995163,9.91360474 C47.2616074,10.2243551 47.8497117,10.3797302 48.6638291,10.3797302 Z" id="t"></path>
<path d="M53.0823381,10.4612274 C53.4133826,10.4612274 53.7181159,10.4153519 53.9965379,10.3236008 C54.27496,10.2318497 54.5232255,10.0975342 54.7413347,9.9206543 C54.9594438,9.74377441 55.1405249,9.53089905 55.2845781,9.2820282 L55.3989732,9.2820282 L55.3989732,10.335083 L56.8741472,10.335083 L56.8741472,5.25630188 C56.8741472,4.73669942 56.761105,4.29095713 56.5350206,3.91907501 C56.3089362,3.54719289 55.9786394,3.26223755 55.5441301,3.06420898 C55.1096208,2.86618042 54.579444,2.76716614 53.9535997,2.76716614 C53.3911302,2.76716614 52.8929079,2.85181427 52.4589326,3.02111053 C52.0249574,3.1904068 51.6748292,3.42663829 51.4085481,3.72980499 C51.142267,4.0329717 50.979326,4.38828023 50.9197252,4.79573059 L50.9128892,4.84550476 L52.3429887,4.84550476 L52.3511064,4.82243347 C52.4409705,4.55875142 52.6167289,4.35477702 52.8783815,4.21051025 C53.1400341,4.06624349 53.4768287,3.99411011 53.8887651,3.99411011 C54.3884294,3.99411011 54.7650468,4.10223897 55.0186174,4.3184967 C55.2721879,4.53475444 55.3989732,4.84735616 55.3989732,5.25630188 L55.3989732,7.59077454 C55.3989732,7.90992737 55.3162833,8.19618225 55.1509035,8.44953918 C54.9855236,8.70289612 54.7587628,8.90336355 54.4706209,9.05094147 C54.182479,9.19851939 53.8535529,9.27230835 53.4838426,9.27230835 C53.085578,9.27230835 52.756652,9.17656962 52.4970644,8.98509216 C52.2374767,8.79361471 52.1076829,8.52733358 52.1076829,8.18624878 L52.1076829,8.1725769 C52.1076829,7.84053548 52.2278637,7.58198039 52.4682252,7.39691162 C52.7085868,7.21184285 53.0844031,7.10463969 53.5956743,7.07530212 L56.1366136,6.91241455 L56.1366136,5.86448669 L53.3957231,6.02983093 C52.5096859,6.08159892 51.8262168,6.29591624 51.3453157,6.6727829 C50.8644146,7.04964956 50.6239641,7.56994629 50.6239641,8.2336731 L50.6239641,8.24734497 C50.6239641,8.69730632 50.7309358,9.08845011 50.9448793,9.42077637 C51.1588228,9.75310262 51.4513083,10.0095927 51.822336,10.1902466 C52.1933636,10.3709005 52.6133643,10.4612274 53.0823381,10.4612274 Z" id="a"></path>
<path d="M61.6210465,10.3797302 C61.7670935,10.3797302 61.9081559,10.3722712 62.0442338,10.3573532 C62.1803117,10.3424352 62.3069901,10.3250071 62.4242692,10.305069 L62.4242692,9.12042236 C62.3199499,9.12953695 62.2285193,9.13658651 62.1499772,9.14157104 C62.0714351,9.14655558 61.975554,9.14904785 61.8623338,9.14904785 C61.4962551,9.14904785 61.2330715,9.06032308 61.072783,8.88287354 C60.9124945,8.70542399 60.8323503,8.41778056 60.8323503,8.01994324 L60.8323503,4.08319092 L62.4242692,4.08319092 L62.4242692,2.90826416 L60.8323503,2.90826416 L60.8323503,1.04119873 L59.3135972,1.04119873 L59.3135972,2.90826416 L58.1527696,2.90826416 L58.1527696,4.08319092 L59.3135972,4.08319092 L59.3135972,8.37968445 C59.3135972,9.09154765 59.4946427,9.60285441 59.8567338,9.91360474 C60.2188249,10.2243551 60.8069291,10.3797302 61.6210465,10.3797302 Z" id="t"></path>
<path d="M67.040488,10.4762878 C67.5160841,10.4762878 67.9382211,10.4152273 68.3068988,10.2931061 C68.6755766,10.1709849 68.9904392,10.0090942 69.2514865,9.80743408 C69.5125339,9.60577393 69.7228992,9.38342794 69.8825824,9.14039612 C70.0422657,8.8973643 70.1527622,8.65344238 70.214072,8.40863037 L70.2290256,8.34764099 L68.793906,8.34892273 L68.7691257,8.40286255 C68.7119459,8.52946981 68.6098697,8.65903219 68.4628971,8.79154968 C68.3159244,8.92406718 68.1269214,9.03484853 67.8958881,9.12389374 C67.6648548,9.21293894 67.3905094,9.25746155 67.0728519,9.25746155 C66.6579959,9.25746155 66.2988244,9.16544342 65.9953372,8.98140717 C65.6918501,8.79737091 65.4581465,8.53260295 65.2942264,8.18710327 C65.1303063,7.8416036 65.0483463,7.42518107 65.0483463,6.93783569 L65.0483463,6.34460449 C65.0483463,5.83497111 65.1321755,5.40459188 65.299834,5.0534668 C65.4674925,4.70234172 65.6957131,4.43663025 65.9844959,4.2563324 C66.2732786,4.07603455 66.6020979,3.98588562 66.9709537,3.98588562 C67.3407352,3.98588562 67.6670088,4.07231394 67.9497745,4.24517059 C68.2325402,4.41802724 68.4540495,4.67814891 68.6143024,5.02553558 C68.7745553,5.37292226 68.8546817,5.8126119 68.8546817,6.34460449 L68.8546817,6.93537903 L69.5703189,5.95185852 L64.3076084,5.95185852 L64.3076084,7.01239014 L70.3078525,7.01239014 L70.3078525,6.4911499 C70.3078525,5.74738566 70.1734658,5.09635162 69.9046924,4.53804779 C69.635919,3.97974396 69.2515221,3.54502106 68.7515018,3.23387909 C68.2514815,2.92273712 67.6552595,2.76716614 66.962836,2.76716614 C66.2731896,2.76716614 65.672268,2.92873637 65.1600711,3.25187683 C64.6478743,3.57501729 64.2518171,4.02620697 63.9718997,4.60544586 C63.6919823,5.18468475 63.5520236,5.86192322 63.5520236,6.63716125 L63.5520236,6.64399719 C63.5520236,7.42671204 63.692196,8.104894 63.9725406,8.67854309 C64.2528853,9.25219218 64.6531971,9.69522858 65.173476,10.0076523 C65.6937549,10.320076 66.3160923,10.4762878 67.040488,10.4762878 Z" id="e"></path>
<path d="M74.9991598,10.335083 L76.6131887,10.335083 L79.3323965,2.20277405 L79.8010855,2.20277405 L79.8010855,0.470825195 L78.5594015,0.470825195 L74.9991598,10.335083 Z M76.7155142,7.66981506 L82.0660238,7.66981506 L81.6381369,6.44084167 L77.143508,6.44084167 L76.7155142,7.66981506 Z M82.1659994,10.335083 L83.7801352,10.335083 L80.2198935,0.470825195 L79.4467916,0.470825195 L79.4467916,2.20277405 L82.1659994,10.335083 Z" id="A"></path>
</g>
</g>
<path id="Line" d="M120.387535,86.0014056 C122.87204,85.939293 124.936482,87.9030301 124.998594,90.3875351 C125.056477,92.7028458 123.355035,94.6533573 121.112328,94.9585466 L121.256092,100.737426 C121.382647,105.799632 125.452309,109.85547 130.482735,109.996222 L130.753125,110 L261.246875,110 C266.848691,110 271.44568,114.392441 271.73273,119.953809 L271.743596,120.237582 L271.88839,126.016393 C274.143726,126.208957 275.940708,128.072093 275.998594,130.387535 C276.060707,132.87204 274.09697,134.936482 271.612465,134.998594 C269.12796,135.060707 267.063518,133.09697 267.001406,130.612465 C266.943523,128.297154 268.644965,126.346643 270.887672,126.041453 L270.743908,120.262574 C270.617353,115.200368 266.547691,111.14453 261.517265,111.003778 L261.246875,111 L130.753125,111 C125.151309,111 120.55432,106.607559 120.26727,101.046191 L120.256404,100.762418 L120.11161,94.983607 C117.856274,94.7910431 116.059292,92.927907 116.001406,90.6124649 C115.939293,88.1279598 117.90303,86.0635182 120.387535,86.0014056 Z" fill="#000000" fill-rule="nonzero"></path>
<g id="Isolation" transform="translate(169.178682, 104.396606)" fill-rule="nonzero" stroke="#FFFFFF" stroke-width="2">
<path d="M2.53627014,-0.260864258 L2.53627014,11.6033936 L-1,11.6033936 L-1,-0.260864258 L2.53627014,-0.260864258 Z" id="I"></path>
<path d="M6.40716934,2.03547668 C7.12269265,2.03547668 7.74358995,2.15399296 8.27367845,2.37381416 C8.86671198,2.61973789 9.32936965,2.96755189 9.67396422,3.40155614 C10.2469617,4.12322546 10.4554479,5.01557486 10.2831081,6.08539814 L10.2831081,6.08539814 L9.224,6.091 L9.33071065,6.16227608 C9.38444825,6.20035786 9.43587839,6.23925816 9.48503368,6.27892302 L9.6257077,6.4001573 C10.1703636,6.90212912 10.4679604,7.56834248 10.4679604,8.42272949 C10.4679604,9.13044799 10.2598996,9.7333722 9.85780361,10.2550665 C9.48909706,10.7334401 8.99154229,11.1130724 8.35305264,11.3787662 C7.777436,11.6182967 7.12302421,11.7445984 6.38698196,11.7445984 C5.64878804,11.7445984 5.00835673,11.6284377 4.46220575,11.4124684 C3.84850739,11.1697883 3.36821925,10.8236069 3.00861428,10.3907691 C2.40760274,9.66736288 2.186161,8.76255147 2.36052419,7.66935182 L2.36052419,7.66935182 L3.791,7.658 L3.78130264,7.6528259 C3.66565819,7.57678493 3.55940696,7.49677788 3.46225451,7.41327369 L3.32331309,7.28545316 C2.80491462,6.7743677 2.52186966,6.10813545 2.52186966,5.26516724 C2.52186966,4.59734298 2.71467235,4.01775387 3.08883707,3.51214917 C3.43440152,3.04519171 3.90618203,2.67079315 4.51680554,2.4042349 C5.06936126,2.16302525 5.69843526,2.03547668 6.40716934,2.03547668 Z" id="s"></path>
<path d="M14.2291107,2.03547668 C15.1546352,2.03547668 15.946079,2.24477562 16.6113075,2.63707941 C17.3005411,3.04353967 17.8363723,3.62243346 18.2114795,4.38067494 C18.5572967,5.07970943 18.7419281,5.91140344 18.7419281,6.88186646 C18.7419281,7.86587075 18.5579508,8.69551453 18.2143145,9.39375932 C17.8408322,10.1526491 17.3057932,10.7326915 16.6163762,11.1406392 C15.951033,11.5343417 15.1579624,11.7445984 14.2291107,11.7445984 C13.3063871,11.7445984 12.5149822,11.5350947 11.8473422,11.1414256 C11.1554196,10.7334384 10.6189834,10.1532238 10.2449186,9.3942953 C9.90028784,8.69508457 9.71640015,7.8641679 9.71640015,6.89553833 C9.71640015,5.91022509 9.90168562,5.07989546 10.2476788,4.38146651 C10.6232154,3.62340078 11.1602628,3.04418058 11.851861,2.63722848 C12.5195665,2.24433542 13.3095241,2.03547668 14.2291107,2.03547668 Z M14.2291107,5.27619934 C14.0336836,5.27619934 13.8610535,5.30908005 13.7218483,5.40596939 C13.57573,5.50767041 13.4750649,5.66180437 13.3987428,5.85075457 C13.2833348,6.1364694 13.2364349,6.48342504 13.2364349,6.89682007 C13.2364349,7.29760509 13.2838413,7.64279485 13.3985986,7.92798898 C13.4747811,8.11731734 13.575455,8.27179274 13.7216957,8.37387798 C13.8607774,8.47096586 14.0335094,8.50376892 14.2291107,8.50376892 C14.4246616,8.50376892 14.5972739,8.47125856 14.7359154,8.37414939 C14.8823548,8.27157833 14.983267,8.1166423 15.0596468,7.92678043 C15.1747492,7.64066339 15.2217865,7.29457344 15.2217865,6.88314819 C15.2217865,6.48108609 15.174491,6.13542235 15.0595025,5.85068142 C14.9831546,5.66162442 14.8825705,5.50737663 14.7365578,5.40561448 C14.5975757,5.30875222 14.4248031,5.27619934 14.2291107,5.27619934 Z" id="o"></path>
<path d="M21.9093871,-0.731689453 L21.9093871,11.6033936 L18.4241729,11.6033936 L18.4241729,-0.731689453 L21.9093871,-0.731689453 Z" id="l"></path>
<path d="M25.8666501,2.03547668 C26.6577581,2.03547668 27.3240906,2.1729049 27.8718933,2.42256717 C28.5025447,2.70998795 28.9753038,3.1296183 29.3025538,3.66790584 C29.6164664,4.18425501 29.7871976,4.80033787 29.7871976,5.52461243 L29.7871976,5.52461243 L29.7871976,11.6033936 L26.3120236,11.6033936 L26.312,11.508 L26.2225715,11.54167 C25.923578,11.6402002 25.6022075,11.7013176 25.2579146,11.7218233 L24.9953885,11.729538 C24.3623678,11.729538 23.7975542,11.6010646 23.297619,11.3576454 C22.7549563,11.0934222 22.3296811,10.7159304 22.0171026,10.2303907 C21.704467,9.74476241 21.5370145,9.17552123 21.5370145,8.51565552 C21.5370145,7.49181187 21.9202446,6.7192499 22.641541,6.15399318 L22.641541,6.15399318 L22.692,6.116 L21.8045145,6.13032925 C21.7247892,4.93211982 21.9479054,4.12240571 22.4568383,3.47461135 L22.5702639,3.33819407 C22.9356633,2.92217919 23.411656,2.5906526 24.0085522,2.35779991 C24.5480492,2.14733897 25.1665021,2.03547668 25.8666501,2.03547668 Z" id="a"></path>
<path d="M33.7454007,0.309509277 L33.7454007,2.17657471 L35.3373196,2.17657471 L35.3373196,5.35150146 L33.7454007,5.35150146 L33.7454007,8.28825378 L34.1520529,7.90486209 L35.8774996,11.4544741 C32.5528165,11.8049576 31.6722134,11.4159518 31.1185259,10.9407714 C30.5773023,10.4762877 30.2266476,9.74267029 30.2266476,8.647995 L30.2266476,8.647995 L30.2266476,5.35150146 L29.06582,5.35150146 L29.06582,2.17657471 L30.2266476,2.17657471 L30.2266476,0.309509277 L33.7454007,0.309509277 Z" id="t"></path>
<path d="M38.4267728,2.17657471 L38.4267728,11.6033936 L34.9415586,11.6033936 L34.9415586,2.17657471 L38.4267728,2.17657471 Z M36.6896665,-1 C37.2234094,-1 37.6774237,-0.812470101 38.0529481,-0.440405081 C38.4310227,-0.0658133267 38.6215971,0.389529049 38.6215971,0.9269104 C38.6215971,1.45390209 38.4348971,1.90775538 38.0565739,2.28644941 C37.6800507,2.66334153 37.2245935,2.85243225 36.6896665,2.85243225 C36.1657015,2.85243225 35.7117703,2.66756053 35.3307028,2.29084514 C34.9463953,1.9109267 34.7578428,1.45529134 34.7578428,0.9269104 C34.7578428,0.388116217 34.9503091,-0.0689880049 35.3343506,-0.444777684 C35.7143952,-0.816656424 36.1668666,-1 36.6896665,-1 L36.6896665,-1 Z" id="i"></path>
<path d="M42.5756691,2.03547668 C43.5011935,2.03547668 44.2926374,2.24477562 44.9578658,2.63707941 C45.6470994,3.04353967 46.1829306,3.62243346 46.5580379,4.38067494 C46.903855,5.07970943 47.0884864,5.91140344 47.0884864,6.88186646 C47.0884864,7.86587075 46.9045091,8.69551453 46.5608728,9.39375932 C46.1873905,10.1526491 45.6523516,10.7326915 44.9629345,11.1406392 C44.2975913,11.5343417 43.5045207,11.7445984 42.5756691,11.7445984 C41.6529454,11.7445984 40.8615406,11.5350947 40.1939005,11.1414256 C39.501978,10.7334384 38.9655417,10.1532238 38.591477,9.3942953 C38.2468462,8.69508457 38.0629585,7.8641679 38.0629585,6.89553833 C38.0629585,5.91022509 38.248244,5.07989546 38.5942372,4.38146651 C38.9697737,3.62340078 39.5068211,3.04418058 40.1984194,2.63722848 C40.8661249,2.24433542 41.6560824,2.03547668 42.5756691,2.03547668 Z M42.5756691,5.27619934 C42.3802419,5.27619934 42.2076118,5.30908005 42.0684067,5.40596939 C41.9222883,5.50767041 41.8216233,5.66180437 41.7453011,5.85075457 C41.6298931,6.1364694 41.5829933,6.48342504 41.5829933,6.89682007 C41.5829933,7.29760509 41.6303996,7.64279485 41.7451569,7.92798898 C41.8213395,8.11731734 41.9220133,8.27179274 42.068254,8.37387798 C42.2073358,8.47096586 42.3800677,8.50376892 42.5756691,8.50376892 C42.7712199,8.50376892 42.9438322,8.47125856 43.0824737,8.37414939 C43.2289131,8.27157833 43.3298253,8.1166423 43.4062051,7.92678043 C43.5213076,7.64066339 43.5683448,7.29457344 43.5683448,6.88314819 C43.5683448,6.48108609 43.5210493,6.13542235 43.4060608,5.85068142 C43.3297129,5.66162442 43.2291288,5.50737663 43.0831161,5.40561448 C42.944134,5.30875222 42.7713615,5.27619934 42.5756691,5.27619934 Z" id="o"></path>
<path d="M51.4534857,2.03547668 C52.6212889,2.03547668 53.4882494,2.41214271 54.1002726,3.0741289 C54.6893987,3.71134891 55.0293524,4.60493083 55.0293524,5.79676819 L55.0293524,5.79676819 L55.0293524,11.6033936 L51.5441382,11.6033936 L51.5441382,6.14529419 C51.5441382,5.83593687 51.5320206,5.57471104 51.3946107,5.41382109 C50.2165046,5.82362401 50.1875861,6.02097441 50.1875861,6.24580383 L50.1875861,11.6033936 L46.7023718,11.6033936 L46.7023718,2.17657471 L50.1875861,2.17657471 L50.187,2.234 L50.3134125,2.19223945 C50.5846034,2.11051521 50.8815633,2.05922158 51.2054776,2.0419731 Z" id="n"></path>
</g>
<g id="Isolation" transform="translate(169.178682, 104.396606)" fill="#000000" fill-rule="nonzero">
<polygon id="I" points="0 10.6033936 1.53627014 10.6033936 1.53627014 0.739135742 0 0.739135742"></polygon>
<path d="M6.38698196,10.7445984 C6.97843297,10.7445984 7.50572586,10.6482366 7.96886063,10.455513 C8.43199539,10.2627894 8.79762904,9.99248505 9.06576157,9.64459991 C9.33389409,9.29671478 9.46796036,8.89355469 9.46796036,8.43511963 L9.46796036,8.42272949 C9.46796036,7.88404338 9.29464086,7.45496368 8.94800186,7.13549042 C8.60136286,6.81601715 8.07040278,6.57325236 7.35512161,6.40719604 L6.17773819,6.13621521 C5.76152929,6.03894552 5.46233241,5.91516876 5.28014755,5.76488495 C5.0979627,5.61460114 5.00687027,5.4233195 5.00687027,5.19104004 L5.00687027,5.1786499 C5.00687027,4.97827148 5.06730779,4.80356344 5.18818283,4.65452576 C5.30905787,4.50548808 5.47424189,4.38906352 5.68373489,4.30525208 C5.8932279,4.22144063 6.13252131,4.17953491 6.40161514,4.17953491 C6.82152685,4.17953491 7.15962092,4.26608785 7.41589737,4.43919373 C7.67217382,4.6122996 7.83442052,4.82880656 7.90263748,5.0887146 L7.90520096,5.10003662 L9.32611465,5.10003662 L9.32611465,5.09127808 C9.28139623,4.68852743 9.13629278,4.33256022 8.89080429,4.02337646 C8.64531581,3.71419271 8.31192144,3.47224681 7.89062119,3.29753876 C7.46932093,3.12283071 6.97483699,3.03547668 6.40716934,3.03547668 C5.84925715,3.03547668 5.35249456,3.13055674 4.91688156,3.32071686 C4.48126856,3.51087697 4.13986333,3.77297465 3.89266586,4.10700989 C3.64546839,4.44104513 3.52186966,4.82481893 3.52186966,5.2583313 L3.52186966,5.26516724 C3.52186966,5.80634562 3.68970617,6.24240367 4.02537918,6.57334137 C4.3610522,6.90427907 4.87841161,7.15010579 5.57745743,7.31082153 L6.76039505,7.58180237 C7.18942134,7.68199158 7.49750137,7.81187439 7.68463516,7.97145081 C7.87176895,8.13102722 7.96533585,8.32738241 7.96533585,8.56051636 L7.96533585,8.57290649 C7.96533585,8.77527873 7.89930852,8.95315552 7.76725388,9.10653687 C7.63519923,9.25991821 7.45399348,9.38036601 7.22363663,9.46788025 C6.99327977,9.55539449 6.72553889,9.59915161 6.42041397,9.59915161 C5.97942479,9.59915161 5.62438329,9.51242065 5.35528946,9.33895874 C5.08619563,9.16549683 4.90486526,8.93944804 4.81129837,8.66081238 L4.80755997,8.65077209 L3.3174324,8.65077209 L3.31871414,8.66209412 C3.36514155,9.07602437 3.51816686,9.43923696 3.77779007,9.75173187 C4.03741328,10.0642268 4.38812892,10.3078283 4.82993698,10.4825363 C5.27174505,10.6572444 5.79076004,10.7445984 6.38698196,10.7445984 Z" id="s"></path>
<path d="M14.2291107,10.7445984 C14.9577077,10.7445984 15.5837123,10.5897395 16.1071243,10.2800217 C16.6305364,9.97030385 17.0338567,9.5276947 17.3170853,8.95219421 C17.6003138,8.37669373 17.7419281,7.69114176 17.7419281,6.89553833 L17.7419281,6.88186646 C17.7419281,6.0851237 17.599673,5.3991979 17.3151627,4.82408905 C17.0306524,4.2489802 16.626709,3.80710093 16.1033325,3.49845123 C15.5799561,3.18980153 14.9552155,3.03547668 14.2291107,3.03547668 C13.5076345,3.03547668 12.8842646,3.19001516 12.3590012,3.4990921 C11.8337377,3.80816905 11.428655,4.25026194 11.1437531,4.82537079 C10.8588511,5.40047963 10.7164001,6.08597819 10.7164001,6.88186646 L10.7164001,6.89553833 C10.7164001,7.69114176 10.858228,8.37669373 11.1418839,8.95219421 C11.4255397,9.5276947 11.8299993,9.97030385 12.3552628,10.2800217 C12.8805262,10.5897395 13.5051422,10.7445984 14.2291107,10.7445984 Z M14.2291107,9.50376892 C13.8052114,9.50376892 13.4452744,9.40046438 13.1492996,9.19385529 C12.8533249,8.9872462 12.6271871,8.6897227 12.4708862,8.30128479 C12.3145854,7.91284688 12.2364349,7.44469198 12.2364349,6.89682007 L12.2364349,6.88314819 C12.2364349,6.33321126 12.314799,5.86423747 12.4715271,5.47622681 C12.6282552,5.08821615 12.8546066,4.7912089 13.1505814,4.58520508 C13.4465561,4.37920125 13.8060659,4.27619934 14.2291107,4.27619934 C14.6530101,4.27619934 15.0127513,4.37920125 15.3083344,4.58520508 C15.6039174,4.7912089 15.8300552,5.08821615 15.9867477,5.47622681 C16.1434402,5.86423747 16.2217865,6.33321126 16.2217865,6.88314819 L16.2217865,6.89682007 C16.2217865,7.44383748 16.1436539,7.91156514 15.9873886,8.30000305 C15.8311234,8.68844096 15.6051992,8.98617808 15.3096161,9.19321442 C15.014033,9.40025075 14.6538645,9.50376892 14.2291107,9.50376892 Z" id="o"></path>
<polygon id="l" points="19.4241729 10.6033936 20.9093871 10.6033936 20.9093871 0.268310547 19.4241729 0.268310547"></polygon>
<path d="M24.9953885,10.729538 C25.326433,10.729538 25.6311663,10.6836624 25.9095883,10.5919113 C26.1880104,10.5001602 26.436276,10.3658447 26.6543851,10.1889648 C26.8724942,10.012085 27.0535754,9.79920959 27.1976285,9.55033875 L27.3120236,9.55033875 L27.3120236,10.6033936 L28.7871976,10.6033936 L28.7871976,5.52461243 C28.7871976,5.00500997 28.6741554,4.55926768 28.448071,4.18738556 C28.2219866,3.81550344 27.8916898,3.5305481 27.4571805,3.33251953 C27.0226712,3.13449097 26.4924944,3.03547668 25.8666501,3.03547668 C25.3041806,3.03547668 24.8059583,3.12012482 24.3719831,3.28942108 C23.9380078,3.45871735 23.5878797,3.69494883 23.3215985,3.99811554 C23.0553174,4.30128225 22.8923764,4.65659078 22.8327756,5.06404114 L22.8259397,5.11381531 L24.2560391,5.11381531 L24.2641568,5.09074402 C24.3540209,4.82706197 24.5297793,4.62308757 24.7914319,4.4788208 C25.0530845,4.33455404 25.3898791,4.26242065 25.8018155,4.26242065 C26.3014798,4.26242065 26.6780972,4.37054952 26.9316678,4.58680725 C27.1852384,4.80306498 27.3120236,5.11566671 27.3120236,5.52461243 L27.3120236,7.85908508 C27.3120236,8.17823792 27.2293337,8.4644928 27.0639539,8.71784973 C26.898574,8.97120667 26.6718132,9.17167409 26.3836713,9.31925201 C26.0955294,9.46682994 25.7666033,9.5406189 25.396893,9.5406189 C24.9986285,9.5406189 24.6697024,9.44488017 24.4101148,9.25340271 C24.1505272,9.06192525 24.0207334,8.79564412 24.0207334,8.45455933 L24.0207334,8.44088745 C24.0207334,8.10884603 24.1409141,7.85029093 24.3812757,7.66522217 C24.6216372,7.4801534 24.9974535,7.37295024 25.5087247,7.34361267 L28.049664,7.1807251 L28.049664,6.13279724 L25.3087735,6.29814148 C24.4227363,6.34990946 23.7392672,6.56422679 23.2583661,6.94109344 C22.777465,7.3179601 22.5370145,7.83825684 22.5370145,8.50198364 L22.5370145,8.51565552 C22.5370145,8.96561686 22.6439862,9.35676066 22.8579297,9.68908691 C23.0718732,10.0214132 23.3643587,10.2779032 23.7353864,10.4585571 C24.106414,10.639211 24.5264147,10.729538 24.9953885,10.729538 Z" id="a"></path>
<path d="M33.534097,10.6480408 C33.6801439,10.6480408 33.8212063,10.6405818 33.9572842,10.6256638 C34.0933621,10.6107457 34.2200406,10.5933177 34.3373196,10.5733795 L34.3373196,9.38873291 C34.2330004,9.39784749 34.1415697,9.40489705 34.0630276,9.40988159 C33.9844855,9.41486613 33.8886044,9.4173584 33.7753842,9.4173584 C33.4093055,9.4173584 33.1461219,9.32863363 32.9858334,9.15118408 C32.8255449,8.97373454 32.7454007,8.68609111 32.7454007,8.28825378 L32.7454007,4.35150146 L34.3373196,4.35150146 L34.3373196,3.17657471 L32.7454007,3.17657471 L32.7454007,1.30950928 L31.2266476,1.30950928 L31.2266476,3.17657471 L30.06582,3.17657471 L30.06582,4.35150146 L31.2266476,4.35150146 L31.2266476,8.647995 C31.2266476,9.35985819 31.4076931,9.87116496 31.7697842,10.1819153 C32.1318753,10.4926656 32.7199795,10.6480408 33.534097,10.6480408 Z" id="t"></path>
<path d="M35.9415586,10.6033936 L37.4267728,10.6033936 L37.4267728,3.17657471 L35.9415586,3.17657471 L35.9415586,10.6033936 Z M36.6896665,1.85243225 C36.9476519,1.85243225 37.1674701,1.76151784 37.3491209,1.57968903 C37.5307717,1.39786021 37.6215971,1.18026733 37.6215971,0.9269104 C37.6215971,0.668924967 37.5307717,0.449943542 37.3491209,0.269966125 C37.1674701,0.0899887085 36.9476519,0 36.6896665,0 C36.4363096,0 36.2176664,0.0899887085 36.0337369,0.269966125 C35.8498075,0.449943542 35.7578428,0.668924967 35.7578428,0.9269104 C35.7578428,1.18026733 35.8498075,1.39786021 36.0337369,1.57968903 C36.2176664,1.76151784 36.4363096,1.85243225 36.6896665,1.85243225 Z" id="i"></path>
<path d="M42.5756691,10.7445984 C43.3042661,10.7445984 43.9302706,10.5897395 44.4536827,10.2800217 C44.9770947,9.97030385 45.380415,9.5276947 45.6636436,8.95219421 C45.9468722,8.37669373 46.0884864,7.69114176 46.0884864,6.89553833 L46.0884864,6.88186646 C46.0884864,6.0851237 45.9462313,5.3991979 45.661721,4.82408905 C45.3772107,4.2489802 44.9732673,3.80710093 44.4498909,3.49845123 C43.9265144,3.18980153 43.3017738,3.03547668 42.5756691,3.03547668 C41.8541928,3.03547668 41.230823,3.19001516 40.7055595,3.4990921 C40.180296,3.80816905 39.7752133,4.25026194 39.4903114,4.82537079 C39.2054094,5.40047963 39.0629585,6.08597819 39.0629585,6.88186646 L39.0629585,6.89553833 C39.0629585,7.69114176 39.2047864,8.37669373 39.4884422,8.95219421 C39.772098,9.5276947 40.1765576,9.97030385 40.7018211,10.2800217 C41.2270846,10.5897395 41.8517005,10.7445984 42.5756691,10.7445984 Z M42.5756691,9.50376892 C42.1517697,9.50376892 41.7918327,9.40046438 41.495858,9.19385529 C41.1998832,8.9872462 40.9737454,8.6897227 40.8174446,8.30128479 C40.6611437,7.91284688 40.5829933,7.44469198 40.5829933,6.89682007 L40.5829933,6.88314819 C40.5829933,6.33321126 40.6613573,5.86423747 40.8180854,5.47622681 C40.9748135,5.08821615 41.201165,4.7912089 41.4971397,4.58520508 C41.7931144,4.37920125 42.1526242,4.27619934 42.5756691,4.27619934 C42.9995684,4.27619934 43.3593096,4.37920125 43.6548927,4.58520508 C43.9504758,4.7912089 44.1766136,5.08821615 44.3333061,5.47622681 C44.4899986,5.86423747 44.5683448,6.33321126 44.5683448,6.88314819 L44.5683448,6.89682007 C44.5683448,7.44383748 44.4902122,7.91156514 44.3339469,8.30000305 C44.1776817,8.68844096 43.9517575,8.98617808 43.6561744,9.19321442 C43.3605913,9.40025075 43.0004229,9.50376892 42.5756691,9.50376892 Z" id="o"></path>
<path d="M47.7023718,10.6033936 L49.1875861,10.6033936 L49.1875861,6.24580383 C49.1875861,5.84632874 49.25931,5.50250244 49.4027579,5.21432495 C49.5462058,4.92614746 49.7493613,4.70317841 50.0122244,4.54541779 C50.2750876,4.38765717 50.5870306,4.30877686 50.9480536,4.30877686 C51.4932908,4.30877686 51.8956142,4.46064504 52.1550238,4.76438141 C52.4144334,5.06811778 52.5441382,5.52842204 52.5441382,6.14529419 L52.5441382,10.6033936 L54.0293524,10.6033936 L54.0293524,5.79676819 C54.0293524,4.9125824 53.8082348,4.2313207 53.3659995,3.75298309 C52.9237641,3.27464549 52.2862596,3.03547668 51.4534857,3.03547668 C50.9128058,3.03547668 50.4645,3.14746857 50.1085684,3.37145233 C49.7526368,3.5954361 49.4837744,3.90631104 49.3019812,4.30407715 L49.1875861,4.30407715 L49.1875861,3.17657471 L47.7023718,3.17657471 L47.7023718,10.6033936 Z" id="n"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 126 KiB

+217 -142
View File
@@ -1,173 +1,248 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="489px" height="362px" viewBox="0 0 489 362" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 51.2 (57519) - http://www.bohemiancoding.com/sketch -->
<svg width="496px" height="314px" viewBox="0 0 496 314" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>DatabasePoolScheduling</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="50%" y1="100%" x2="50%" y2="1.41638472e-14%" id="linearGradient-1">
<stop stop-color="#FFFFFF" stop-opacity="0.9" offset="0%"></stop>
<filter x="-19.5%" y="-26.9%" width="139.1%" height="153.8%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="3" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
<linearGradient x1="50%" y1="99.532889%" x2="50%" y2="1.11022302e-14%" id="linearGradient-2">
<stop stop-color="#FFFFFF" stop-opacity="0" offset="0%"></stop>
<stop stop-color="#FFFFFF" offset="100%"></stop>
</linearGradient>
<rect id="path-2" x="0" y="0" width="120" height="88" rx="10"></rect>
<filter x="-12.1%" y="-13.1%" width="124.2%" height="133.0%" filterUnits="objectBoundingBox" id="filter-4">
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
<feOffset dx="0" dy="3" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
<filter x="-19.5%" y="-12.4%" width="139.1%" height="124.7%" filterUnits="objectBoundingBox" id="filter-3">
<feOffset dx="0" dy="3" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
<rect id="path-5" x="0" y="0" width="120" height="250" rx="10"></rect>
<filter x="-12.1%" y="-4.6%" width="124.2%" height="111.6%" filterUnits="objectBoundingBox" id="filter-7">
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
<feOffset dx="0" dy="3" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
<linearGradient x1="50%" y1="99.532889%" x2="50%" y2="1.11022302e-14%" id="linearGradient-4">
<stop stop-color="#FFFFFF" stop-opacity="0" offset="0%"></stop>
<stop stop-color="#FFFFFF" offset="100%"></stop>
</linearGradient>
<filter x="-19.5%" y="-35.8%" width="139.1%" height="171.7%" filterUnits="objectBoundingBox" id="filter-5">
<feOffset dx="0" dy="3" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
<rect id="path-8" x="0" y="0" width="120" height="94" rx="10"></rect>
<filter x="-12.1%" y="-12.2%" width="124.2%" height="130.9%" filterUnits="objectBoundingBox" id="filter-10">
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
<feOffset dx="0" dy="3" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
<linearGradient x1="50%" y1="99.532889%" x2="50%" y2="1.11022302e-14%" id="linearGradient-6">
<stop stop-color="#FFFFFF" stop-opacity="0" offset="0%"></stop>
<stop stop-color="#FFFFFF" offset="100%"></stop>
</linearGradient>
<filter x="-19.5%" y="-53.8%" width="139.1%" height="207.5%" filterUnits="objectBoundingBox" id="filter-7">
<feOffset dx="0" dy="3" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
<rect id="path-11" x="0" y="0" width="120" height="44" rx="10"></rect>
<filter x="-12.1%" y="-26.1%" width="124.2%" height="165.9%" filterUnits="objectBoundingBox" id="filter-13">
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
<feOffset dx="0" dy="3" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
<linearGradient x1="50%" y1="99.532889%" x2="50%" y2="1.11022302e-14%" id="linearGradient-8">
<stop stop-color="#FFFFFF" stop-opacity="0" offset="0%"></stop>
<stop stop-color="#FFFFFF" offset="100%"></stop>
</linearGradient>
<filter x="-19.5%" y="-53.8%" width="139.1%" height="207.5%" filterUnits="objectBoundingBox" id="filter-9">
<feOffset dx="0" dy="3" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
<rect id="path-14" x="0" y="0" width="120" height="44" rx="10"></rect>
<filter x="-12.1%" y="-26.1%" width="124.2%" height="165.9%" filterUnits="objectBoundingBox" id="filter-16">
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
<feOffset dx="0" dy="3" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
<filter x="-19.5%" y="-53.8%" width="139.1%" height="207.5%" filterUnits="objectBoundingBox" id="filter-10">
<feOffset dx="0" dy="3" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
<rect id="path-17" x="0" y="0" width="120" height="44" rx="10"></rect>
<filter x="-12.1%" y="-26.1%" width="124.2%" height="165.9%" filterUnits="objectBoundingBox" id="filter-19">
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
<feOffset dx="0" dy="3" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
</defs>
<g id="Page-3" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="DatabasePoolScheduling">
<g id="Group-2" transform="translate(44.000000, 0.000000)" stroke="#D7D7D7">
<rect id="Rectangle-2" x="0.5" y="0.5" width="444" height="361" rx="6"></rect>
<rect id="Rectangle-2-Copy" fill-opacity="0.02" fill="#000000" x="148.5" y="0.5" width="148" height="361"></rect>
</g>
<text id="Thread-1" font-family="-apple-system,sans-serif" font-size="14" font-weight="normal" fill="#000000">
<tspan x="89.9428711" y="26">Thread 1</tspan>
</text>
<text id="Thread-2" font-family="-apple-system,sans-serif" font-size="14" font-weight="normal" fill="#000000">
<tspan x="236.979004" y="26">Thread 2</tspan>
</text>
<text id="Thread-3" font-family="-apple-system,sans-serif" font-size="14" font-weight="normal" fill="#000000">
<tspan x="384.818359" y="26">Thread 3</tspan>
</text>
<g id="BlueBox" transform="translate(58.000000, 44.000000)">
<g id="Group">
<mask id="mask-3" fill="white">
<use xlink:href="#path-2"></use>
</mask>
<g id="Rectangle">
<use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-2"></use>
<use fill="#005CC5" fill-rule="evenodd" xlink:href="#path-2"></use>
<rect stroke-opacity="0.25" stroke="#000000" stroke-width="1" fill="url(#linearGradient-1)" fill-rule="evenodd" x="-0.5" y="-0.5" width="121" height="89" rx="10"></rect>
</g>
<text id="Label" mask="url(#mask-3)" font-family="-apple-system,sans-serif" font-size="14" font-weight="500" fill="#000000">
<tspan x="15.7509766" y="49">Read State A</tspan>
</text>
<g id="DatabasePoolScheduling" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Threads">
<g transform="translate(46.000000, 0.000000)">
<rect id="Rectangle" fill="#FFFFFF" x="0" y="1" width="450" height="313"></rect>
<rect id="Rectangle" fill-opacity="0.02" fill="#000000" x="150" y="1" width="150" height="313"></rect>
<line x1="0.5" y1="0.357630979" x2="0.5" y2="313.642369" id="Line" stroke="#CCCCCC" stroke-linecap="square"></line>
<line x1="150.5" y1="0.357630979" x2="150.5" y2="313.642369" id="Line-Copy" stroke="#CCCCCC" stroke-linecap="square"></line>
<line x1="299.5" y1="0.357630979" x2="299.5" y2="313.642369" id="Line-Copy-2" stroke="#CCCCCC" stroke-linecap="square"></line>
<line x1="449.5" y1="0.357630979" x2="449.5" y2="313.642369" id="Line-Copy-3" stroke="#CCCCCC" stroke-linecap="square"></line>
<line x1="0.584415584" y1="0.5" x2="449.415584" y2="0.5" id="Line-2" stroke="#CCCCCC" stroke-linecap="square"></line>
<line x1="0.584415584" y1="313.5" x2="449.415584" y2="313.5" id="Line-3" stroke="#CCCCCC" stroke-linecap="square"></line>
<g id="Thread-1" transform="translate(47.748535, 10.705078)" fill="#000000" fill-rule="nonzero">
<polygon id="T" points="3.17871094 10.2949219 4.40917969 10.2949219 4.40917969 1.53808594 7.58789062 1.53808594 7.58789062 0.430664062 0 0.430664062 0 1.53808594 3.17871094 1.53808594"></polygon>
<path d="M9.25585938,10.2949219 L10.4453125,10.2949219 L10.4453125,5.93359375 C10.4453125,5.50065104 10.5239258,5.12923177 10.6811523,4.81933594 C10.8383789,4.5094401 11.0605469,4.27018229 11.3476562,4.1015625 C11.6347656,3.93294271 11.9742839,3.84863281 12.3662109,3.84863281 C12.9541016,3.84863281 13.3881836,4.00927734 13.668457,4.33056641 C13.9487305,4.65185547 14.0888672,5.14518229 14.0888672,5.81054688 L14.0888672,10.2949219 L15.2783203,10.2949219 L15.2783203,5.5234375 C15.2783203,4.94010417 15.1780599,4.44563802 14.9775391,4.04003906 C14.7770182,3.6344401 14.4853516,3.32568359 14.1025391,3.11376953 C13.7197266,2.90185547 13.2526042,2.79589844 12.7011719,2.79589844 C12.1588542,2.79589844 11.7122396,2.90413411 11.3613281,3.12060547 C11.0104167,3.33707682 10.7415365,3.64127604 10.5546875,4.03320312 L10.4453125,4.03320312 L10.4453125,0 L9.25585938,0 L9.25585938,10.2949219 Z" id="h"></path>
<path d="M17.2744141,10.2949219 L18.4638672,10.2949219 L18.4638672,5.72851562 C18.4638672,5.36848958 18.5470378,5.05403646 18.7133789,4.78515625 C18.8797201,4.51627604 19.108724,4.30664062 19.4003906,4.15625 C19.6920573,4.00585938 20.0270182,3.93066406 20.4052734,3.93066406 C20.5374349,3.93066406 20.6616211,3.93636068 20.777832,3.94775391 C20.894043,3.95914714 21.0136719,3.97623698 21.1367188,3.99902344 L21.1367188,2.84375 C21.077474,2.83463542 20.9920247,2.82438151 20.8803711,2.81298828 C20.7687174,2.80159505 20.6559245,2.79589844 20.5419922,2.79589844 C20.0452474,2.79589844 19.6282552,2.90299479 19.2910156,3.1171875 C18.953776,3.33138021 18.7145182,3.63216146 18.5732422,4.01953125 L18.4638672,4.01953125 L18.4638672,2.92578125 L17.2744141,2.92578125 L17.2744141,10.2949219 Z" id="r"></path>
<path d="M25.2587891,10.4248047 C25.6917318,10.4248047 26.0825195,10.3689779 26.4311523,10.2573242 C26.7797852,10.1456706 27.0817057,9.99527995 27.3369141,9.80615234 C27.5921224,9.61702474 27.8006185,9.40511068 27.9624023,9.17041016 C28.1241862,8.93570964 28.2369792,8.69303385 28.3007812,8.44238281 L28.3144531,8.38769531 L27.125,8.38769531 L27.0976562,8.44921875 C27.0338542,8.59505208 26.9222005,8.73860677 26.7626953,8.87988281 C26.6031901,9.02115885 26.4003906,9.13736979 26.1542969,9.22851562 C25.9082031,9.31966146 25.6188151,9.36523438 25.2861328,9.36523438 C24.8395182,9.36523438 24.4521484,9.26611328 24.1240234,9.06787109 C23.7958984,8.86962891 23.5429688,8.58479818 23.3652344,8.21337891 C23.1875,7.84195964 23.0986328,7.39420573 23.0986328,6.87011719 L23.0986328,6.3984375 C23.0986328,5.84700521 23.1897786,5.38216146 23.3720703,5.00390625 C23.554362,4.62565104 23.8015951,4.33968099 24.1137695,4.14599609 C24.425944,3.9523112 24.7802734,3.85546875 25.1767578,3.85546875 C25.5732422,3.85546875 25.9241536,3.94775391 26.2294922,4.13232422 C26.5348307,4.31689453 26.7740885,4.59602865 26.9472656,4.96972656 C27.1204427,5.34342448 27.2070312,5.81966146 27.2070312,6.3984375 L27.2070312,6.87011719 L27.7949219,6.00195312 L22.4970703,6.00195312 L22.4970703,6.95214844 L28.4033203,6.95214844 L28.4033203,6.48730469 C28.4033203,5.75358073 28.2745768,5.10986328 28.0170898,4.55615234 C27.7596029,4.00244141 27.3904622,3.57063802 26.909668,3.26074219 C26.4288737,2.95084635 25.8535156,2.79589844 25.1835938,2.79589844 C24.5182292,2.79589844 23.9371745,2.95768229 23.4404297,3.28125 C22.9436849,3.60481771 22.5597331,4.05371094 22.2885742,4.62792969 C22.0174154,5.20214844 21.8818359,5.86979167 21.8818359,6.63085938 L21.8818359,6.63769531 C21.8818359,7.4078776 22.0174154,8.07666016 22.2885742,8.64404297 C22.5597331,9.21142578 22.9471029,9.6500651 23.4506836,9.95996094 C23.9542643,10.2698568 24.5569661,10.4248047 25.2587891,10.4248047 Z" id="e"></path>
<path d="M32.1220703,10.4248047 C32.4547526,10.4248047 32.7600911,10.3780924 33.0380859,10.284668 C33.3160807,10.1912435 33.5655924,10.0533854 33.7866211,9.87109375 C34.0076497,9.68880208 34.195638,9.46777344 34.3505859,9.20800781 L34.4599609,9.20800781 L34.4599609,10.2949219 L35.6494141,10.2949219 L35.6494141,5.25 C35.6494141,4.73958333 35.5411784,4.30094401 35.324707,3.93408203 C35.1082357,3.56722005 34.7915039,3.28580729 34.3745117,3.08984375 C33.9575195,2.89388021 33.4482422,2.79589844 32.8466797,2.79589844 C32.3225911,2.79589844 31.8554688,2.87679036 31.4453125,3.03857422 C31.0351562,3.20035807 30.7013346,3.42594401 30.4438477,3.71533203 C30.1863607,4.00472005 30.0257161,4.34309896 29.9619141,4.73046875 L29.9550781,4.77148438 L31.1445312,4.77148438 L31.1513672,4.75097656 C31.2470703,4.46386719 31.4361979,4.24169922 31.71875,4.08447266 C32.0013021,3.92724609 32.3636068,3.84863281 32.8056641,3.84863281 C33.3570964,3.84863281 33.7706706,3.96826172 34.0463867,4.20751953 C34.3221029,4.44677734 34.4599609,4.79427083 34.4599609,5.25 L34.4599609,7.546875 C34.4599609,7.89778646 34.3699544,8.21223958 34.1899414,8.49023438 C34.0099284,8.76822917 33.7626953,8.98811849 33.4482422,9.14990234 C33.1337891,9.3116862 32.773763,9.39257812 32.3681641,9.39257812 C31.9397786,9.39257812 31.5843099,9.28889974 31.3017578,9.08154297 C31.0192057,8.8741862 30.8779297,8.58365885 30.8779297,8.20996094 L30.8779297,8.19628906 C30.8779297,7.83170573 31.0066732,7.54915365 31.2641602,7.34863281 C31.5216471,7.14811198 31.9306641,7.03190104 32.4912109,7 L35.0546875,6.8359375 L35.0546875,5.88574219 L32.3476562,6.04980469 C31.4908854,6.0999349 30.8289388,6.31070964 30.3618164,6.68212891 C29.894694,7.05354818 29.6611328,7.56738281 29.6611328,8.22363281 L29.6611328,8.23730469 C29.6611328,8.68391927 29.7693685,9.07128906 29.9858398,9.39941406 C30.2023112,9.72753906 30.4962565,9.98046875 30.8676758,10.1582031 C31.2390951,10.3359375 31.6572266,10.4248047 32.1220703,10.4248047 Z" id="a"></path>
<path d="M40.3935547,10.4248047 C40.9085286,10.4248047 41.3642578,10.3097331 41.7607422,10.0795898 C42.1572266,9.84944661 42.4671224,9.52929688 42.6904297,9.11914062 L42.7998047,9.11914062 L42.7998047,10.2949219 L43.9892578,10.2949219 L43.9892578,0 L42.7998047,0 L42.7998047,4.08789062 L42.6904297,4.08789062 C42.4899089,3.69596354 42.183431,3.38264974 41.7709961,3.14794922 C41.3585612,2.9132487 40.8994141,2.79589844 40.3935547,2.79589844 C39.7692057,2.79589844 39.2257487,2.953125 38.7631836,3.26757812 C38.3006185,3.58203125 37.9417318,4.02408854 37.6865234,4.59375 C37.4313151,5.16341146 37.3037109,5.83333333 37.3037109,6.60351562 L37.3037109,6.6171875 C37.3037109,7.3828125 37.4313151,8.05159505 37.6865234,8.62353516 C37.9417318,9.19547526 38.3017578,9.63867188 38.7666016,9.953125 C39.2314453,10.2675781 39.773763,10.4248047 40.3935547,10.4248047 Z M40.6669922,9.37207031 C40.2203776,9.37207031 39.8364258,9.26155599 39.5151367,9.04052734 C39.1938477,8.8194987 38.9477539,8.50276693 38.7768555,8.09033203 C38.605957,7.67789714 38.5205078,7.18684896 38.5205078,6.6171875 L38.5205078,6.60351562 C38.5205078,6.02929688 38.605957,5.53710938 38.7768555,5.12695312 C38.9477539,4.71679688 39.1938477,4.40120443 39.5151367,4.18017578 C39.8364258,3.95914714 40.2203776,3.84863281 40.6669922,3.84863281 C41.1136068,3.84863281 41.4986979,3.96028646 41.8222656,4.18359375 C42.1458333,4.40690104 42.3942057,4.72363281 42.5673828,5.13378906 C42.7405599,5.54394531 42.8271484,6.03385417 42.8271484,6.60351562 L42.8271484,6.6171875 C42.8271484,7.18229167 42.7405599,7.6710612 42.5673828,8.08349609 C42.3942057,8.49593099 42.1458333,8.81380208 41.8222656,9.03710938 C41.4986979,9.26041667 41.1136068,9.37207031 40.6669922,9.37207031 Z" id="d"></path>
<polygon id="1" points="52.3154297 10.2949219 53.5458984 10.2949219 53.5458984 0.430664062 52.3222656 0.430664062 49.6972656 2.31738281 49.6972656 3.61621094 52.2060547 1.79785156 52.3154297 1.79785156"></polygon>
</g>
<g id="Thread-2" transform="translate(196.770996, 10.705078)" fill="#000000" fill-rule="nonzero">
<polygon id="T" points="3.17871094 10.2949219 4.40917969 10.2949219 4.40917969 1.53808594 7.58789062 1.53808594 7.58789062 0.430664062 0 0.430664062 0 1.53808594 3.17871094 1.53808594"></polygon>
<path d="M9.25585938,10.2949219 L10.4453125,10.2949219 L10.4453125,5.93359375 C10.4453125,5.50065104 10.5239258,5.12923177 10.6811523,4.81933594 C10.8383789,4.5094401 11.0605469,4.27018229 11.3476562,4.1015625 C11.6347656,3.93294271 11.9742839,3.84863281 12.3662109,3.84863281 C12.9541016,3.84863281 13.3881836,4.00927734 13.668457,4.33056641 C13.9487305,4.65185547 14.0888672,5.14518229 14.0888672,5.81054688 L14.0888672,10.2949219 L15.2783203,10.2949219 L15.2783203,5.5234375 C15.2783203,4.94010417 15.1780599,4.44563802 14.9775391,4.04003906 C14.7770182,3.6344401 14.4853516,3.32568359 14.1025391,3.11376953 C13.7197266,2.90185547 13.2526042,2.79589844 12.7011719,2.79589844 C12.1588542,2.79589844 11.7122396,2.90413411 11.3613281,3.12060547 C11.0104167,3.33707682 10.7415365,3.64127604 10.5546875,4.03320312 L10.4453125,4.03320312 L10.4453125,0 L9.25585938,0 L9.25585938,10.2949219 Z" id="h"></path>
<path d="M17.2744141,10.2949219 L18.4638672,10.2949219 L18.4638672,5.72851562 C18.4638672,5.36848958 18.5470378,5.05403646 18.7133789,4.78515625 C18.8797201,4.51627604 19.108724,4.30664062 19.4003906,4.15625 C19.6920573,4.00585938 20.0270182,3.93066406 20.4052734,3.93066406 C20.5374349,3.93066406 20.6616211,3.93636068 20.777832,3.94775391 C20.894043,3.95914714 21.0136719,3.97623698 21.1367188,3.99902344 L21.1367188,2.84375 C21.077474,2.83463542 20.9920247,2.82438151 20.8803711,2.81298828 C20.7687174,2.80159505 20.6559245,2.79589844 20.5419922,2.79589844 C20.0452474,2.79589844 19.6282552,2.90299479 19.2910156,3.1171875 C18.953776,3.33138021 18.7145182,3.63216146 18.5732422,4.01953125 L18.4638672,4.01953125 L18.4638672,2.92578125 L17.2744141,2.92578125 L17.2744141,10.2949219 Z" id="r"></path>
<path d="M25.2587891,10.4248047 C25.6917318,10.4248047 26.0825195,10.3689779 26.4311523,10.2573242 C26.7797852,10.1456706 27.0817057,9.99527995 27.3369141,9.80615234 C27.5921224,9.61702474 27.8006185,9.40511068 27.9624023,9.17041016 C28.1241862,8.93570964 28.2369792,8.69303385 28.3007812,8.44238281 L28.3144531,8.38769531 L27.125,8.38769531 L27.0976562,8.44921875 C27.0338542,8.59505208 26.9222005,8.73860677 26.7626953,8.87988281 C26.6031901,9.02115885 26.4003906,9.13736979 26.1542969,9.22851562 C25.9082031,9.31966146 25.6188151,9.36523438 25.2861328,9.36523438 C24.8395182,9.36523438 24.4521484,9.26611328 24.1240234,9.06787109 C23.7958984,8.86962891 23.5429688,8.58479818 23.3652344,8.21337891 C23.1875,7.84195964 23.0986328,7.39420573 23.0986328,6.87011719 L23.0986328,6.3984375 C23.0986328,5.84700521 23.1897786,5.38216146 23.3720703,5.00390625 C23.554362,4.62565104 23.8015951,4.33968099 24.1137695,4.14599609 C24.425944,3.9523112 24.7802734,3.85546875 25.1767578,3.85546875 C25.5732422,3.85546875 25.9241536,3.94775391 26.2294922,4.13232422 C26.5348307,4.31689453 26.7740885,4.59602865 26.9472656,4.96972656 C27.1204427,5.34342448 27.2070312,5.81966146 27.2070312,6.3984375 L27.2070312,6.87011719 L27.7949219,6.00195312 L22.4970703,6.00195312 L22.4970703,6.95214844 L28.4033203,6.95214844 L28.4033203,6.48730469 C28.4033203,5.75358073 28.2745768,5.10986328 28.0170898,4.55615234 C27.7596029,4.00244141 27.3904622,3.57063802 26.909668,3.26074219 C26.4288737,2.95084635 25.8535156,2.79589844 25.1835938,2.79589844 C24.5182292,2.79589844 23.9371745,2.95768229 23.4404297,3.28125 C22.9436849,3.60481771 22.5597331,4.05371094 22.2885742,4.62792969 C22.0174154,5.20214844 21.8818359,5.86979167 21.8818359,6.63085938 L21.8818359,6.63769531 C21.8818359,7.4078776 22.0174154,8.07666016 22.2885742,8.64404297 C22.5597331,9.21142578 22.9471029,9.6500651 23.4506836,9.95996094 C23.9542643,10.2698568 24.5569661,10.4248047 25.2587891,10.4248047 Z" id="e"></path>
<path d="M32.1220703,10.4248047 C32.4547526,10.4248047 32.7600911,10.3780924 33.0380859,10.284668 C33.3160807,10.1912435 33.5655924,10.0533854 33.7866211,9.87109375 C34.0076497,9.68880208 34.195638,9.46777344 34.3505859,9.20800781 L34.4599609,9.20800781 L34.4599609,10.2949219 L35.6494141,10.2949219 L35.6494141,5.25 C35.6494141,4.73958333 35.5411784,4.30094401 35.324707,3.93408203 C35.1082357,3.56722005 34.7915039,3.28580729 34.3745117,3.08984375 C33.9575195,2.89388021 33.4482422,2.79589844 32.8466797,2.79589844 C32.3225911,2.79589844 31.8554688,2.87679036 31.4453125,3.03857422 C31.0351562,3.20035807 30.7013346,3.42594401 30.4438477,3.71533203 C30.1863607,4.00472005 30.0257161,4.34309896 29.9619141,4.73046875 L29.9550781,4.77148438 L31.1445312,4.77148438 L31.1513672,4.75097656 C31.2470703,4.46386719 31.4361979,4.24169922 31.71875,4.08447266 C32.0013021,3.92724609 32.3636068,3.84863281 32.8056641,3.84863281 C33.3570964,3.84863281 33.7706706,3.96826172 34.0463867,4.20751953 C34.3221029,4.44677734 34.4599609,4.79427083 34.4599609,5.25 L34.4599609,7.546875 C34.4599609,7.89778646 34.3699544,8.21223958 34.1899414,8.49023438 C34.0099284,8.76822917 33.7626953,8.98811849 33.4482422,9.14990234 C33.1337891,9.3116862 32.773763,9.39257812 32.3681641,9.39257812 C31.9397786,9.39257812 31.5843099,9.28889974 31.3017578,9.08154297 C31.0192057,8.8741862 30.8779297,8.58365885 30.8779297,8.20996094 L30.8779297,8.19628906 C30.8779297,7.83170573 31.0066732,7.54915365 31.2641602,7.34863281 C31.5216471,7.14811198 31.9306641,7.03190104 32.4912109,7 L35.0546875,6.8359375 L35.0546875,5.88574219 L32.3476562,6.04980469 C31.4908854,6.0999349 30.8289388,6.31070964 30.3618164,6.68212891 C29.894694,7.05354818 29.6611328,7.56738281 29.6611328,8.22363281 L29.6611328,8.23730469 C29.6611328,8.68391927 29.7693685,9.07128906 29.9858398,9.39941406 C30.2023112,9.72753906 30.4962565,9.98046875 30.8676758,10.1582031 C31.2390951,10.3359375 31.6572266,10.4248047 32.1220703,10.4248047 Z" id="a"></path>
<path d="M40.3935547,10.4248047 C40.9085286,10.4248047 41.3642578,10.3097331 41.7607422,10.0795898 C42.1572266,9.84944661 42.4671224,9.52929688 42.6904297,9.11914062 L42.7998047,9.11914062 L42.7998047,10.2949219 L43.9892578,10.2949219 L43.9892578,0 L42.7998047,0 L42.7998047,4.08789062 L42.6904297,4.08789062 C42.4899089,3.69596354 42.183431,3.38264974 41.7709961,3.14794922 C41.3585612,2.9132487 40.8994141,2.79589844 40.3935547,2.79589844 C39.7692057,2.79589844 39.2257487,2.953125 38.7631836,3.26757812 C38.3006185,3.58203125 37.9417318,4.02408854 37.6865234,4.59375 C37.4313151,5.16341146 37.3037109,5.83333333 37.3037109,6.60351562 L37.3037109,6.6171875 C37.3037109,7.3828125 37.4313151,8.05159505 37.6865234,8.62353516 C37.9417318,9.19547526 38.3017578,9.63867188 38.7666016,9.953125 C39.2314453,10.2675781 39.773763,10.4248047 40.3935547,10.4248047 Z M40.6669922,9.37207031 C40.2203776,9.37207031 39.8364258,9.26155599 39.5151367,9.04052734 C39.1938477,8.8194987 38.9477539,8.50276693 38.7768555,8.09033203 C38.605957,7.67789714 38.5205078,7.18684896 38.5205078,6.6171875 L38.5205078,6.60351562 C38.5205078,6.02929688 38.605957,5.53710938 38.7768555,5.12695312 C38.9477539,4.71679688 39.1938477,4.40120443 39.5151367,4.18017578 C39.8364258,3.95914714 40.2203776,3.84863281 40.6669922,3.84863281 C41.1136068,3.84863281 41.4986979,3.96028646 41.8222656,4.18359375 C42.1458333,4.40690104 42.3942057,4.72363281 42.5673828,5.13378906 C42.7405599,5.54394531 42.8271484,6.03385417 42.8271484,6.60351562 L42.8271484,6.6171875 C42.8271484,7.18229167 42.7405599,7.6710612 42.5673828,8.08349609 C42.3942057,8.49593099 42.1458333,8.81380208 41.8222656,9.03710938 C41.4986979,9.26041667 41.1136068,9.37207031 40.6669922,9.37207031 Z" id="d"></path>
<path d="M49.9023438,10.2949219 L56.2871094,10.2949219 L56.2871094,9.1875 L51.3105469,9.1875 L51.6113281,9.39257812 L51.6113281,8.82519531 L51.3037109,9.39257812 L53.8535156,6.76074219 C54.4505208,6.14550781 54.9130859,5.62711589 55.2412109,5.20556641 C55.5693359,4.78401693 55.7983398,4.4000651 55.9282227,4.05371094 C56.0581055,3.70735677 56.1230469,3.34733073 56.1230469,2.97363281 L56.1230469,2.95996094 C56.1230469,2.42675781 55.9897461,1.95279948 55.7231445,1.53808594 C55.456543,1.1233724 55.093099,0.796386719 54.6328125,0.557128906 C54.172526,0.317871094 53.6552734,0.198242188 53.0810547,0.198242188 C52.4521484,0.198242188 51.8938802,0.326985677 51.40625,0.584472656 C50.9186198,0.841959635 50.5358073,1.19742839 50.2578125,1.65087891 C49.9798177,2.10432943 49.8385417,2.62272135 49.8339844,3.20605469 L49.8476562,3.21289062 L51.0234375,3.21972656 L51.0302734,3.20605469 C51.0302734,2.8186849 51.1123047,2.48030599 51.2763672,2.19091797 C51.4404297,1.90152995 51.6705729,1.67594401 51.9667969,1.51416016 C52.2630208,1.3523763 52.6070964,1.27148438 52.9990234,1.27148438 C53.3863932,1.27148438 53.7190755,1.35123698 53.9970703,1.51074219 C54.2750651,1.6702474 54.4892578,1.88671875 54.6396484,2.16015625 C54.7900391,2.43359375 54.8652344,2.74348958 54.8652344,3.08984375 L54.8652344,3.10351562 C54.8652344,3.390625 54.8173828,3.65494792 54.7216797,3.89648438 C54.6259766,4.13802083 54.4596354,4.40804036 54.2226562,4.70654297 C53.9856771,5.00504557 53.6575521,5.38216146 53.2382812,5.83789062 L49.9023438,9.44726562 L49.9023438,10.2949219 Z" id="2"></path>
</g>
<g id="Thread-3" transform="translate(346.606934, 10.705078)" fill="#000000" fill-rule="nonzero">
<polygon id="T" points="3.17871094 10.2949219 4.40917969 10.2949219 4.40917969 1.53808594 7.58789062 1.53808594 7.58789062 0.430664062 0 0.430664062 0 1.53808594 3.17871094 1.53808594"></polygon>
<path d="M9.25585938,10.2949219 L10.4453125,10.2949219 L10.4453125,5.93359375 C10.4453125,5.50065104 10.5239258,5.12923177 10.6811523,4.81933594 C10.8383789,4.5094401 11.0605469,4.27018229 11.3476562,4.1015625 C11.6347656,3.93294271 11.9742839,3.84863281 12.3662109,3.84863281 C12.9541016,3.84863281 13.3881836,4.00927734 13.668457,4.33056641 C13.9487305,4.65185547 14.0888672,5.14518229 14.0888672,5.81054688 L14.0888672,10.2949219 L15.2783203,10.2949219 L15.2783203,5.5234375 C15.2783203,4.94010417 15.1780599,4.44563802 14.9775391,4.04003906 C14.7770182,3.6344401 14.4853516,3.32568359 14.1025391,3.11376953 C13.7197266,2.90185547 13.2526042,2.79589844 12.7011719,2.79589844 C12.1588542,2.79589844 11.7122396,2.90413411 11.3613281,3.12060547 C11.0104167,3.33707682 10.7415365,3.64127604 10.5546875,4.03320312 L10.4453125,4.03320312 L10.4453125,0 L9.25585938,0 L9.25585938,10.2949219 Z" id="h"></path>
<path d="M17.2744141,10.2949219 L18.4638672,10.2949219 L18.4638672,5.72851562 C18.4638672,5.36848958 18.5470378,5.05403646 18.7133789,4.78515625 C18.8797201,4.51627604 19.108724,4.30664062 19.4003906,4.15625 C19.6920573,4.00585938 20.0270182,3.93066406 20.4052734,3.93066406 C20.5374349,3.93066406 20.6616211,3.93636068 20.777832,3.94775391 C20.894043,3.95914714 21.0136719,3.97623698 21.1367188,3.99902344 L21.1367188,2.84375 C21.077474,2.83463542 20.9920247,2.82438151 20.8803711,2.81298828 C20.7687174,2.80159505 20.6559245,2.79589844 20.5419922,2.79589844 C20.0452474,2.79589844 19.6282552,2.90299479 19.2910156,3.1171875 C18.953776,3.33138021 18.7145182,3.63216146 18.5732422,4.01953125 L18.4638672,4.01953125 L18.4638672,2.92578125 L17.2744141,2.92578125 L17.2744141,10.2949219 Z" id="r"></path>
<path d="M25.2587891,10.4248047 C25.6917318,10.4248047 26.0825195,10.3689779 26.4311523,10.2573242 C26.7797852,10.1456706 27.0817057,9.99527995 27.3369141,9.80615234 C27.5921224,9.61702474 27.8006185,9.40511068 27.9624023,9.17041016 C28.1241862,8.93570964 28.2369792,8.69303385 28.3007812,8.44238281 L28.3144531,8.38769531 L27.125,8.38769531 L27.0976562,8.44921875 C27.0338542,8.59505208 26.9222005,8.73860677 26.7626953,8.87988281 C26.6031901,9.02115885 26.4003906,9.13736979 26.1542969,9.22851562 C25.9082031,9.31966146 25.6188151,9.36523438 25.2861328,9.36523438 C24.8395182,9.36523438 24.4521484,9.26611328 24.1240234,9.06787109 C23.7958984,8.86962891 23.5429688,8.58479818 23.3652344,8.21337891 C23.1875,7.84195964 23.0986328,7.39420573 23.0986328,6.87011719 L23.0986328,6.3984375 C23.0986328,5.84700521 23.1897786,5.38216146 23.3720703,5.00390625 C23.554362,4.62565104 23.8015951,4.33968099 24.1137695,4.14599609 C24.425944,3.9523112 24.7802734,3.85546875 25.1767578,3.85546875 C25.5732422,3.85546875 25.9241536,3.94775391 26.2294922,4.13232422 C26.5348307,4.31689453 26.7740885,4.59602865 26.9472656,4.96972656 C27.1204427,5.34342448 27.2070312,5.81966146 27.2070312,6.3984375 L27.2070312,6.87011719 L27.7949219,6.00195312 L22.4970703,6.00195312 L22.4970703,6.95214844 L28.4033203,6.95214844 L28.4033203,6.48730469 C28.4033203,5.75358073 28.2745768,5.10986328 28.0170898,4.55615234 C27.7596029,4.00244141 27.3904622,3.57063802 26.909668,3.26074219 C26.4288737,2.95084635 25.8535156,2.79589844 25.1835938,2.79589844 C24.5182292,2.79589844 23.9371745,2.95768229 23.4404297,3.28125 C22.9436849,3.60481771 22.5597331,4.05371094 22.2885742,4.62792969 C22.0174154,5.20214844 21.8818359,5.86979167 21.8818359,6.63085938 L21.8818359,6.63769531 C21.8818359,7.4078776 22.0174154,8.07666016 22.2885742,8.64404297 C22.5597331,9.21142578 22.9471029,9.6500651 23.4506836,9.95996094 C23.9542643,10.2698568 24.5569661,10.4248047 25.2587891,10.4248047 Z" id="e"></path>
<path d="M32.1220703,10.4248047 C32.4547526,10.4248047 32.7600911,10.3780924 33.0380859,10.284668 C33.3160807,10.1912435 33.5655924,10.0533854 33.7866211,9.87109375 C34.0076497,9.68880208 34.195638,9.46777344 34.3505859,9.20800781 L34.4599609,9.20800781 L34.4599609,10.2949219 L35.6494141,10.2949219 L35.6494141,5.25 C35.6494141,4.73958333 35.5411784,4.30094401 35.324707,3.93408203 C35.1082357,3.56722005 34.7915039,3.28580729 34.3745117,3.08984375 C33.9575195,2.89388021 33.4482422,2.79589844 32.8466797,2.79589844 C32.3225911,2.79589844 31.8554688,2.87679036 31.4453125,3.03857422 C31.0351562,3.20035807 30.7013346,3.42594401 30.4438477,3.71533203 C30.1863607,4.00472005 30.0257161,4.34309896 29.9619141,4.73046875 L29.9550781,4.77148438 L31.1445312,4.77148438 L31.1513672,4.75097656 C31.2470703,4.46386719 31.4361979,4.24169922 31.71875,4.08447266 C32.0013021,3.92724609 32.3636068,3.84863281 32.8056641,3.84863281 C33.3570964,3.84863281 33.7706706,3.96826172 34.0463867,4.20751953 C34.3221029,4.44677734 34.4599609,4.79427083 34.4599609,5.25 L34.4599609,7.546875 C34.4599609,7.89778646 34.3699544,8.21223958 34.1899414,8.49023438 C34.0099284,8.76822917 33.7626953,8.98811849 33.4482422,9.14990234 C33.1337891,9.3116862 32.773763,9.39257812 32.3681641,9.39257812 C31.9397786,9.39257812 31.5843099,9.28889974 31.3017578,9.08154297 C31.0192057,8.8741862 30.8779297,8.58365885 30.8779297,8.20996094 L30.8779297,8.19628906 C30.8779297,7.83170573 31.0066732,7.54915365 31.2641602,7.34863281 C31.5216471,7.14811198 31.9306641,7.03190104 32.4912109,7 L35.0546875,6.8359375 L35.0546875,5.88574219 L32.3476562,6.04980469 C31.4908854,6.0999349 30.8289388,6.31070964 30.3618164,6.68212891 C29.894694,7.05354818 29.6611328,7.56738281 29.6611328,8.22363281 L29.6611328,8.23730469 C29.6611328,8.68391927 29.7693685,9.07128906 29.9858398,9.39941406 C30.2023112,9.72753906 30.4962565,9.98046875 30.8676758,10.1582031 C31.2390951,10.3359375 31.6572266,10.4248047 32.1220703,10.4248047 Z" id="a"></path>
<path d="M40.3935547,10.4248047 C40.9085286,10.4248047 41.3642578,10.3097331 41.7607422,10.0795898 C42.1572266,9.84944661 42.4671224,9.52929688 42.6904297,9.11914062 L42.7998047,9.11914062 L42.7998047,10.2949219 L43.9892578,10.2949219 L43.9892578,0 L42.7998047,0 L42.7998047,4.08789062 L42.6904297,4.08789062 C42.4899089,3.69596354 42.183431,3.38264974 41.7709961,3.14794922 C41.3585612,2.9132487 40.8994141,2.79589844 40.3935547,2.79589844 C39.7692057,2.79589844 39.2257487,2.953125 38.7631836,3.26757812 C38.3006185,3.58203125 37.9417318,4.02408854 37.6865234,4.59375 C37.4313151,5.16341146 37.3037109,5.83333333 37.3037109,6.60351562 L37.3037109,6.6171875 C37.3037109,7.3828125 37.4313151,8.05159505 37.6865234,8.62353516 C37.9417318,9.19547526 38.3017578,9.63867188 38.7666016,9.953125 C39.2314453,10.2675781 39.773763,10.4248047 40.3935547,10.4248047 Z M40.6669922,9.37207031 C40.2203776,9.37207031 39.8364258,9.26155599 39.5151367,9.04052734 C39.1938477,8.8194987 38.9477539,8.50276693 38.7768555,8.09033203 C38.605957,7.67789714 38.5205078,7.18684896 38.5205078,6.6171875 L38.5205078,6.60351562 C38.5205078,6.02929688 38.605957,5.53710938 38.7768555,5.12695312 C38.9477539,4.71679688 39.1938477,4.40120443 39.5151367,4.18017578 C39.8364258,3.95914714 40.2203776,3.84863281 40.6669922,3.84863281 C41.1136068,3.84863281 41.4986979,3.96028646 41.8222656,4.18359375 C42.1458333,4.40690104 42.3942057,4.72363281 42.5673828,5.13378906 C42.7405599,5.54394531 42.8271484,6.03385417 42.8271484,6.60351562 L42.8271484,6.6171875 C42.8271484,7.18229167 42.7405599,7.6710612 42.5673828,8.08349609 C42.3942057,8.49593099 42.1458333,8.81380208 41.8222656,9.03710938 C41.4986979,9.26041667 41.1136068,9.37207031 40.6669922,9.37207031 Z" id="d"></path>
<path d="M53.2587891,10.4589844 C53.9195964,10.4589844 54.507487,10.3347982 55.0224609,10.0864258 C55.5374349,9.83805339 55.9430339,9.49739583 56.2392578,9.06445312 C56.5354818,8.63151042 56.6835938,8.14160156 56.6835938,7.59472656 L56.6835938,7.58105469 C56.6835938,6.87923177 56.4614258,6.31526693 56.0170898,5.88916016 C55.5727539,5.46305339 54.9905599,5.2203776 54.2705078,5.16113281 L54.2705078,5.13378906 C54.6806641,5.04720052 55.0429688,4.89908854 55.3574219,4.68945312 C55.671875,4.47981771 55.9179688,4.21777344 56.0957031,3.90332031 C56.2734375,3.58886719 56.3623047,3.22884115 56.3623047,2.82324219 L56.3623047,2.80957031 C56.3623047,2.30826823 56.2335612,1.86735026 55.9760742,1.48681641 C55.7185872,1.10628255 55.3562826,0.807779948 54.8891602,0.591308594 C54.4220378,0.37483724 53.8740234,0.266601562 53.2451172,0.266601562 C52.6298828,0.266601562 52.0864258,0.378255208 51.6147461,0.6015625 C51.1430664,0.824869792 50.7648112,1.13704427 50.4799805,1.53808594 C50.1951497,1.9391276 50.0253906,2.40852865 49.9707031,2.94628906 L49.9638672,3.01464844 L51.1464844,3.01464844 L51.1533203,2.94628906 C51.1897786,2.61360677 51.2991536,2.3264974 51.4814453,2.08496094 C51.663737,1.84342448 51.9064128,1.65771484 52.2094727,1.52783203 C52.5125326,1.39794922 52.8577474,1.33300781 53.2451172,1.33300781 C53.6461589,1.33300781 53.9868164,1.3968099 54.2670898,1.52441406 C54.5473633,1.65201823 54.7604167,1.83658854 54.90625,2.078125 C55.0520833,2.31966146 55.125,2.61360677 55.125,2.95996094 L55.125,2.97363281 C55.125,3.30175781 55.0406901,3.5945638 54.8720703,3.85205078 C54.7034505,4.10953776 54.46875,4.31233724 54.1679688,4.46044922 C53.8671875,4.6085612 53.5208333,4.68261719 53.1289062,4.68261719 L51.9462891,4.68261719 L51.9462891,5.72167969 L53.1835938,5.72167969 C53.8763021,5.72167969 54.4243164,5.88460286 54.8276367,6.21044922 C55.230957,6.53629557 55.4326172,7.00227865 55.4326172,7.60839844 L55.4326172,7.62207031 C55.4326172,7.96842448 55.3414714,8.27490234 55.1591797,8.54150391 C54.976888,8.80810547 54.722819,9.01660156 54.3969727,9.16699219 C54.0711263,9.31738281 53.6917318,9.39257812 53.2587891,9.39257812 C52.6025391,9.39257812 52.0670573,9.23990885 51.6523438,8.93457031 C51.2376302,8.62923177 51.0052083,8.23502604 50.9550781,7.75195312 L50.9482422,7.68359375 L49.765625,7.68359375 L49.7724609,7.765625 C49.8180339,8.28515625 49.987793,8.74772135 50.2817383,9.15332031 C50.5756836,9.55891927 50.9755859,9.87792969 51.4814453,10.1103516 C51.9873047,10.3427734 52.5797526,10.4589844 53.2587891,10.4589844 Z" id="3"></path>
</g>
</g>
<g id="BlueBox" transform="translate(355.000000, 94.000000)">
<g id="Group">
<mask id="mask-6" fill="white">
<use xlink:href="#path-5"></use>
</mask>
<g id="Rectangle">
<use fill="black" fill-opacity="1" filter="url(#filter-7)" xlink:href="#path-5"></use>
<use fill="#005CC5" fill-rule="evenodd" xlink:href="#path-5"></use>
<rect stroke-opacity="0.25" stroke="#000000" stroke-width="1" fill="url(#linearGradient-1)" fill-rule="evenodd" x="-0.5" y="-0.5" width="121" height="251" rx="10"></rect>
</g>
<text id="Label" mask="url(#mask-6)" font-family="-apple-system,sans-serif" font-size="14" font-weight="500" fill="#000000">
<tspan x="15.7509766" y="130">Read State A</tspan>
</text>
<g id="Time" fill="#000000" fill-rule="nonzero">
<g transform="translate(7.755859, 10.568359)">
<polygon id="T" points="3.17871094 10.4316406 4.40917969 10.4316406 4.40917969 1.67480469 7.58789062 1.67480469 7.58789062 0.567382812 0 0.567382812 0 1.67480469 3.17871094 1.67480469"></polygon>
<path d="M9.078125,10.4316406 L10.2675781,10.4316406 L10.2675781,3.0625 L9.078125,3.0625 L9.078125,10.4316406 Z M9.6796875,1.640625 C9.90755208,1.640625 10.101237,1.55973307 10.2607422,1.39794922 C10.4202474,1.23616536 10.5,1.04361979 10.5,0.8203125 C10.5,0.592447917 10.4202474,0.398763021 10.2607422,0.239257813 C10.101237,0.0797526042 9.90755208,0 9.6796875,0 C9.45638021,0 9.26383464,0.0797526042 9.10205078,0.239257813 C8.94026693,0.398763021 8.859375,0.592447917 8.859375,0.8203125 C8.859375,1.04361979 8.94026693,1.23616536 9.10205078,1.39794922 C9.26383464,1.55973307 9.45638021,1.640625 9.6796875,1.640625 Z" id="i"></path>
<path d="M12.359375,10.4316406 L13.5488281,10.4316406 L13.5488281,5.86523438 C13.5488281,5.51888021 13.6228841,5.20328776 13.7709961,4.91845703 C13.9191081,4.6336263 14.1219076,4.40690104 14.3793945,4.23828125 C14.6368815,4.06966146 14.9251302,3.98535156 15.2441406,3.98535156 C15.7089844,3.98535156 16.0804036,4.1163737 16.3583984,4.37841797 C16.6363932,4.64046224 16.7753906,4.99023438 16.7753906,5.42773438 L16.7753906,10.4316406 L17.9648438,10.4316406 L17.9648438,5.69433594 C17.9648438,5.37988281 18.0354818,5.09391276 18.1767578,4.83642578 C18.3180339,4.5789388 18.516276,4.37272135 18.7714844,4.21777344 C19.0266927,4.06282552 19.3251953,3.98535156 19.6669922,3.98535156 C20.1865234,3.98535156 20.5727539,4.12093099 20.8256836,4.39208984 C21.0786133,4.6632487 21.2050781,5.06998698 21.2050781,5.61230469 L21.2050781,10.4316406 L22.3945312,10.4316406 L22.3945312,5.33886719 C22.3945312,4.82389323 22.3033854,4.38753255 22.1210938,4.02978516 C21.9388021,3.67203776 21.6733398,3.39973958 21.324707,3.21289062 C20.9760742,3.02604167 20.5511068,2.93261719 20.0498047,2.93261719 C19.7125651,2.93261719 19.3969727,2.98616536 19.1030273,3.09326172 C18.809082,3.20035807 18.5504557,3.3507487 18.3271484,3.54443359 C18.1038411,3.73811849 17.9261068,3.96484375 17.7939453,4.22460938 L17.6845703,4.22460938 C17.570638,3.96940104 17.4179688,3.74495443 17.2265625,3.55126953 C17.0351562,3.35758464 16.8072917,3.20605469 16.5429688,3.09667969 C16.2786458,2.98730469 15.9801432,2.93261719 15.6474609,2.93261719 C15.164388,2.93261719 14.7530924,3.04199219 14.4135742,3.26074219 C14.074056,3.47949219 13.8222656,3.78710938 13.6582031,4.18359375 L13.5488281,4.18359375 L13.5488281,3.0625 L12.359375,3.0625 L12.359375,10.4316406 Z" id="m"></path>
<path d="M27.3984375,10.5615234 C27.8313802,10.5615234 28.222168,10.5056966 28.5708008,10.394043 C28.9194336,10.2823893 29.2213542,10.1319987 29.4765625,9.94287109 C29.7317708,9.75374349 29.9402669,9.54182943 30.1020508,9.30712891 C30.2638346,9.07242839 30.3766276,8.8297526 30.4404297,8.57910156 L30.4541016,8.52441406 L29.2646484,8.52441406 L29.2373047,8.5859375 C29.1735026,8.73177083 29.061849,8.87532552 28.9023438,9.01660156 C28.7428385,9.1578776 28.5400391,9.27408854 28.2939453,9.36523438 C28.0478516,9.45638021 27.7584635,9.50195312 27.4257812,9.50195312 C26.9791667,9.50195312 26.5917969,9.40283203 26.2636719,9.20458984 C25.9355469,9.00634766 25.6826172,8.72151693 25.5048828,8.35009766 C25.3271484,7.97867839 25.2382812,7.53092448 25.2382812,7.00683594 L25.2382812,6.53515625 C25.2382812,5.98372396 25.3294271,5.51888021 25.5117188,5.140625 C25.6940104,4.76236979 25.9412435,4.47639974 26.253418,4.28271484 C26.5655924,4.08902995 26.9199219,3.9921875 27.3164062,3.9921875 C27.7128906,3.9921875 28.0638021,4.08447266 28.3691406,4.26904297 C28.6744792,4.45361328 28.913737,4.7327474 29.0869141,5.10644531 C29.2600911,5.48014323 29.3466797,5.95638021 29.3466797,6.53515625 L29.3466797,7.00683594 L29.9345703,6.13867188 L24.6367188,6.13867188 L24.6367188,7.08886719 L30.5429688,7.08886719 L30.5429688,6.62402344 C30.5429688,5.89029948 30.4142253,5.24658203 30.1567383,4.69287109 C29.8992513,4.13916016 29.5301107,3.70735677 29.0493164,3.39746094 C28.5685221,3.0875651 27.9931641,2.93261719 27.3232422,2.93261719 C26.6578776,2.93261719 26.0768229,3.09440104 25.5800781,3.41796875 C25.0833333,3.74153646 24.6993815,4.19042969 24.4282227,4.76464844 C24.1570638,5.33886719 24.0214844,6.00651042 24.0214844,6.76757812 L24.0214844,6.77441406 C24.0214844,7.54459635 24.1570638,8.21337891 24.4282227,8.78076172 C24.6993815,9.34814453 25.0867513,9.78678385 25.590332,10.0966797 C26.0939128,10.4065755 26.6966146,10.5615234 27.3984375,10.5615234 Z" id="e"></path>
</g>
<path id="Line-4" d="M22.998218,32.9232757 L22.9999968,33.4232725 L23.969,306.003 L27.9697313,305.98973 L23.5017788,315.005683 L18.9697882,306.021749 L22.969,306.007 L22.0000032,33.4268302 L21.9982243,32.9268334 L22.998218,32.9232757 Z"></path>
</g>
</g>
<g id="Read-A" transform="translate(66.000000, 50.000000)">
<g id="Background" filter="url(#filter-1)" fill="#D7E6F7">
<g id="RectangleBackground">
<rect id="RectangleBackgroundRectangle" x="0" y="0" width="110" height="80" rx="10"></rect>
</g>
</g>
<g id="GreenBox" transform="translate(207.000000, 60.000000)">
<g id="Group">
<mask id="mask-9" fill="white">
<use xlink:href="#path-8"></use>
</mask>
<g id="Rectangle">
<use fill="black" fill-opacity="1" filter="url(#filter-10)" xlink:href="#path-8"></use>
<use fill="#366500" fill-rule="evenodd" xlink:href="#path-8"></use>
<rect stroke-opacity="0.25" stroke="#000000" stroke-width="1" fill="url(#linearGradient-1)" fill-rule="evenodd" x="-0.5" y="-0.5" width="121" height="95" rx="10"></rect>
</g>
<text id="Label" mask="url(#mask-9)" font-family="-apple-system,sans-serif" font-size="14" font-weight="500" fill="#000000">
<tspan x="14.7802734" y="52">Write State B</tspan>
</text>
<rect id="Overlay" stroke-opacity="0.25" stroke="#000000" fill="url(#linearGradient-2)" x="-0.5" y="-0.5" width="111" height="81" rx="10"></rect>
<g id="Text" transform="translate(13.565043, 34.664917)" fill="#000000" fill-rule="nonzero">
<path d="M0,10.335083 L1.53627014,10.335083 L1.53627014,6.54081726 L3.61268616,6.54081726 C3.62429301,6.54081726 3.63776906,6.54081726 3.65311432,6.54081726 C3.66845957,6.54081726 3.68150838,6.54081726 3.69226074,6.54081726 L5.70309448,10.335083 L7.47509766,10.335083 L5.26708984,6.30551147 C5.86680094,6.10036214 6.33500926,5.74651337 6.67171478,5.24396515 C7.00842031,4.74141693 7.17677307,4.15795898 7.17677307,3.49359131 L7.17677307,3.47991943 C7.17677307,2.86653646 7.04375712,2.33546956 6.77772522,1.88671875 C6.51169332,1.43796794 6.13302867,1.08979797 5.64173126,0.842208862 C5.15043386,0.594619751 4.56672668,0.470825195 3.89060974,0.470825195 L0,0.470825195 L0,10.335083 Z M1.53627014,5.29667664 L1.53627014,1.75630188 L3.69525146,1.75630188 C4.28898112,1.75630188 4.75437673,1.91345723 5.09143829,2.22776794 C5.42849986,2.54207865 5.59703064,2.97270711 5.59703064,3.51965332 L5.59703064,3.5333252 C5.59703064,4.09308879 5.43501536,4.52692159 5.1109848,4.83482361 C4.78695424,5.14272563 4.32992554,5.29667664 3.73989868,5.29667664 L1.53627014,5.29667664 Z" id="R"></path>
<path d="M11.9391818,10.4762878 C12.4147779,10.4762878 12.8369149,10.4152273 13.2055926,10.2931061 C13.5742704,10.1709849 13.889133,10.0090942 14.1501803,9.80743408 C14.4112277,9.60577393 14.621593,9.38342794 14.7812762,9.14039612 C14.9409595,8.8973643 15.051456,8.65344238 15.1127658,8.40863037 L15.1277194,8.34764099 L13.6925998,8.34892273 L13.6678195,8.40286255 C13.6106397,8.52946981 13.5085635,8.65903219 13.3615909,8.79154968 C13.2146182,8.92406718 13.0256152,9.03484853 12.7945819,9.12389374 C12.5635486,9.21293894 12.2892032,9.25746155 11.9715457,9.25746155 C11.5566897,9.25746155 11.1975182,9.16544342 10.894031,8.98140717 C10.5905439,8.79737091 10.3568403,8.53260295 10.1929202,8.18710327 C10.0290001,7.8416036 9.94704008,7.42518107 9.94704008,6.93783569 L9.94704008,6.34460449 C9.94704008,5.83497111 10.0308693,5.40459188 10.1985278,5.0534668 C10.3661863,4.70234172 10.5944069,4.43663025 10.8831897,4.2563324 C11.1719724,4.07603455 11.5007917,3.98588562 11.8696475,3.98588562 C12.239429,3.98588562 12.5657026,4.07231394 12.8484683,4.24517059 C13.131234,4.41802724 13.3527433,4.67814891 13.5129962,5.02553558 C13.6732491,5.37292226 13.7533755,5.8126119 13.7533755,6.34460449 L13.7533755,6.93537903 L14.4690127,5.95185852 L9.20630217,5.95185852 L9.20630217,7.01239014 L15.2065463,7.01239014 L15.2065463,6.4911499 C15.2065463,5.74738566 15.0721596,5.09635162 14.8033862,4.53804779 C14.5346128,3.97974396 14.1502159,3.54502106 13.6501956,3.23387909 C13.1501753,2.92273712 12.5539533,2.76716614 11.8615298,2.76716614 C11.1718834,2.76716614 10.5709618,2.92873637 10.0587649,3.25187683 C9.54656808,3.57501729 9.15051095,4.02620697 8.87059355,4.60544586 C8.59067615,5.18468475 8.45071745,5.86192322 8.45071745,6.63716125 L8.45071745,6.64399719 C8.45071745,7.42671204 8.59088977,8.104894 8.87123442,8.67854309 C9.15157906,9.25219218 9.55189085,9.69522858 10.0721698,10.0076523 C10.5924487,10.320076 11.2147861,10.4762878 11.9391818,10.4762878 Z" id="e"></path>
<path d="M18.8538244,10.4612274 C19.1848689,10.4612274 19.4896022,10.4153519 19.7680242,10.3236008 C20.0464462,10.2318497 20.2947118,10.0975342 20.512821,9.9206543 C20.7309301,9.74377441 20.9120112,9.53089905 21.0560644,9.2820282 L21.1704595,9.2820282 L21.1704595,10.335083 L22.6456335,10.335083 L22.6456335,5.25630188 C22.6456335,4.73669942 22.5325913,4.29095713 22.3065069,3.91907501 C22.0804225,3.54719289 21.7501256,3.26223755 21.3156164,3.06420898 C20.8811071,2.86618042 20.3509303,2.76716614 19.725086,2.76716614 C19.1626165,2.76716614 18.6643941,2.85181427 18.2304189,3.02111053 C17.7964437,3.1904068 17.4463155,3.42663829 17.1800344,3.72980499 C16.9137533,4.0329717 16.7508123,4.38828023 16.6912115,4.79573059 L16.6843755,4.84550476 L18.114475,4.84550476 L18.1225927,4.82243347 C18.2124568,4.55875142 18.3882151,4.35477702 18.6498678,4.21051025 C18.9115204,4.06624349 19.2483149,3.99411011 19.6602514,3.99411011 C20.1599157,3.99411011 20.5365331,4.10223897 20.7901037,4.3184967 C21.0436742,4.53475444 21.1704595,4.84735616 21.1704595,5.25630188 L21.1704595,7.59077454 C21.1704595,7.90992737 21.0877696,8.19618225 20.9223897,8.44953918 C20.7570099,8.70289612 20.530249,8.90336355 20.2421072,9.05094147 C19.9539653,9.19851939 19.6250392,9.27230835 19.2553289,9.27230835 C18.8570643,9.27230835 18.5281382,9.17656962 18.2685506,8.98509216 C18.008963,8.79361471 17.8791692,8.52733358 17.8791692,8.18624878 L17.8791692,8.1725769 C17.8791692,7.84053548 17.99935,7.58198039 18.2397115,7.39691162 C18.4800731,7.21184285 18.8558894,7.10463969 19.3671606,7.07530212 L21.9080999,6.91241455 L21.9080999,5.86448669 L19.1672094,6.02983093 C18.2811722,6.08159892 17.5977031,6.29591624 17.116802,6.6727829 C16.6359009,7.04964956 16.3954504,7.56994629 16.3954504,8.2336731 L16.3954504,8.24734497 C16.3954504,8.69730632 16.5024221,9.08845011 16.7163656,9.42077637 C16.9303091,9.75310262 17.2227946,10.0095927 17.5938222,10.1902466 C17.9648499,10.3709005 18.3848506,10.4612274 18.8538244,10.4612274 Z" id="a"></path>
<path d="M27.2957616,10.4612274 C27.8174291,10.4612274 28.2748316,10.3469925 28.6679692,10.1185226 C29.0611068,9.8900528 29.3639175,9.57155863 29.5764012,9.16304016 L29.6907964,9.16304016 L29.6907964,10.335083 L31.1760106,10.335083 L31.1760106,0 L29.6907964,0 L29.6907964,4.08543396 L29.5764012,4.08543396 C29.3800817,3.68681335 29.0784103,3.36993917 28.6713872,3.1348114 C28.2643641,2.89968363 27.8058222,2.78211975 27.2957616,2.78211975 C26.6672826,2.78211975 26.1230067,2.93850962 25.6629338,3.25128937 C25.202861,3.56406911 24.8471074,4.00696309 24.5956731,4.57997131 C24.3442388,5.15297953 24.2185216,5.83126831 24.2185216,6.61483765 L24.2185216,6.62850952 C24.2185216,7.40666707 24.3448618,8.08317566 24.5975423,8.65803528 C24.8502227,9.2328949 25.2077387,9.67714183 25.6700902,9.99077606 C26.1324417,10.3044103 26.6743321,10.4612274 27.2957616,10.4612274 Z M27.7184148,9.18792725 C27.3069056,9.18792725 26.9526118,9.08533478 26.6555333,8.88014984 C26.3584549,8.6749649 26.1305369,8.38078817 25.9717793,7.99761963 C25.8130218,7.61445109 25.7336431,7.15808105 25.7336431,6.62850952 L25.7336431,6.61483765 C25.7336431,6.08241781 25.8130218,5.62553151 25.9717793,5.24417877 C26.1305369,4.86282603 26.3586507,4.56937917 26.6561208,4.3638382 C26.9535909,4.15829722 27.3076889,4.05552673 27.7184148,4.05552673 C28.129924,4.05552673 28.4851435,4.1590271 28.7840734,4.36602783 C29.0830032,4.57302856 29.3129862,4.8671875 29.4740224,5.24850464 C29.6350586,5.62982178 29.7155766,6.08569336 29.7155766,6.61611938 L29.7155766,6.62979126 C29.7155766,7.15558879 29.6352544,7.61008962 29.4746099,7.99329376 C29.3139653,8.3764979 29.0841959,8.67140452 28.7853017,8.87801361 C28.4864074,9.0846227 28.1307785,9.18792725 27.7184148,9.18792725 Z" id="d"></path>
<path d="M40.4045396,10.5749817 C41.1700222,10.5749817 41.8349773,10.449941 42.399405,10.1998596 C42.9638327,9.94977824 43.3999798,9.59580485 43.7078462,9.13793945 C44.0157126,8.68007406 44.1696458,8.13683065 44.1696458,7.50820923 L44.1696458,7.50137329 C44.1696458,6.76950073 43.9425645,6.1852239 43.4884019,5.74854279 C43.0342393,5.31186167 42.2892645,4.98250834 41.2534776,4.76048279 L40.1785264,4.52571106 C39.5411464,4.3898468 39.0828894,4.1998113 38.8037553,3.95560455 C38.5246212,3.71139781 38.3850541,3.40668233 38.3850541,3.04145813 L38.3850541,3.03462219 C38.3850541,2.72422791 38.4724971,2.46026103 38.6473832,2.24272156 C38.8222693,2.02518209 39.0602098,1.85782623 39.3612046,1.74065399 C39.6621995,1.62348175 40.004388,1.56489563 40.3877702,1.56489563 C40.786106,1.56119283 41.1343293,1.61999257 41.4324403,1.74129486 C41.7305512,1.86259715 41.9692572,2.02726491 42.1485581,2.23529816 C42.3278591,2.4433314 42.4390143,2.68317668 42.4820237,2.95483398 L42.4956956,3.0411377 L43.988173,3.0411377 L43.9813371,2.94917297 C43.9452348,2.43526713 43.7760631,1.97359212 43.4738221,1.56414795 C43.1715811,1.15470378 42.7595913,0.83013916 42.2378526,0.590454102 C41.7161139,0.350769043 41.1066473,0.230926514 40.4094529,0.230926514 C39.7120449,0.230926514 39.0944963,0.352335612 38.556807,0.595153809 C38.0191178,0.837972005 37.5980668,1.17569224 37.293654,1.60831451 C36.9892411,2.04093679 36.8351833,2.54239909 36.8314805,3.11270142 L36.8314805,3.11953735 C36.8314805,3.8475647 37.0590603,4.44433848 37.5142198,4.9098587 C37.9693793,5.37537893 38.6976914,5.71584066 39.6991563,5.9312439 L40.7741075,6.16046143 C41.4289333,6.30166626 41.8996339,6.49695333 42.1862092,6.74632263 C42.4727845,6.99569194 42.6160722,7.3095754 42.6160722,7.68797302 L42.6160722,7.69480896 C42.6160722,7.99744161 42.5237514,8.26528931 42.3391099,8.49835205 C42.1544684,8.73141479 41.9007732,8.91345723 41.5780244,9.04447937 C41.2552756,9.17550151 40.8847998,9.24101257 40.4665971,9.24101257 C40.0261064,9.24101257 39.63393,9.17993418 39.2900681,9.0577774 C38.9462063,8.93562063 38.6723237,8.76473999 38.4684205,8.5451355 C38.2645173,8.32553101 38.1474697,8.06669108 38.1172776,7.76861572 L38.1104417,7.69715881 L36.6004472,7.69715881 L36.6072831,7.78367615 C36.6540666,8.33525085 36.8368923,8.82060242 37.1557603,9.23973083 C37.4746283,9.65885925 37.9097428,9.98618317 38.4611039,10.2217026 C39.012465,10.457222 39.6602769,10.5749817 40.4045396,10.5749817 Z" id="S"></path>
<path d="M48.6638291,10.3797302 C48.809876,10.3797302 48.9509385,10.3722712 49.0870163,10.3573532 C49.2230942,10.3424352 49.3497727,10.3250071 49.4670517,10.305069 L49.4670517,9.12042236 C49.3627325,9.12953695 49.2713018,9.13658651 49.1927598,9.14157104 C49.1142177,9.14655558 49.0183365,9.14904785 48.9051163,9.14904785 C48.5390376,9.14904785 48.275854,9.06032308 48.1155655,8.88287354 C47.955277,8.70542399 47.8751328,8.41778056 47.8751328,8.01994324 L47.8751328,4.08319092 L49.4670517,4.08319092 L49.4670517,2.90826416 L47.8751328,2.90826416 L47.8751328,1.04119873 L46.3563797,1.04119873 L46.3563797,2.90826416 L45.1955521,2.90826416 L45.1955521,4.08319092 L46.3563797,4.08319092 L46.3563797,8.37968445 C46.3563797,9.09154765 46.5374253,9.60285441 46.8995163,9.91360474 C47.2616074,10.2243551 47.8497117,10.3797302 48.6638291,10.3797302 Z" id="t"></path>
<path d="M53.0823381,10.4612274 C53.4133826,10.4612274 53.7181159,10.4153519 53.9965379,10.3236008 C54.27496,10.2318497 54.5232255,10.0975342 54.7413347,9.9206543 C54.9594438,9.74377441 55.1405249,9.53089905 55.2845781,9.2820282 L55.3989732,9.2820282 L55.3989732,10.335083 L56.8741472,10.335083 L56.8741472,5.25630188 C56.8741472,4.73669942 56.761105,4.29095713 56.5350206,3.91907501 C56.3089362,3.54719289 55.9786394,3.26223755 55.5441301,3.06420898 C55.1096208,2.86618042 54.579444,2.76716614 53.9535997,2.76716614 C53.3911302,2.76716614 52.8929079,2.85181427 52.4589326,3.02111053 C52.0249574,3.1904068 51.6748292,3.42663829 51.4085481,3.72980499 C51.142267,4.0329717 50.979326,4.38828023 50.9197252,4.79573059 L50.9128892,4.84550476 L52.3429887,4.84550476 L52.3511064,4.82243347 C52.4409705,4.55875142 52.6167289,4.35477702 52.8783815,4.21051025 C53.1400341,4.06624349 53.4768287,3.99411011 53.8887651,3.99411011 C54.3884294,3.99411011 54.7650468,4.10223897 55.0186174,4.3184967 C55.2721879,4.53475444 55.3989732,4.84735616 55.3989732,5.25630188 L55.3989732,7.59077454 C55.3989732,7.90992737 55.3162833,8.19618225 55.1509035,8.44953918 C54.9855236,8.70289612 54.7587628,8.90336355 54.4706209,9.05094147 C54.182479,9.19851939 53.8535529,9.27230835 53.4838426,9.27230835 C53.085578,9.27230835 52.756652,9.17656962 52.4970644,8.98509216 C52.2374767,8.79361471 52.1076829,8.52733358 52.1076829,8.18624878 L52.1076829,8.1725769 C52.1076829,7.84053548 52.2278637,7.58198039 52.4682252,7.39691162 C52.7085868,7.21184285 53.0844031,7.10463969 53.5956743,7.07530212 L56.1366136,6.91241455 L56.1366136,5.86448669 L53.3957231,6.02983093 C52.5096859,6.08159892 51.8262168,6.29591624 51.3453157,6.6727829 C50.8644146,7.04964956 50.6239641,7.56994629 50.6239641,8.2336731 L50.6239641,8.24734497 C50.6239641,8.69730632 50.7309358,9.08845011 50.9448793,9.42077637 C51.1588228,9.75310262 51.4513083,10.0095927 51.822336,10.1902466 C52.1933636,10.3709005 52.6133643,10.4612274 53.0823381,10.4612274 Z" id="a"></path>
<path d="M61.6210465,10.3797302 C61.7670935,10.3797302 61.9081559,10.3722712 62.0442338,10.3573532 C62.1803117,10.3424352 62.3069901,10.3250071 62.4242692,10.305069 L62.4242692,9.12042236 C62.3199499,9.12953695 62.2285193,9.13658651 62.1499772,9.14157104 C62.0714351,9.14655558 61.975554,9.14904785 61.8623338,9.14904785 C61.4962551,9.14904785 61.2330715,9.06032308 61.072783,8.88287354 C60.9124945,8.70542399 60.8323503,8.41778056 60.8323503,8.01994324 L60.8323503,4.08319092 L62.4242692,4.08319092 L62.4242692,2.90826416 L60.8323503,2.90826416 L60.8323503,1.04119873 L59.3135972,1.04119873 L59.3135972,2.90826416 L58.1527696,2.90826416 L58.1527696,4.08319092 L59.3135972,4.08319092 L59.3135972,8.37968445 C59.3135972,9.09154765 59.4946427,9.60285441 59.8567338,9.91360474 C60.2188249,10.2243551 60.8069291,10.3797302 61.6210465,10.3797302 Z" id="t"></path>
<path d="M67.040488,10.4762878 C67.5160841,10.4762878 67.9382211,10.4152273 68.3068988,10.2931061 C68.6755766,10.1709849 68.9904392,10.0090942 69.2514865,9.80743408 C69.5125339,9.60577393 69.7228992,9.38342794 69.8825824,9.14039612 C70.0422657,8.8973643 70.1527622,8.65344238 70.214072,8.40863037 L70.2290256,8.34764099 L68.793906,8.34892273 L68.7691257,8.40286255 C68.7119459,8.52946981 68.6098697,8.65903219 68.4628971,8.79154968 C68.3159244,8.92406718 68.1269214,9.03484853 67.8958881,9.12389374 C67.6648548,9.21293894 67.3905094,9.25746155 67.0728519,9.25746155 C66.6579959,9.25746155 66.2988244,9.16544342 65.9953372,8.98140717 C65.6918501,8.79737091 65.4581465,8.53260295 65.2942264,8.18710327 C65.1303063,7.8416036 65.0483463,7.42518107 65.0483463,6.93783569 L65.0483463,6.34460449 C65.0483463,5.83497111 65.1321755,5.40459188 65.299834,5.0534668 C65.4674925,4.70234172 65.6957131,4.43663025 65.9844959,4.2563324 C66.2732786,4.07603455 66.6020979,3.98588562 66.9709537,3.98588562 C67.3407352,3.98588562 67.6670088,4.07231394 67.9497745,4.24517059 C68.2325402,4.41802724 68.4540495,4.67814891 68.6143024,5.02553558 C68.7745553,5.37292226 68.8546817,5.8126119 68.8546817,6.34460449 L68.8546817,6.93537903 L69.5703189,5.95185852 L64.3076084,5.95185852 L64.3076084,7.01239014 L70.3078525,7.01239014 L70.3078525,6.4911499 C70.3078525,5.74738566 70.1734658,5.09635162 69.9046924,4.53804779 C69.635919,3.97974396 69.2515221,3.54502106 68.7515018,3.23387909 C68.2514815,2.92273712 67.6552595,2.76716614 66.962836,2.76716614 C66.2731896,2.76716614 65.672268,2.92873637 65.1600711,3.25187683 C64.6478743,3.57501729 64.2518171,4.02620697 63.9718997,4.60544586 C63.6919823,5.18468475 63.5520236,5.86192322 63.5520236,6.63716125 L63.5520236,6.64399719 C63.5520236,7.42671204 63.692196,8.104894 63.9725406,8.67854309 C64.2528853,9.25219218 64.6531971,9.69522858 65.173476,10.0076523 C65.6937549,10.320076 66.3160923,10.4762878 67.040488,10.4762878 Z" id="e"></path>
<path d="M74.9991598,10.335083 L76.6131887,10.335083 L79.3323965,2.20277405 L79.8010855,2.20277405 L79.8010855,0.470825195 L78.5594015,0.470825195 L74.9991598,10.335083 Z M76.7155142,7.66981506 L82.0660238,7.66981506 L81.6381369,6.44084167 L77.143508,6.44084167 L76.7155142,7.66981506 Z M82.1659994,10.335083 L83.7801352,10.335083 L80.2198935,0.470825195 L79.4467916,0.470825195 L79.4467916,2.20277405 L82.1659994,10.335083 Z" id="A"></path>
</g>
</g>
<g id="Read-A-Copy" transform="translate(366.000000, 120.000000)">
<g id="Background" filter="url(#filter-3)" fill="#D7E6F7">
<g id="RectangleBackground">
<rect id="RectangleBackgroundRectangle" x="0" y="0" width="110" height="174" rx="10"></rect>
</g>
</g>
<g id="GreenBox" transform="translate(58.000000, 172.000000)">
<g id="Group">
<mask id="mask-12" fill="white">
<use xlink:href="#path-11"></use>
</mask>
<g id="Rectangle">
<use fill="black" fill-opacity="1" filter="url(#filter-13)" xlink:href="#path-11"></use>
<use fill="#366500" fill-rule="evenodd" xlink:href="#path-11"></use>
<rect stroke-opacity="0.25" stroke="#000000" stroke-width="1" fill="url(#linearGradient-1)" fill-rule="evenodd" x="-0.5" y="-0.5" width="121" height="45" rx="10"></rect>
</g>
<text id="Label" mask="url(#mask-12)" font-family="-apple-system,sans-serif" font-size="14" font-weight="500" fill="#000000">
<tspan x="15.9663086" y="27">Read State B</tspan>
</text>
<rect id="Overlay" stroke-opacity="0.25" stroke="#000000" fill="url(#linearGradient-4)" x="-0.5" y="-0.5" width="111" height="175" rx="10"></rect>
<g id="Text" transform="translate(13.565043, 81.664917)" fill="#000000" fill-rule="nonzero">
<path d="M0,10.335083 L1.53627014,10.335083 L1.53627014,6.54081726 L3.61268616,6.54081726 C3.62429301,6.54081726 3.63776906,6.54081726 3.65311432,6.54081726 C3.66845957,6.54081726 3.68150838,6.54081726 3.69226074,6.54081726 L5.70309448,10.335083 L7.47509766,10.335083 L5.26708984,6.30551147 C5.86680094,6.10036214 6.33500926,5.74651337 6.67171478,5.24396515 C7.00842031,4.74141693 7.17677307,4.15795898 7.17677307,3.49359131 L7.17677307,3.47991943 C7.17677307,2.86653646 7.04375712,2.33546956 6.77772522,1.88671875 C6.51169332,1.43796794 6.13302867,1.08979797 5.64173126,0.842208862 C5.15043386,0.594619751 4.56672668,0.470825195 3.89060974,0.470825195 L0,0.470825195 L0,10.335083 Z M1.53627014,5.29667664 L1.53627014,1.75630188 L3.69525146,1.75630188 C4.28898112,1.75630188 4.75437673,1.91345723 5.09143829,2.22776794 C5.42849986,2.54207865 5.59703064,2.97270711 5.59703064,3.51965332 L5.59703064,3.5333252 C5.59703064,4.09308879 5.43501536,4.52692159 5.1109848,4.83482361 C4.78695424,5.14272563 4.32992554,5.29667664 3.73989868,5.29667664 L1.53627014,5.29667664 Z" id="R"></path>
<path d="M11.9391818,10.4762878 C12.4147779,10.4762878 12.8369149,10.4152273 13.2055926,10.2931061 C13.5742704,10.1709849 13.889133,10.0090942 14.1501803,9.80743408 C14.4112277,9.60577393 14.621593,9.38342794 14.7812762,9.14039612 C14.9409595,8.8973643 15.051456,8.65344238 15.1127658,8.40863037 L15.1277194,8.34764099 L13.6925998,8.34892273 L13.6678195,8.40286255 C13.6106397,8.52946981 13.5085635,8.65903219 13.3615909,8.79154968 C13.2146182,8.92406718 13.0256152,9.03484853 12.7945819,9.12389374 C12.5635486,9.21293894 12.2892032,9.25746155 11.9715457,9.25746155 C11.5566897,9.25746155 11.1975182,9.16544342 10.894031,8.98140717 C10.5905439,8.79737091 10.3568403,8.53260295 10.1929202,8.18710327 C10.0290001,7.8416036 9.94704008,7.42518107 9.94704008,6.93783569 L9.94704008,6.34460449 C9.94704008,5.83497111 10.0308693,5.40459188 10.1985278,5.0534668 C10.3661863,4.70234172 10.5944069,4.43663025 10.8831897,4.2563324 C11.1719724,4.07603455 11.5007917,3.98588562 11.8696475,3.98588562 C12.239429,3.98588562 12.5657026,4.07231394 12.8484683,4.24517059 C13.131234,4.41802724 13.3527433,4.67814891 13.5129962,5.02553558 C13.6732491,5.37292226 13.7533755,5.8126119 13.7533755,6.34460449 L13.7533755,6.93537903 L14.4690127,5.95185852 L9.20630217,5.95185852 L9.20630217,7.01239014 L15.2065463,7.01239014 L15.2065463,6.4911499 C15.2065463,5.74738566 15.0721596,5.09635162 14.8033862,4.53804779 C14.5346128,3.97974396 14.1502159,3.54502106 13.6501956,3.23387909 C13.1501753,2.92273712 12.5539533,2.76716614 11.8615298,2.76716614 C11.1718834,2.76716614 10.5709618,2.92873637 10.0587649,3.25187683 C9.54656808,3.57501729 9.15051095,4.02620697 8.87059355,4.60544586 C8.59067615,5.18468475 8.45071745,5.86192322 8.45071745,6.63716125 L8.45071745,6.64399719 C8.45071745,7.42671204 8.59088977,8.104894 8.87123442,8.67854309 C9.15157906,9.25219218 9.55189085,9.69522858 10.0721698,10.0076523 C10.5924487,10.320076 11.2147861,10.4762878 11.9391818,10.4762878 Z" id="e"></path>
<path d="M18.8538244,10.4612274 C19.1848689,10.4612274 19.4896022,10.4153519 19.7680242,10.3236008 C20.0464462,10.2318497 20.2947118,10.0975342 20.512821,9.9206543 C20.7309301,9.74377441 20.9120112,9.53089905 21.0560644,9.2820282 L21.1704595,9.2820282 L21.1704595,10.335083 L22.6456335,10.335083 L22.6456335,5.25630188 C22.6456335,4.73669942 22.5325913,4.29095713 22.3065069,3.91907501 C22.0804225,3.54719289 21.7501256,3.26223755 21.3156164,3.06420898 C20.8811071,2.86618042 20.3509303,2.76716614 19.725086,2.76716614 C19.1626165,2.76716614 18.6643941,2.85181427 18.2304189,3.02111053 C17.7964437,3.1904068 17.4463155,3.42663829 17.1800344,3.72980499 C16.9137533,4.0329717 16.7508123,4.38828023 16.6912115,4.79573059 L16.6843755,4.84550476 L18.114475,4.84550476 L18.1225927,4.82243347 C18.2124568,4.55875142 18.3882151,4.35477702 18.6498678,4.21051025 C18.9115204,4.06624349 19.2483149,3.99411011 19.6602514,3.99411011 C20.1599157,3.99411011 20.5365331,4.10223897 20.7901037,4.3184967 C21.0436742,4.53475444 21.1704595,4.84735616 21.1704595,5.25630188 L21.1704595,7.59077454 C21.1704595,7.90992737 21.0877696,8.19618225 20.9223897,8.44953918 C20.7570099,8.70289612 20.530249,8.90336355 20.2421072,9.05094147 C19.9539653,9.19851939 19.6250392,9.27230835 19.2553289,9.27230835 C18.8570643,9.27230835 18.5281382,9.17656962 18.2685506,8.98509216 C18.008963,8.79361471 17.8791692,8.52733358 17.8791692,8.18624878 L17.8791692,8.1725769 C17.8791692,7.84053548 17.99935,7.58198039 18.2397115,7.39691162 C18.4800731,7.21184285 18.8558894,7.10463969 19.3671606,7.07530212 L21.9080999,6.91241455 L21.9080999,5.86448669 L19.1672094,6.02983093 C18.2811722,6.08159892 17.5977031,6.29591624 17.116802,6.6727829 C16.6359009,7.04964956 16.3954504,7.56994629 16.3954504,8.2336731 L16.3954504,8.24734497 C16.3954504,8.69730632 16.5024221,9.08845011 16.7163656,9.42077637 C16.9303091,9.75310262 17.2227946,10.0095927 17.5938222,10.1902466 C17.9648499,10.3709005 18.3848506,10.4612274 18.8538244,10.4612274 Z" id="a"></path>
<path d="M27.2957616,10.4612274 C27.8174291,10.4612274 28.2748316,10.3469925 28.6679692,10.1185226 C29.0611068,9.8900528 29.3639175,9.57155863 29.5764012,9.16304016 L29.6907964,9.16304016 L29.6907964,10.335083 L31.1760106,10.335083 L31.1760106,0 L29.6907964,0 L29.6907964,4.08543396 L29.5764012,4.08543396 C29.3800817,3.68681335 29.0784103,3.36993917 28.6713872,3.1348114 C28.2643641,2.89968363 27.8058222,2.78211975 27.2957616,2.78211975 C26.6672826,2.78211975 26.1230067,2.93850962 25.6629338,3.25128937 C25.202861,3.56406911 24.8471074,4.00696309 24.5956731,4.57997131 C24.3442388,5.15297953 24.2185216,5.83126831 24.2185216,6.61483765 L24.2185216,6.62850952 C24.2185216,7.40666707 24.3448618,8.08317566 24.5975423,8.65803528 C24.8502227,9.2328949 25.2077387,9.67714183 25.6700902,9.99077606 C26.1324417,10.3044103 26.6743321,10.4612274 27.2957616,10.4612274 Z M27.7184148,9.18792725 C27.3069056,9.18792725 26.9526118,9.08533478 26.6555333,8.88014984 C26.3584549,8.6749649 26.1305369,8.38078817 25.9717793,7.99761963 C25.8130218,7.61445109 25.7336431,7.15808105 25.7336431,6.62850952 L25.7336431,6.61483765 C25.7336431,6.08241781 25.8130218,5.62553151 25.9717793,5.24417877 C26.1305369,4.86282603 26.3586507,4.56937917 26.6561208,4.3638382 C26.9535909,4.15829722 27.3076889,4.05552673 27.7184148,4.05552673 C28.129924,4.05552673 28.4851435,4.1590271 28.7840734,4.36602783 C29.0830032,4.57302856 29.3129862,4.8671875 29.4740224,5.24850464 C29.6350586,5.62982178 29.7155766,6.08569336 29.7155766,6.61611938 L29.7155766,6.62979126 C29.7155766,7.15558879 29.6352544,7.61008962 29.4746099,7.99329376 C29.3139653,8.3764979 29.0841959,8.67140452 28.7853017,8.87801361 C28.4864074,9.0846227 28.1307785,9.18792725 27.7184148,9.18792725 Z" id="d"></path>
<path d="M40.4045396,10.5749817 C41.1700222,10.5749817 41.8349773,10.449941 42.399405,10.1998596 C42.9638327,9.94977824 43.3999798,9.59580485 43.7078462,9.13793945 C44.0157126,8.68007406 44.1696458,8.13683065 44.1696458,7.50820923 L44.1696458,7.50137329 C44.1696458,6.76950073 43.9425645,6.1852239 43.4884019,5.74854279 C43.0342393,5.31186167 42.2892645,4.98250834 41.2534776,4.76048279 L40.1785264,4.52571106 C39.5411464,4.3898468 39.0828894,4.1998113 38.8037553,3.95560455 C38.5246212,3.71139781 38.3850541,3.40668233 38.3850541,3.04145813 L38.3850541,3.03462219 C38.3850541,2.72422791 38.4724971,2.46026103 38.6473832,2.24272156 C38.8222693,2.02518209 39.0602098,1.85782623 39.3612046,1.74065399 C39.6621995,1.62348175 40.004388,1.56489563 40.3877702,1.56489563 C40.786106,1.56119283 41.1343293,1.61999257 41.4324403,1.74129486 C41.7305512,1.86259715 41.9692572,2.02726491 42.1485581,2.23529816 C42.3278591,2.4433314 42.4390143,2.68317668 42.4820237,2.95483398 L42.4956956,3.0411377 L43.988173,3.0411377 L43.9813371,2.94917297 C43.9452348,2.43526713 43.7760631,1.97359212 43.4738221,1.56414795 C43.1715811,1.15470378 42.7595913,0.83013916 42.2378526,0.590454102 C41.7161139,0.350769043 41.1066473,0.230926514 40.4094529,0.230926514 C39.7120449,0.230926514 39.0944963,0.352335612 38.556807,0.595153809 C38.0191178,0.837972005 37.5980668,1.17569224 37.293654,1.60831451 C36.9892411,2.04093679 36.8351833,2.54239909 36.8314805,3.11270142 L36.8314805,3.11953735 C36.8314805,3.8475647 37.0590603,4.44433848 37.5142198,4.9098587 C37.9693793,5.37537893 38.6976914,5.71584066 39.6991563,5.9312439 L40.7741075,6.16046143 C41.4289333,6.30166626 41.8996339,6.49695333 42.1862092,6.74632263 C42.4727845,6.99569194 42.6160722,7.3095754 42.6160722,7.68797302 L42.6160722,7.69480896 C42.6160722,7.99744161 42.5237514,8.26528931 42.3391099,8.49835205 C42.1544684,8.73141479 41.9007732,8.91345723 41.5780244,9.04447937 C41.2552756,9.17550151 40.8847998,9.24101257 40.4665971,9.24101257 C40.0261064,9.24101257 39.63393,9.17993418 39.2900681,9.0577774 C38.9462063,8.93562063 38.6723237,8.76473999 38.4684205,8.5451355 C38.2645173,8.32553101 38.1474697,8.06669108 38.1172776,7.76861572 L38.1104417,7.69715881 L36.6004472,7.69715881 L36.6072831,7.78367615 C36.6540666,8.33525085 36.8368923,8.82060242 37.1557603,9.23973083 C37.4746283,9.65885925 37.9097428,9.98618317 38.4611039,10.2217026 C39.012465,10.457222 39.6602769,10.5749817 40.4045396,10.5749817 Z" id="S"></path>
<path d="M48.6638291,10.3797302 C48.809876,10.3797302 48.9509385,10.3722712 49.0870163,10.3573532 C49.2230942,10.3424352 49.3497727,10.3250071 49.4670517,10.305069 L49.4670517,9.12042236 C49.3627325,9.12953695 49.2713018,9.13658651 49.1927598,9.14157104 C49.1142177,9.14655558 49.0183365,9.14904785 48.9051163,9.14904785 C48.5390376,9.14904785 48.275854,9.06032308 48.1155655,8.88287354 C47.955277,8.70542399 47.8751328,8.41778056 47.8751328,8.01994324 L47.8751328,4.08319092 L49.4670517,4.08319092 L49.4670517,2.90826416 L47.8751328,2.90826416 L47.8751328,1.04119873 L46.3563797,1.04119873 L46.3563797,2.90826416 L45.1955521,2.90826416 L45.1955521,4.08319092 L46.3563797,4.08319092 L46.3563797,8.37968445 C46.3563797,9.09154765 46.5374253,9.60285441 46.8995163,9.91360474 C47.2616074,10.2243551 47.8497117,10.3797302 48.6638291,10.3797302 Z" id="t"></path>
<path d="M53.0823381,10.4612274 C53.4133826,10.4612274 53.7181159,10.4153519 53.9965379,10.3236008 C54.27496,10.2318497 54.5232255,10.0975342 54.7413347,9.9206543 C54.9594438,9.74377441 55.1405249,9.53089905 55.2845781,9.2820282 L55.3989732,9.2820282 L55.3989732,10.335083 L56.8741472,10.335083 L56.8741472,5.25630188 C56.8741472,4.73669942 56.761105,4.29095713 56.5350206,3.91907501 C56.3089362,3.54719289 55.9786394,3.26223755 55.5441301,3.06420898 C55.1096208,2.86618042 54.579444,2.76716614 53.9535997,2.76716614 C53.3911302,2.76716614 52.8929079,2.85181427 52.4589326,3.02111053 C52.0249574,3.1904068 51.6748292,3.42663829 51.4085481,3.72980499 C51.142267,4.0329717 50.979326,4.38828023 50.9197252,4.79573059 L50.9128892,4.84550476 L52.3429887,4.84550476 L52.3511064,4.82243347 C52.4409705,4.55875142 52.6167289,4.35477702 52.8783815,4.21051025 C53.1400341,4.06624349 53.4768287,3.99411011 53.8887651,3.99411011 C54.3884294,3.99411011 54.7650468,4.10223897 55.0186174,4.3184967 C55.2721879,4.53475444 55.3989732,4.84735616 55.3989732,5.25630188 L55.3989732,7.59077454 C55.3989732,7.90992737 55.3162833,8.19618225 55.1509035,8.44953918 C54.9855236,8.70289612 54.7587628,8.90336355 54.4706209,9.05094147 C54.182479,9.19851939 53.8535529,9.27230835 53.4838426,9.27230835 C53.085578,9.27230835 52.756652,9.17656962 52.4970644,8.98509216 C52.2374767,8.79361471 52.1076829,8.52733358 52.1076829,8.18624878 L52.1076829,8.1725769 C52.1076829,7.84053548 52.2278637,7.58198039 52.4682252,7.39691162 C52.7085868,7.21184285 53.0844031,7.10463969 53.5956743,7.07530212 L56.1366136,6.91241455 L56.1366136,5.86448669 L53.3957231,6.02983093 C52.5096859,6.08159892 51.8262168,6.29591624 51.3453157,6.6727829 C50.8644146,7.04964956 50.6239641,7.56994629 50.6239641,8.2336731 L50.6239641,8.24734497 C50.6239641,8.69730632 50.7309358,9.08845011 50.9448793,9.42077637 C51.1588228,9.75310262 51.4513083,10.0095927 51.822336,10.1902466 C52.1933636,10.3709005 52.6133643,10.4612274 53.0823381,10.4612274 Z" id="a"></path>
<path d="M61.6210465,10.3797302 C61.7670935,10.3797302 61.9081559,10.3722712 62.0442338,10.3573532 C62.1803117,10.3424352 62.3069901,10.3250071 62.4242692,10.305069 L62.4242692,9.12042236 C62.3199499,9.12953695 62.2285193,9.13658651 62.1499772,9.14157104 C62.0714351,9.14655558 61.975554,9.14904785 61.8623338,9.14904785 C61.4962551,9.14904785 61.2330715,9.06032308 61.072783,8.88287354 C60.9124945,8.70542399 60.8323503,8.41778056 60.8323503,8.01994324 L60.8323503,4.08319092 L62.4242692,4.08319092 L62.4242692,2.90826416 L60.8323503,2.90826416 L60.8323503,1.04119873 L59.3135972,1.04119873 L59.3135972,2.90826416 L58.1527696,2.90826416 L58.1527696,4.08319092 L59.3135972,4.08319092 L59.3135972,8.37968445 C59.3135972,9.09154765 59.4946427,9.60285441 59.8567338,9.91360474 C60.2188249,10.2243551 60.8069291,10.3797302 61.6210465,10.3797302 Z" id="t"></path>
<path d="M67.040488,10.4762878 C67.5160841,10.4762878 67.9382211,10.4152273 68.3068988,10.2931061 C68.6755766,10.1709849 68.9904392,10.0090942 69.2514865,9.80743408 C69.5125339,9.60577393 69.7228992,9.38342794 69.8825824,9.14039612 C70.0422657,8.8973643 70.1527622,8.65344238 70.214072,8.40863037 L70.2290256,8.34764099 L68.793906,8.34892273 L68.7691257,8.40286255 C68.7119459,8.52946981 68.6098697,8.65903219 68.4628971,8.79154968 C68.3159244,8.92406718 68.1269214,9.03484853 67.8958881,9.12389374 C67.6648548,9.21293894 67.3905094,9.25746155 67.0728519,9.25746155 C66.6579959,9.25746155 66.2988244,9.16544342 65.9953372,8.98140717 C65.6918501,8.79737091 65.4581465,8.53260295 65.2942264,8.18710327 C65.1303063,7.8416036 65.0483463,7.42518107 65.0483463,6.93783569 L65.0483463,6.34460449 C65.0483463,5.83497111 65.1321755,5.40459188 65.299834,5.0534668 C65.4674925,4.70234172 65.6957131,4.43663025 65.9844959,4.2563324 C66.2732786,4.07603455 66.6020979,3.98588562 66.9709537,3.98588562 C67.3407352,3.98588562 67.6670088,4.07231394 67.9497745,4.24517059 C68.2325402,4.41802724 68.4540495,4.67814891 68.6143024,5.02553558 C68.7745553,5.37292226 68.8546817,5.8126119 68.8546817,6.34460449 L68.8546817,6.93537903 L69.5703189,5.95185852 L64.3076084,5.95185852 L64.3076084,7.01239014 L70.3078525,7.01239014 L70.3078525,6.4911499 C70.3078525,5.74738566 70.1734658,5.09635162 69.9046924,4.53804779 C69.635919,3.97974396 69.2515221,3.54502106 68.7515018,3.23387909 C68.2514815,2.92273712 67.6552595,2.76716614 66.962836,2.76716614 C66.2731896,2.76716614 65.672268,2.92873637 65.1600711,3.25187683 C64.6478743,3.57501729 64.2518171,4.02620697 63.9718997,4.60544586 C63.6919823,5.18468475 63.5520236,5.86192322 63.5520236,6.63716125 L63.5520236,6.64399719 C63.5520236,7.42671204 63.692196,8.104894 63.9725406,8.67854309 C64.2528853,9.25219218 64.6531971,9.69522858 65.173476,10.0076523 C65.6937549,10.320076 66.3160923,10.4762878 67.040488,10.4762878 Z" id="e"></path>
<path d="M74.9991598,10.335083 L76.6131887,10.335083 L79.3323965,2.20277405 L79.8010855,2.20277405 L79.8010855,0.470825195 L78.5594015,0.470825195 L74.9991598,10.335083 Z M76.7155142,7.66981506 L82.0660238,7.66981506 L81.6381369,6.44084167 L77.143508,6.44084167 L76.7155142,7.66981506 Z M82.1659994,10.335083 L83.7801352,10.335083 L80.2198935,0.470825195 L79.4467916,0.470825195 L79.4467916,2.20277405 L82.1659994,10.335083 Z" id="A"></path>
</g>
</g>
<g id="Write-B" transform="translate(216.000000, 90.000000)">
<g id="Background" filter="url(#filter-5)" fill="#E6F0C7">
<g id="RectangleBackground">
<rect id="RectangleBackgroundRectangle" x="0" y="0" width="110" height="60" rx="10"></rect>
</g>
</g>
<g id="OrangeBox" transform="translate(58.000000, 231.000000)">
<g id="Group">
<mask id="mask-15" fill="white">
<use xlink:href="#path-14"></use>
</mask>
<g id="Rectangle">
<use fill="black" fill-opacity="1" filter="url(#filter-16)" xlink:href="#path-14"></use>
<use fill="#CD7F00" fill-rule="evenodd" xlink:href="#path-14"></use>
<rect stroke-opacity="0.25" stroke="#000000" stroke-width="1" fill="url(#linearGradient-1)" fill-rule="evenodd" x="-0.5" y="-0.5" width="121" height="45" rx="10"></rect>
</g>
<text id="Label" mask="url(#mask-15)" font-family="-apple-system,sans-serif" font-size="14" font-weight="500" fill="#000000">
<tspan x="14.4179688" y="27">Write State C</tspan>
</text>
<rect id="Overlay" stroke-opacity="0.25" stroke="#000000" fill="url(#linearGradient-6)" x="-0.5" y="-0.5" width="111" height="61" rx="10"></rect>
<g id="Text" transform="translate(12.183546, 24.396606)" fill="#000000" fill-rule="nonzero">
<polygon id="W" points="2.6602478 10.6033936 4.11064148 10.6033936 6.22476196 3.2358551 6.3168335 3.2358551 8.43714905 10.6033936 9.88380432 10.6033936 12.5440521 0.739135742 10.9479675 0.739135742 9.14648438 8.40296936 9.05451965 8.40296936 6.98429871 0.739135742 5.55718994 0.739135742 3.49957275 8.40296936 3.40750122 8.40296936 1.60099792 0.739135742 0 0.739135742"></polygon>
<path d="M13.6347213,10.6033936 L15.1199355,10.6033936 L15.1199355,6.16729736 C15.1199355,5.80898031 15.2001866,5.49789174 15.3606887,5.23403168 C15.5211908,4.97017161 15.7445515,4.76534271 16.0307708,4.61954498 C16.3169901,4.47374725 16.6492273,4.40084839 17.0274825,4.40084839 C17.1688298,4.40084839 17.3043024,4.40800476 17.4339004,4.4223175 C17.5634983,4.43663025 17.6944137,4.45767212 17.8266463,4.48544312 L17.8266463,3.11590576 C17.75316,3.09924316 17.6570474,3.08416494 17.5383086,3.07067108 C17.4195698,3.05717723 17.299033,3.0504303 17.1766982,3.0504303 C16.6833002,3.0504303 16.2696548,3.15962728 15.9357619,3.37802124 C15.6018691,3.5964152 15.3680587,3.90346273 15.2343307,4.29916382 L15.1199355,4.29916382 L15.1199355,3.17657471 L13.6347213,3.17657471 L13.6347213,10.6033936 Z" id="r"></path>
<path d="M19.1169329,10.6033936 L20.6021471,10.6033936 L20.6021471,3.17657471 L19.1169329,3.17657471 L19.1169329,10.6033936 Z M19.8650408,1.85243225 C20.1230262,1.85243225 20.3428443,1.76151784 20.5244951,1.57968903 C20.7061459,1.39786021 20.7969713,1.18026733 20.7969713,0.9269104 C20.7969713,0.668924967 20.7061459,0.449943542 20.5244951,0.269966125 C20.3428443,0.0899887085 20.1230262,0 19.8650408,0 C19.6116838,0 19.3930407,0.0899887085 19.2091112,0.269966125 C19.0251818,0.449943542 18.933217,0.668924967 18.933217,0.9269104 C18.933217,1.18026733 19.0251818,1.39786021 19.2091112,1.57968903 C19.3930407,1.76151784 19.6116838,1.85243225 19.8650408,1.85243225 Z" id="i"></path>
<path d="M25.412344,10.6480408 C25.5583909,10.6480408 25.6994534,10.6405818 25.8355312,10.6256638 C25.9716091,10.6107457 26.0982876,10.5933177 26.2155666,10.5733795 L26.2155666,9.38873291 C26.1112474,9.39784749 26.0198167,9.40489705 25.9412746,9.40988159 C25.8627326,9.41486613 25.7668514,9.4173584 25.6536312,9.4173584 C25.2875525,9.4173584 25.0243689,9.32863363 24.8640804,9.15118408 C24.7037919,8.97373454 24.6236477,8.68609111 24.6236477,8.28825378 L24.6236477,4.35150146 L26.2155666,4.35150146 L26.2155666,3.17657471 L24.6236477,3.17657471 L24.6236477,1.30950928 L23.1048946,1.30950928 L23.1048946,3.17657471 L21.944067,3.17657471 L21.944067,4.35150146 L23.1048946,4.35150146 L23.1048946,8.647995 C23.1048946,9.35985819 23.2859402,9.87116496 23.6480312,10.1819153 C24.0101223,10.4926656 24.5982265,10.6480408 25.412344,10.6480408 Z" id="t"></path>
<path d="M30.8317854,10.7445984 C31.3073816,10.7445984 31.7295185,10.6835378 32.0981963,10.5614166 C32.466874,10.4392955 32.7817366,10.2774048 33.042784,10.0757446 C33.3038313,9.87408447 33.5141966,9.65173848 33.6738799,9.40870667 C33.8335631,9.16567485 33.9440596,8.92175293 34.0053694,8.67694092 L34.020323,8.61595154 L32.5852034,8.61723328 L32.5604231,8.6711731 C32.5032434,8.79778035 32.4011672,8.92734273 32.2541945,9.05986023 C32.1072218,9.19237773 31.9182189,9.30315908 31.6871855,9.39220428 C31.4561522,9.48124949 31.1818068,9.52577209 30.8641493,9.52577209 C30.4492934,9.52577209 30.0901218,9.43375397 29.7866347,9.24971771 C29.4831475,9.06568146 29.2494439,8.80091349 29.0855238,8.45541382 C28.9216038,8.10991414 28.8396437,7.69349162 28.8396437,7.20614624 L28.8396437,6.61291504 C28.8396437,6.10328166 28.923473,5.67290243 29.0911314,5.32177734 C29.2587899,4.97065226 29.4870106,4.7049408 29.7757933,4.52464294 C30.0645761,4.34434509 30.3933953,4.25419617 30.7622511,4.25419617 C31.1320326,4.25419617 31.4583062,4.34062449 31.7410719,4.51348114 C32.0238376,4.68633779 32.2453469,4.94645945 32.4055998,5.29384613 C32.5658527,5.64123281 32.6459792,6.08092244 32.6459792,6.61291504 L32.6459792,7.20368958 L33.3616164,6.22016907 L28.0989058,6.22016907 L28.0989058,7.28070068 L34.0991499,7.28070068 L34.0991499,6.75946045 C34.0991499,6.01569621 33.9647632,5.36466217 33.6959898,4.80635834 C33.4272165,4.2480545 33.0428196,3.8133316 32.5427992,3.50218964 C32.0427789,3.19104767 31.446557,3.03547668 30.7541335,3.03547668 C30.0644871,3.03547668 29.4635654,3.19704692 28.9513686,3.52018738 C28.4391717,3.84332784 28.0431146,4.29451752 27.7631972,4.87375641 C27.4832798,5.4529953 27.3433211,6.13023376 27.3433211,6.9054718 L27.3433211,6.91230774 C27.3433211,7.69502258 27.4834934,8.37320455 27.7638381,8.94685364 C28.0441827,9.52050273 28.4444945,9.96353912 28.9647734,10.2759628 C29.4850523,10.5883865 30.1073897,10.7445984 30.8317854,10.7445984 Z" id="e"></path>
<path d="M42.8889222,10.8432922 C43.6544048,10.8432922 44.3193599,10.7182515 44.8837876,10.4681702 C45.4482153,10.2180888 45.8843624,9.8641154 46.1922288,9.40625 C46.5000952,8.9483846 46.6540284,8.40514119 46.6540284,7.77651978 L46.6540284,7.76968384 C46.6540284,7.03781128 46.4269471,6.45353444 45.9727845,6.01685333 C45.5186219,5.58017222 44.7736471,5.25081889 43.7378602,5.02879333 L42.662909,4.79402161 C42.0255291,4.65815735 41.567272,4.46812185 41.2881379,4.2239151 C41.0090038,3.97970835 40.8694367,3.67499288 40.8694367,3.30976868 L40.8694367,3.30293274 C40.8694367,2.99253845 40.9568798,2.72857157 41.1317658,2.5110321 C41.3066519,2.29349264 41.5445924,2.12613678 41.8455873,2.00896454 C42.1465821,1.8917923 42.4887706,1.83320618 42.8721528,1.83320618 C43.2704886,1.82950338 43.6187119,1.88830312 43.9168229,2.00960541 C44.2149339,2.13090769 44.4536398,2.29557546 44.6329408,2.5036087 C44.8122417,2.71164195 44.9233969,2.95148722 44.9664063,3.22314453 L44.9800782,3.30944824 L46.4725556,3.30944824 L46.4657197,3.21748352 C46.4296174,2.70357768 46.2604458,2.24190267 45.9582047,1.8324585 C45.6559637,1.42301432 45.2439739,1.09844971 44.7222352,0.858764648 C44.2004965,0.61907959 43.59103,0.499237061 42.8938355,0.499237061 C42.1964275,0.499237061 41.5788789,0.620646159 41.0411897,0.863464355 C40.5035005,1.10628255 40.0824494,1.44400279 39.7780366,1.87662506 C39.4736238,2.30924733 39.3195659,2.81070964 39.3158631,3.38101196 L39.3158631,3.3878479 C39.3158631,4.11587524 39.5434429,4.71264903 39.9986024,5.17816925 C40.4537619,5.64368947 41.1820741,5.9841512 42.1835389,6.19955444 L43.2584901,6.42877197 C43.9133159,6.56997681 44.3840165,6.76526388 44.6705918,7.01463318 C44.9571671,7.26400248 45.1004548,7.57788595 45.1004548,7.95628357 L45.1004548,7.96311951 C45.1004548,8.26575216 45.008134,8.53359985 44.8234925,8.7666626 C44.638851,8.99972534 44.3851558,9.18176778 44.062407,9.31278992 C43.7396582,9.44381205 43.3691824,9.50932312 42.9509797,9.50932312 C42.510489,9.50932312 42.1183127,9.44824473 41.7744508,9.32608795 C41.4305889,9.20393117 41.1567063,9.03305054 40.9528031,8.81344604 C40.7488999,8.59384155 40.6318523,8.33500163 40.6016603,8.03692627 L40.5948243,7.96546936 L39.0848298,7.96546936 L39.0916657,8.05198669 C39.1384492,8.6035614 39.3212749,9.08891296 39.6401429,9.50804138 C39.9590109,9.9271698 40.3941255,10.2544937 40.9454865,10.4900131 C41.4968476,10.7255325 42.1446595,10.8432922 42.8889222,10.8432922 Z" id="S"></path>
<path d="M51.1482117,10.6480408 C51.2942587,10.6480408 51.4353211,10.6405818 51.571399,10.6256638 C51.7074769,10.6107457 51.8341553,10.5933177 51.9514344,10.5733795 L51.9514344,9.38873291 C51.8471151,9.39784749 51.7556845,9.40489705 51.6771424,9.40988159 C51.5986003,9.41486613 51.5027192,9.4173584 51.3894989,9.4173584 C51.0234203,9.4173584 50.7602367,9.32863363 50.5999482,9.15118408 C50.4396597,8.97373454 50.3595154,8.68609111 50.3595154,8.28825378 L50.3595154,4.35150146 L51.9514344,4.35150146 L51.9514344,3.17657471 L50.3595154,3.17657471 L50.3595154,1.30950928 L48.8407624,1.30950928 L48.8407624,3.17657471 L47.6799347,3.17657471 L47.6799347,4.35150146 L48.8407624,4.35150146 L48.8407624,8.647995 C48.8407624,9.35985819 49.0218079,9.87116496 49.383899,10.1819153 C49.74599,10.4926656 50.3340943,10.6480408 51.1482117,10.6480408 Z" id="t"></path>
<path d="M55.5667207,10.729538 C55.8977652,10.729538 56.2024985,10.6836624 56.4809206,10.5919113 C56.7593426,10.5001602 57.0076082,10.3658447 57.2257173,10.1889648 C57.4438264,10.012085 57.6249076,9.79920959 57.7689607,9.55033875 L57.8833559,9.55033875 L57.8833559,10.6033936 L59.3585298,10.6033936 L59.3585298,5.52461243 C59.3585298,5.00500997 59.2454876,4.55926768 59.0194032,4.18738556 C58.7933188,3.81550344 58.463022,3.5305481 58.0285127,3.33251953 C57.5940034,3.13449097 57.0638266,3.03547668 56.4379823,3.03547668 C55.8755128,3.03547668 55.3772905,3.12012482 54.9433153,3.28942108 C54.50934,3.45871735 54.1592119,3.69494883 53.8929307,3.99811554 C53.6266496,4.30128225 53.4637086,4.65659078 53.4041078,5.06404114 L53.3972719,5.11381531 L54.8273714,5.11381531 L54.835489,5.09074402 C54.9253531,4.82706197 55.1011115,4.62308757 55.3627641,4.4788208 C55.6244167,4.33455404 55.9612113,4.26242065 56.3731477,4.26242065 C56.872812,4.26242065 57.2494295,4.37054952 57.503,4.58680725 C57.7565706,4.80306498 57.8833559,5.11566671 57.8833559,5.52461243 L57.8833559,7.85908508 C57.8833559,8.17823792 57.8006659,8.4644928 57.6352861,8.71784973 C57.4699063,8.97120667 57.2431454,9.17167409 56.9550035,9.31925201 C56.6668616,9.46682994 56.3379355,9.5406189 55.9682252,9.5406189 C55.5699607,9.5406189 55.2410346,9.44488017 54.981447,9.25340271 C54.7218594,9.06192525 54.5920656,8.79564412 54.5920656,8.45455933 L54.5920656,8.44088745 C54.5920656,8.10884603 54.7122463,7.85029093 54.9526079,7.66522217 C55.1929694,7.4801534 55.5687857,7.37295024 56.0800569,7.34361267 L58.6209962,7.1807251 L58.6209962,6.13279724 L55.8801057,6.29814148 C54.9940685,6.34990946 54.3105994,6.56422679 53.8296983,6.94109344 C53.3487972,7.3179601 53.1083467,7.83825684 53.1083467,8.50198364 L53.1083467,8.51565552 C53.1083467,8.96561686 53.2153184,9.35676066 53.4292619,9.68908691 C53.6432054,10.0214132 53.935691,10.2779032 54.3067186,10.4585571 C54.6777462,10.639211 55.0977469,10.729538 55.5667207,10.729538 Z" id="a"></path>
<path d="M64.1054292,10.6480408 C64.2514761,10.6480408 64.3925385,10.6405818 64.5286164,10.6256638 C64.6646943,10.6107457 64.7913728,10.5933177 64.9086518,10.5733795 L64.9086518,9.38873291 C64.8043326,9.39784749 64.7129019,9.40489705 64.6343598,9.40988159 C64.5558178,9.41486613 64.4599366,9.4173584 64.3467164,9.4173584 C63.9806377,9.4173584 63.7174541,9.32863363 63.5571656,9.15118408 C63.3968771,8.97373454 63.3167329,8.68609111 63.3167329,8.28825378 L63.3167329,4.35150146 L64.9086518,4.35150146 L64.9086518,3.17657471 L63.3167329,3.17657471 L63.3167329,1.30950928 L61.7979798,1.30950928 L61.7979798,3.17657471 L60.6371522,3.17657471 L60.6371522,4.35150146 L61.7979798,4.35150146 L61.7979798,8.647995 C61.7979798,9.35985819 61.9790254,9.87116496 62.3411164,10.1819153 C62.7032075,10.4926656 63.2913117,10.6480408 64.1054292,10.6480408 Z" id="t"></path>
<path d="M69.5248706,10.7445984 C70.0004667,10.7445984 70.4226037,10.6835378 70.7912815,10.5614166 C71.1599592,10.4392955 71.4748218,10.2774048 71.7358692,10.0757446 C71.9969165,9.87408447 72.2072818,9.65173848 72.3669651,9.40870667 C72.5266483,9.16567485 72.6371448,8.92175293 72.6984546,8.67694092 L72.7134082,8.61595154 L71.2782886,8.61723328 L71.2535083,8.6711731 C71.1963286,8.79778035 71.0942523,8.92734273 70.9472797,9.05986023 C70.800307,9.19237773 70.611304,9.30315908 70.3802707,9.39220428 C70.1492374,9.48124949 69.874892,9.52577209 69.5572345,9.52577209 C69.1423786,9.52577209 68.783207,9.43375397 68.4797199,9.24971771 C68.1762327,9.06568146 67.9425291,8.80091349 67.778609,8.45541382 C67.614689,8.10991414 67.5327289,7.69349162 67.5327289,7.20614624 L67.5327289,6.61291504 C67.5327289,6.10328166 67.6165582,5.67290243 67.7842166,5.32177734 C67.9518751,4.97065226 68.1800958,4.7049408 68.4688785,4.52464294 C68.7576613,4.34434509 69.0864805,4.25419617 69.4553363,4.25419617 C69.8251178,4.25419617 70.1513914,4.34062449 70.4341571,4.51348114 C70.7169228,4.68633779 70.9384321,4.94645945 71.098685,5.29384613 C71.2589379,5.64123281 71.3390644,6.08092244 71.3390644,6.61291504 L71.3390644,7.20368958 L72.0547016,6.22016907 L66.791991,6.22016907 L66.791991,7.28070068 L72.7922351,7.28070068 L72.7922351,6.75946045 C72.7922351,6.01569621 72.6578484,5.36466217 72.389075,4.80635834 C72.1203016,4.2480545 71.7359048,3.8133316 71.2358844,3.50218964 C70.7358641,3.19104767 70.1396422,3.03547668 69.4472187,3.03547668 C68.7575723,3.03547668 68.1566506,3.19704692 67.6444538,3.52018738 C67.1322569,3.84332784 66.7361998,4.29451752 66.4562824,4.87375641 C66.176365,5.4529953 66.0364063,6.13023376 66.0364063,6.9054718 L66.0364063,6.91230774 C66.0364063,7.69502258 66.1765786,8.37320455 66.4569232,8.94685364 C66.7372679,9.52050273 67.1375797,9.96353912 67.6578586,10.2759628 C68.1781375,10.5883865 68.8004749,10.7445984 69.5248706,10.7445984 Z" id="e"></path>
<path d="M79.0089178,10.6033936 L82.3025579,10.6033936 C83.0051641,10.6033936 83.6069403,10.4914195 84.1078863,10.2674713 C84.6088324,10.0435232 84.9944754,9.72365824 85.2648153,9.30787659 C85.5351553,8.89209493 85.6703253,8.39709473 85.6703253,7.82287598 L85.6703253,7.8092041 C85.6703253,7.38046265 85.5776129,6.99590556 85.3921881,6.65553284 C85.2067633,6.31516012 84.9478877,6.03809102 84.6155615,5.82432556 C84.2832352,5.6105601 83.894014,5.48049927 83.4478979,5.43414307 L83.4478979,5.31974792 C83.7743851,5.26306661 84.0675472,5.13300578 84.327384,4.92956543 C84.5872208,4.72612508 84.7945064,4.47422791 84.9492407,4.1738739 C85.103975,3.8735199 85.1813421,3.55119832 85.1813421,3.20690918 L85.1813421,3.1932373 C85.1813421,2.69029744 85.0623185,2.25539653 84.8242712,1.88853455 C84.5862239,1.52167257 84.246047,1.2383906 83.8037405,1.03868866 C83.361434,0.838986715 82.8309546,0.739135742 82.2123022,0.739135742 L79.0089178,0.739135742 L79.0089178,1.99021912 L81.854804,1.99021912 C82.4211899,1.99021912 82.8618053,2.1188914 83.17665,2.37623596 C83.4914948,2.63358053 83.6489172,2.99453227 83.6489172,3.45909119 L83.6489172,3.47276306 C83.6489172,3.9504954 83.4755621,4.313797 83.1288519,4.56266785 C82.7821417,4.8115387 82.2697668,4.93597412 81.5917273,4.93597412 L79.0089178,4.93597412 L79.0089178,6.10577393 L81.9001989,6.10577393 C82.3817053,6.10577393 82.7854706,6.1658198 83.111495,6.28591156 C83.4375194,6.40600332 83.6831325,6.58530426 83.8483343,6.82381439 C84.0135361,7.06232452 84.096137,7.3577474 84.096137,7.71008301 L84.096137,7.72375488 C84.096137,8.25289917 83.9176728,8.65661112 83.5607443,8.93489075 C83.2038158,9.21317037 82.6806707,9.35231018 81.9913092,9.35231018 L79.0089178,9.35231018 L79.0089178,10.6033936 Z M78.2408361,10.6033936 L79.7771063,10.6033936 L79.7771063,0.739135742 L78.2408361,0.739135742 L78.2408361,10.6033936 Z" id="B"></path>
</g>
</g>
<g id="Read-B" transform="translate(66.000000, 158.000000)">
<g id="Background" filter="url(#filter-7)" fill="#E6F0C7">
<g id="RectangleBackground">
<rect id="RectangleBackgroundRectangle" x="0" y="0" width="110" height="40" rx="10"></rect>
</g>
</g>
<g id="OrangeBox" transform="translate(207.000000, 300.000000)">
<g id="Group">
<mask id="mask-18" fill="white">
<use xlink:href="#path-17"></use>
</mask>
<g id="Rectangle">
<use fill="black" fill-opacity="1" filter="url(#filter-19)" xlink:href="#path-17"></use>
<use fill="#CD7F00" fill-rule="evenodd" xlink:href="#path-17"></use>
<rect stroke-opacity="0.25" stroke="#000000" stroke-width="1" fill="url(#linearGradient-1)" fill-rule="evenodd" x="-0.5" y="-0.5" width="121" height="45" rx="10"></rect>
</g>
<text id="Label" mask="url(#mask-18)" font-family="-apple-system,sans-serif" font-size="14" font-weight="500" fill="#000000">
<tspan x="15.6040039" y="27">Read State C</tspan>
</text>
<rect id="Overlay" stroke-opacity="0.25" stroke="#000000" fill="url(#linearGradient-8)" x="-0.5" y="-0.5" width="111" height="41" rx="10"></rect>
<g id="Text" transform="translate(13.738909, 14.664917)" fill="#000000" fill-rule="nonzero">
<path d="M0,10.335083 L1.53627014,10.335083 L1.53627014,6.54081726 L3.61268616,6.54081726 C3.62429301,6.54081726 3.63776906,6.54081726 3.65311432,6.54081726 C3.66845957,6.54081726 3.68150838,6.54081726 3.69226074,6.54081726 L5.70309448,10.335083 L7.47509766,10.335083 L5.26708984,6.30551147 C5.86680094,6.10036214 6.33500926,5.74651337 6.67171478,5.24396515 C7.00842031,4.74141693 7.17677307,4.15795898 7.17677307,3.49359131 L7.17677307,3.47991943 C7.17677307,2.86653646 7.04375712,2.33546956 6.77772522,1.88671875 C6.51169332,1.43796794 6.13302867,1.08979797 5.64173126,0.842208862 C5.15043386,0.594619751 4.56672668,0.470825195 3.89060974,0.470825195 L0,0.470825195 L0,10.335083 Z M1.53627014,5.29667664 L1.53627014,1.75630188 L3.69525146,1.75630188 C4.28898112,1.75630188 4.75437673,1.91345723 5.09143829,2.22776794 C5.42849986,2.54207865 5.59703064,2.97270711 5.59703064,3.51965332 L5.59703064,3.5333252 C5.59703064,4.09308879 5.43501536,4.52692159 5.1109848,4.83482361 C4.78695424,5.14272563 4.32992554,5.29667664 3.73989868,5.29667664 L1.53627014,5.29667664 Z" id="R"></path>
<path d="M11.9391818,10.4762878 C12.4147779,10.4762878 12.8369149,10.4152273 13.2055926,10.2931061 C13.5742704,10.1709849 13.889133,10.0090942 14.1501803,9.80743408 C14.4112277,9.60577393 14.621593,9.38342794 14.7812762,9.14039612 C14.9409595,8.8973643 15.051456,8.65344238 15.1127658,8.40863037 L15.1277194,8.34764099 L13.6925998,8.34892273 L13.6678195,8.40286255 C13.6106397,8.52946981 13.5085635,8.65903219 13.3615909,8.79154968 C13.2146182,8.92406718 13.0256152,9.03484853 12.7945819,9.12389374 C12.5635486,9.21293894 12.2892032,9.25746155 11.9715457,9.25746155 C11.5566897,9.25746155 11.1975182,9.16544342 10.894031,8.98140717 C10.5905439,8.79737091 10.3568403,8.53260295 10.1929202,8.18710327 C10.0290001,7.8416036 9.94704008,7.42518107 9.94704008,6.93783569 L9.94704008,6.34460449 C9.94704008,5.83497111 10.0308693,5.40459188 10.1985278,5.0534668 C10.3661863,4.70234172 10.5944069,4.43663025 10.8831897,4.2563324 C11.1719724,4.07603455 11.5007917,3.98588562 11.8696475,3.98588562 C12.239429,3.98588562 12.5657026,4.07231394 12.8484683,4.24517059 C13.131234,4.41802724 13.3527433,4.67814891 13.5129962,5.02553558 C13.6732491,5.37292226 13.7533755,5.8126119 13.7533755,6.34460449 L13.7533755,6.93537903 L14.4690127,5.95185852 L9.20630217,5.95185852 L9.20630217,7.01239014 L15.2065463,7.01239014 L15.2065463,6.4911499 C15.2065463,5.74738566 15.0721596,5.09635162 14.8033862,4.53804779 C14.5346128,3.97974396 14.1502159,3.54502106 13.6501956,3.23387909 C13.1501753,2.92273712 12.5539533,2.76716614 11.8615298,2.76716614 C11.1718834,2.76716614 10.5709618,2.92873637 10.0587649,3.25187683 C9.54656808,3.57501729 9.15051095,4.02620697 8.87059355,4.60544586 C8.59067615,5.18468475 8.45071745,5.86192322 8.45071745,6.63716125 L8.45071745,6.64399719 C8.45071745,7.42671204 8.59088977,8.104894 8.87123442,8.67854309 C9.15157906,9.25219218 9.55189085,9.69522858 10.0721698,10.0076523 C10.5924487,10.320076 11.2147861,10.4762878 11.9391818,10.4762878 Z" id="e"></path>
<path d="M18.8538244,10.4612274 C19.1848689,10.4612274 19.4896022,10.4153519 19.7680242,10.3236008 C20.0464462,10.2318497 20.2947118,10.0975342 20.512821,9.9206543 C20.7309301,9.74377441 20.9120112,9.53089905 21.0560644,9.2820282 L21.1704595,9.2820282 L21.1704595,10.335083 L22.6456335,10.335083 L22.6456335,5.25630188 C22.6456335,4.73669942 22.5325913,4.29095713 22.3065069,3.91907501 C22.0804225,3.54719289 21.7501256,3.26223755 21.3156164,3.06420898 C20.8811071,2.86618042 20.3509303,2.76716614 19.725086,2.76716614 C19.1626165,2.76716614 18.6643941,2.85181427 18.2304189,3.02111053 C17.7964437,3.1904068 17.4463155,3.42663829 17.1800344,3.72980499 C16.9137533,4.0329717 16.7508123,4.38828023 16.6912115,4.79573059 L16.6843755,4.84550476 L18.114475,4.84550476 L18.1225927,4.82243347 C18.2124568,4.55875142 18.3882151,4.35477702 18.6498678,4.21051025 C18.9115204,4.06624349 19.2483149,3.99411011 19.6602514,3.99411011 C20.1599157,3.99411011 20.5365331,4.10223897 20.7901037,4.3184967 C21.0436742,4.53475444 21.1704595,4.84735616 21.1704595,5.25630188 L21.1704595,7.59077454 C21.1704595,7.90992737 21.0877696,8.19618225 20.9223897,8.44953918 C20.7570099,8.70289612 20.530249,8.90336355 20.2421072,9.05094147 C19.9539653,9.19851939 19.6250392,9.27230835 19.2553289,9.27230835 C18.8570643,9.27230835 18.5281382,9.17656962 18.2685506,8.98509216 C18.008963,8.79361471 17.8791692,8.52733358 17.8791692,8.18624878 L17.8791692,8.1725769 C17.8791692,7.84053548 17.99935,7.58198039 18.2397115,7.39691162 C18.4800731,7.21184285 18.8558894,7.10463969 19.3671606,7.07530212 L21.9080999,6.91241455 L21.9080999,5.86448669 L19.1672094,6.02983093 C18.2811722,6.08159892 17.5977031,6.29591624 17.116802,6.6727829 C16.6359009,7.04964956 16.3954504,7.56994629 16.3954504,8.2336731 L16.3954504,8.24734497 C16.3954504,8.69730632 16.5024221,9.08845011 16.7163656,9.42077637 C16.9303091,9.75310262 17.2227946,10.0095927 17.5938222,10.1902466 C17.9648499,10.3709005 18.3848506,10.4612274 18.8538244,10.4612274 Z" id="a"></path>
<path d="M27.2957616,10.4612274 C27.8174291,10.4612274 28.2748316,10.3469925 28.6679692,10.1185226 C29.0611068,9.8900528 29.3639175,9.57155863 29.5764012,9.16304016 L29.6907964,9.16304016 L29.6907964,10.335083 L31.1760106,10.335083 L31.1760106,0 L29.6907964,0 L29.6907964,4.08543396 L29.5764012,4.08543396 C29.3800817,3.68681335 29.0784103,3.36993917 28.6713872,3.1348114 C28.2643641,2.89968363 27.8058222,2.78211975 27.2957616,2.78211975 C26.6672826,2.78211975 26.1230067,2.93850962 25.6629338,3.25128937 C25.202861,3.56406911 24.8471074,4.00696309 24.5956731,4.57997131 C24.3442388,5.15297953 24.2185216,5.83126831 24.2185216,6.61483765 L24.2185216,6.62850952 C24.2185216,7.40666707 24.3448618,8.08317566 24.5975423,8.65803528 C24.8502227,9.2328949 25.2077387,9.67714183 25.6700902,9.99077606 C26.1324417,10.3044103 26.6743321,10.4612274 27.2957616,10.4612274 Z M27.7184148,9.18792725 C27.3069056,9.18792725 26.9526118,9.08533478 26.6555333,8.88014984 C26.3584549,8.6749649 26.1305369,8.38078817 25.9717793,7.99761963 C25.8130218,7.61445109 25.7336431,7.15808105 25.7336431,6.62850952 L25.7336431,6.61483765 C25.7336431,6.08241781 25.8130218,5.62553151 25.9717793,5.24417877 C26.1305369,4.86282603 26.3586507,4.56937917 26.6561208,4.3638382 C26.9535909,4.15829722 27.3076889,4.05552673 27.7184148,4.05552673 C28.129924,4.05552673 28.4851435,4.1590271 28.7840734,4.36602783 C29.0830032,4.57302856 29.3129862,4.8671875 29.4740224,5.24850464 C29.6350586,5.62982178 29.7155766,6.08569336 29.7155766,6.61611938 L29.7155766,6.62979126 C29.7155766,7.15558879 29.6352544,7.61008962 29.4746099,7.99329376 C29.3139653,8.3764979 29.0841959,8.67140452 28.7853017,8.87801361 C28.4864074,9.0846227 28.1307785,9.18792725 27.7184148,9.18792725 Z" id="d"></path>
<path d="M40.4045396,10.5749817 C41.1700222,10.5749817 41.8349773,10.449941 42.399405,10.1998596 C42.9638327,9.94977824 43.3999798,9.59580485 43.7078462,9.13793945 C44.0157126,8.68007406 44.1696458,8.13683065 44.1696458,7.50820923 L44.1696458,7.50137329 C44.1696458,6.76950073 43.9425645,6.1852239 43.4884019,5.74854279 C43.0342393,5.31186167 42.2892645,4.98250834 41.2534776,4.76048279 L40.1785264,4.52571106 C39.5411464,4.3898468 39.0828894,4.1998113 38.8037553,3.95560455 C38.5246212,3.71139781 38.3850541,3.40668233 38.3850541,3.04145813 L38.3850541,3.03462219 C38.3850541,2.72422791 38.4724971,2.46026103 38.6473832,2.24272156 C38.8222693,2.02518209 39.0602098,1.85782623 39.3612046,1.74065399 C39.6621995,1.62348175 40.004388,1.56489563 40.3877702,1.56489563 C40.786106,1.56119283 41.1343293,1.61999257 41.4324403,1.74129486 C41.7305512,1.86259715 41.9692572,2.02726491 42.1485581,2.23529816 C42.3278591,2.4433314 42.4390143,2.68317668 42.4820237,2.95483398 L42.4956956,3.0411377 L43.988173,3.0411377 L43.9813371,2.94917297 C43.9452348,2.43526713 43.7760631,1.97359212 43.4738221,1.56414795 C43.1715811,1.15470378 42.7595913,0.83013916 42.2378526,0.590454102 C41.7161139,0.350769043 41.1066473,0.230926514 40.4094529,0.230926514 C39.7120449,0.230926514 39.0944963,0.352335612 38.556807,0.595153809 C38.0191178,0.837972005 37.5980668,1.17569224 37.293654,1.60831451 C36.9892411,2.04093679 36.8351833,2.54239909 36.8314805,3.11270142 L36.8314805,3.11953735 C36.8314805,3.8475647 37.0590603,4.44433848 37.5142198,4.9098587 C37.9693793,5.37537893 38.6976914,5.71584066 39.6991563,5.9312439 L40.7741075,6.16046143 C41.4289333,6.30166626 41.8996339,6.49695333 42.1862092,6.74632263 C42.4727845,6.99569194 42.6160722,7.3095754 42.6160722,7.68797302 L42.6160722,7.69480896 C42.6160722,7.99744161 42.5237514,8.26528931 42.3391099,8.49835205 C42.1544684,8.73141479 41.9007732,8.91345723 41.5780244,9.04447937 C41.2552756,9.17550151 40.8847998,9.24101257 40.4665971,9.24101257 C40.0261064,9.24101257 39.63393,9.17993418 39.2900681,9.0577774 C38.9462063,8.93562063 38.6723237,8.76473999 38.4684205,8.5451355 C38.2645173,8.32553101 38.1474697,8.06669108 38.1172776,7.76861572 L38.1104417,7.69715881 L36.6004472,7.69715881 L36.6072831,7.78367615 C36.6540666,8.33525085 36.8368923,8.82060242 37.1557603,9.23973083 C37.4746283,9.65885925 37.9097428,9.98618317 38.4611039,10.2217026 C39.012465,10.457222 39.6602769,10.5749817 40.4045396,10.5749817 Z" id="S"></path>
<path d="M48.6638291,10.3797302 C48.809876,10.3797302 48.9509385,10.3722712 49.0870163,10.3573532 C49.2230942,10.3424352 49.3497727,10.3250071 49.4670517,10.305069 L49.4670517,9.12042236 C49.3627325,9.12953695 49.2713018,9.13658651 49.1927598,9.14157104 C49.1142177,9.14655558 49.0183365,9.14904785 48.9051163,9.14904785 C48.5390376,9.14904785 48.275854,9.06032308 48.1155655,8.88287354 C47.955277,8.70542399 47.8751328,8.41778056 47.8751328,8.01994324 L47.8751328,4.08319092 L49.4670517,4.08319092 L49.4670517,2.90826416 L47.8751328,2.90826416 L47.8751328,1.04119873 L46.3563797,1.04119873 L46.3563797,2.90826416 L45.1955521,2.90826416 L45.1955521,4.08319092 L46.3563797,4.08319092 L46.3563797,8.37968445 C46.3563797,9.09154765 46.5374253,9.60285441 46.8995163,9.91360474 C47.2616074,10.2243551 47.8497117,10.3797302 48.6638291,10.3797302 Z" id="t"></path>
<path d="M53.0823381,10.4612274 C53.4133826,10.4612274 53.7181159,10.4153519 53.9965379,10.3236008 C54.27496,10.2318497 54.5232255,10.0975342 54.7413347,9.9206543 C54.9594438,9.74377441 55.1405249,9.53089905 55.2845781,9.2820282 L55.3989732,9.2820282 L55.3989732,10.335083 L56.8741472,10.335083 L56.8741472,5.25630188 C56.8741472,4.73669942 56.761105,4.29095713 56.5350206,3.91907501 C56.3089362,3.54719289 55.9786394,3.26223755 55.5441301,3.06420898 C55.1096208,2.86618042 54.579444,2.76716614 53.9535997,2.76716614 C53.3911302,2.76716614 52.8929079,2.85181427 52.4589326,3.02111053 C52.0249574,3.1904068 51.6748292,3.42663829 51.4085481,3.72980499 C51.142267,4.0329717 50.979326,4.38828023 50.9197252,4.79573059 L50.9128892,4.84550476 L52.3429887,4.84550476 L52.3511064,4.82243347 C52.4409705,4.55875142 52.6167289,4.35477702 52.8783815,4.21051025 C53.1400341,4.06624349 53.4768287,3.99411011 53.8887651,3.99411011 C54.3884294,3.99411011 54.7650468,4.10223897 55.0186174,4.3184967 C55.2721879,4.53475444 55.3989732,4.84735616 55.3989732,5.25630188 L55.3989732,7.59077454 C55.3989732,7.90992737 55.3162833,8.19618225 55.1509035,8.44953918 C54.9855236,8.70289612 54.7587628,8.90336355 54.4706209,9.05094147 C54.182479,9.19851939 53.8535529,9.27230835 53.4838426,9.27230835 C53.085578,9.27230835 52.756652,9.17656962 52.4970644,8.98509216 C52.2374767,8.79361471 52.1076829,8.52733358 52.1076829,8.18624878 L52.1076829,8.1725769 C52.1076829,7.84053548 52.2278637,7.58198039 52.4682252,7.39691162 C52.7085868,7.21184285 53.0844031,7.10463969 53.5956743,7.07530212 L56.1366136,6.91241455 L56.1366136,5.86448669 L53.3957231,6.02983093 C52.5096859,6.08159892 51.8262168,6.29591624 51.3453157,6.6727829 C50.8644146,7.04964956 50.6239641,7.56994629 50.6239641,8.2336731 L50.6239641,8.24734497 C50.6239641,8.69730632 50.7309358,9.08845011 50.9448793,9.42077637 C51.1588228,9.75310262 51.4513083,10.0095927 51.822336,10.1902466 C52.1933636,10.3709005 52.6133643,10.4612274 53.0823381,10.4612274 Z" id="a"></path>
<path d="M61.6210465,10.3797302 C61.7670935,10.3797302 61.9081559,10.3722712 62.0442338,10.3573532 C62.1803117,10.3424352 62.3069901,10.3250071 62.4242692,10.305069 L62.4242692,9.12042236 C62.3199499,9.12953695 62.2285193,9.13658651 62.1499772,9.14157104 C62.0714351,9.14655558 61.975554,9.14904785 61.8623338,9.14904785 C61.4962551,9.14904785 61.2330715,9.06032308 61.072783,8.88287354 C60.9124945,8.70542399 60.8323503,8.41778056 60.8323503,8.01994324 L60.8323503,4.08319092 L62.4242692,4.08319092 L62.4242692,2.90826416 L60.8323503,2.90826416 L60.8323503,1.04119873 L59.3135972,1.04119873 L59.3135972,2.90826416 L58.1527696,2.90826416 L58.1527696,4.08319092 L59.3135972,4.08319092 L59.3135972,8.37968445 C59.3135972,9.09154765 59.4946427,9.60285441 59.8567338,9.91360474 C60.2188249,10.2243551 60.8069291,10.3797302 61.6210465,10.3797302 Z" id="t"></path>
<path d="M67.040488,10.4762878 C67.5160841,10.4762878 67.9382211,10.4152273 68.3068988,10.2931061 C68.6755766,10.1709849 68.9904392,10.0090942 69.2514865,9.80743408 C69.5125339,9.60577393 69.7228992,9.38342794 69.8825824,9.14039612 C70.0422657,8.8973643 70.1527622,8.65344238 70.214072,8.40863037 L70.2290256,8.34764099 L68.793906,8.34892273 L68.7691257,8.40286255 C68.7119459,8.52946981 68.6098697,8.65903219 68.4628971,8.79154968 C68.3159244,8.92406718 68.1269214,9.03484853 67.8958881,9.12389374 C67.6648548,9.21293894 67.3905094,9.25746155 67.0728519,9.25746155 C66.6579959,9.25746155 66.2988244,9.16544342 65.9953372,8.98140717 C65.6918501,8.79737091 65.4581465,8.53260295 65.2942264,8.18710327 C65.1303063,7.8416036 65.0483463,7.42518107 65.0483463,6.93783569 L65.0483463,6.34460449 C65.0483463,5.83497111 65.1321755,5.40459188 65.299834,5.0534668 C65.4674925,4.70234172 65.6957131,4.43663025 65.9844959,4.2563324 C66.2732786,4.07603455 66.6020979,3.98588562 66.9709537,3.98588562 C67.3407352,3.98588562 67.6670088,4.07231394 67.9497745,4.24517059 C68.2325402,4.41802724 68.4540495,4.67814891 68.6143024,5.02553558 C68.7745553,5.37292226 68.8546817,5.8126119 68.8546817,6.34460449 L68.8546817,6.93537903 L69.5703189,5.95185852 L64.3076084,5.95185852 L64.3076084,7.01239014 L70.3078525,7.01239014 L70.3078525,6.4911499 C70.3078525,5.74738566 70.1734658,5.09635162 69.9046924,4.53804779 C69.635919,3.97974396 69.2515221,3.54502106 68.7515018,3.23387909 C68.2514815,2.92273712 67.6552595,2.76716614 66.962836,2.76716614 C66.2731896,2.76716614 65.672268,2.92873637 65.1600711,3.25187683 C64.6478743,3.57501729 64.2518171,4.02620697 63.9718997,4.60544586 C63.6919823,5.18468475 63.5520236,5.86192322 63.5520236,6.63716125 L63.5520236,6.64399719 C63.5520236,7.42671204 63.692196,8.104894 63.9725406,8.67854309 C64.2528853,9.25219218 64.6531971,9.69522858 65.173476,10.0076523 C65.6937549,10.320076 66.3160923,10.4762878 67.040488,10.4762878 Z" id="e"></path>
<path d="M76.5245352,10.335083 L79.8181753,10.335083 C80.5207815,10.335083 81.1225576,10.2231089 81.6235037,9.99916077 C82.1244497,9.77521261 82.5100927,9.4553477 82.7804327,9.03956604 C83.0507727,8.62378438 83.1859426,8.12878418 83.1859426,7.55456543 L83.1859426,7.54089355 C83.1859426,7.1121521 83.0932302,6.72759501 82.9078054,6.38722229 C82.7223806,6.04684957 82.4635051,5.76978048 82.1311789,5.55601501 C81.7988526,5.34224955 81.4096314,5.21218872 80.9635153,5.16583252 L80.9635153,5.05143738 C81.2900025,4.99475606 81.5831645,4.86469523 81.8430014,4.66125488 C82.1028382,4.45781453 82.3101238,4.20591736 82.4648581,3.90556335 C82.6195923,3.60520935 82.6969595,3.28288778 82.6969595,2.93859863 L82.6969595,2.92492676 C82.6969595,2.4219869 82.5779359,1.98708598 82.3398886,1.620224 C82.1018413,1.25336202 81.7616644,0.970080058 81.3193579,0.770378113 C80.8770514,0.570676168 80.3465719,0.470825195 79.7279196,0.470825195 L76.5245352,0.470825195 L76.5245352,1.72190857 L79.3704214,1.72190857 C79.9368073,1.72190857 80.3774227,1.85058085 80.6922674,2.10792542 C81.0071122,2.36526998 81.1645346,2.72622172 81.1645346,3.19078064 L81.1645346,3.20445251 C81.1645346,3.68218486 80.9911795,4.04548645 80.6444693,4.2943573 C80.2977591,4.54322815 79.7853842,4.66766357 79.1073446,4.66766357 L76.5245352,4.66766357 L76.5245352,5.83746338 L79.4158163,5.83746338 C79.8973227,5.83746338 80.301088,5.89750926 80.6271124,6.01760101 C80.9531368,6.13769277 81.1987499,6.31699371 81.3639517,6.55550385 C81.5291535,6.79401398 81.6117544,7.08943685 81.6117544,7.44177246 L81.6117544,7.45544434 C81.6117544,7.98458862 81.4332902,8.38830058 81.0763617,8.6665802 C80.7194331,8.94485982 80.1962881,9.08399963 79.5069265,9.08399963 L76.5245352,9.08399963 L76.5245352,10.335083 Z M75.7564535,10.335083 L77.2927237,10.335083 L77.2927237,0.470825195 L75.7564535,0.470825195 L75.7564535,10.335083 Z" id="B"></path>
</g>
</g>
<g id="Write-C" transform="translate(66.000000, 206.000000)">
<g id="Background" filter="url(#filter-9)" fill="#FFEEB3">
<g id="RectangleBackground">
<rect id="RectangleBackgroundRectangle" x="0" y="0" width="110" height="40" rx="10"></rect>
</g>
</g>
<g id="Group-4" transform="translate(0.000000, 13.000000)" fill="#000000">
<text id="Time" font-family="-apple-system,sans-serif" font-size="14" font-weight="normal">
<tspan x="0.501953125" y="13">Time</tspan>
</text>
<path id="Line" d="M16.5,340 L21,331 L12,331 L16.5,340 Z M16,22.5 L16,331.5 L16,332 L17,332 L17,331.5 L17,22.5 L17,22 L16,22 L16,22.5 Z" fill-rule="nonzero"></path>
<rect id="Overlay" stroke-opacity="0.25" stroke="#000000" fill="url(#linearGradient-8)" x="-0.5" y="-0.5" width="111" height="41" rx="10"></rect>
<g id="Text" transform="translate(11.800964, 14.396606)" fill="#000000" fill-rule="nonzero">
<polygon id="W" points="2.6602478 10.6033936 4.11064148 10.6033936 6.22476196 3.2358551 6.3168335 3.2358551 8.43714905 10.6033936 9.88380432 10.6033936 12.5440521 0.739135742 10.9479675 0.739135742 9.14648438 8.40296936 9.05451965 8.40296936 6.98429871 0.739135742 5.55718994 0.739135742 3.49957275 8.40296936 3.40750122 8.40296936 1.60099792 0.739135742 0 0.739135742"></polygon>
<path d="M13.6347213,10.6033936 L15.1199355,10.6033936 L15.1199355,6.16729736 C15.1199355,5.80898031 15.2001866,5.49789174 15.3606887,5.23403168 C15.5211908,4.97017161 15.7445515,4.76534271 16.0307708,4.61954498 C16.3169901,4.47374725 16.6492273,4.40084839 17.0274825,4.40084839 C17.1688298,4.40084839 17.3043024,4.40800476 17.4339004,4.4223175 C17.5634983,4.43663025 17.6944137,4.45767212 17.8266463,4.48544312 L17.8266463,3.11590576 C17.75316,3.09924316 17.6570474,3.08416494 17.5383086,3.07067108 C17.4195698,3.05717723 17.299033,3.0504303 17.1766982,3.0504303 C16.6833002,3.0504303 16.2696548,3.15962728 15.9357619,3.37802124 C15.6018691,3.5964152 15.3680587,3.90346273 15.2343307,4.29916382 L15.1199355,4.29916382 L15.1199355,3.17657471 L13.6347213,3.17657471 L13.6347213,10.6033936 Z" id="r"></path>
<path d="M19.1169329,10.6033936 L20.6021471,10.6033936 L20.6021471,3.17657471 L19.1169329,3.17657471 L19.1169329,10.6033936 Z M19.8650408,1.85243225 C20.1230262,1.85243225 20.3428443,1.76151784 20.5244951,1.57968903 C20.7061459,1.39786021 20.7969713,1.18026733 20.7969713,0.9269104 C20.7969713,0.668924967 20.7061459,0.449943542 20.5244951,0.269966125 C20.3428443,0.0899887085 20.1230262,0 19.8650408,0 C19.6116838,0 19.3930407,0.0899887085 19.2091112,0.269966125 C19.0251818,0.449943542 18.933217,0.668924967 18.933217,0.9269104 C18.933217,1.18026733 19.0251818,1.39786021 19.2091112,1.57968903 C19.3930407,1.76151784 19.6116838,1.85243225 19.8650408,1.85243225 Z" id="i"></path>
<path d="M25.412344,10.6480408 C25.5583909,10.6480408 25.6994534,10.6405818 25.8355312,10.6256638 C25.9716091,10.6107457 26.0982876,10.5933177 26.2155666,10.5733795 L26.2155666,9.38873291 C26.1112474,9.39784749 26.0198167,9.40489705 25.9412746,9.40988159 C25.8627326,9.41486613 25.7668514,9.4173584 25.6536312,9.4173584 C25.2875525,9.4173584 25.0243689,9.32863363 24.8640804,9.15118408 C24.7037919,8.97373454 24.6236477,8.68609111 24.6236477,8.28825378 L24.6236477,4.35150146 L26.2155666,4.35150146 L26.2155666,3.17657471 L24.6236477,3.17657471 L24.6236477,1.30950928 L23.1048946,1.30950928 L23.1048946,3.17657471 L21.944067,3.17657471 L21.944067,4.35150146 L23.1048946,4.35150146 L23.1048946,8.647995 C23.1048946,9.35985819 23.2859402,9.87116496 23.6480312,10.1819153 C24.0101223,10.4926656 24.5982265,10.6480408 25.412344,10.6480408 Z" id="t"></path>
<path d="M30.8317854,10.7445984 C31.3073816,10.7445984 31.7295185,10.6835378 32.0981963,10.5614166 C32.466874,10.4392955 32.7817366,10.2774048 33.042784,10.0757446 C33.3038313,9.87408447 33.5141966,9.65173848 33.6738799,9.40870667 C33.8335631,9.16567485 33.9440596,8.92175293 34.0053694,8.67694092 L34.020323,8.61595154 L32.5852034,8.61723328 L32.5604231,8.6711731 C32.5032434,8.79778035 32.4011672,8.92734273 32.2541945,9.05986023 C32.1072218,9.19237773 31.9182189,9.30315908 31.6871855,9.39220428 C31.4561522,9.48124949 31.1818068,9.52577209 30.8641493,9.52577209 C30.4492934,9.52577209 30.0901218,9.43375397 29.7866347,9.24971771 C29.4831475,9.06568146 29.2494439,8.80091349 29.0855238,8.45541382 C28.9216038,8.10991414 28.8396437,7.69349162 28.8396437,7.20614624 L28.8396437,6.61291504 C28.8396437,6.10328166 28.923473,5.67290243 29.0911314,5.32177734 C29.2587899,4.97065226 29.4870106,4.7049408 29.7757933,4.52464294 C30.0645761,4.34434509 30.3933953,4.25419617 30.7622511,4.25419617 C31.1320326,4.25419617 31.4583062,4.34062449 31.7410719,4.51348114 C32.0238376,4.68633779 32.2453469,4.94645945 32.4055998,5.29384613 C32.5658527,5.64123281 32.6459792,6.08092244 32.6459792,6.61291504 L32.6459792,7.20368958 L33.3616164,6.22016907 L28.0989058,6.22016907 L28.0989058,7.28070068 L34.0991499,7.28070068 L34.0991499,6.75946045 C34.0991499,6.01569621 33.9647632,5.36466217 33.6959898,4.80635834 C33.4272165,4.2480545 33.0428196,3.8133316 32.5427992,3.50218964 C32.0427789,3.19104767 31.446557,3.03547668 30.7541335,3.03547668 C30.0644871,3.03547668 29.4635654,3.19704692 28.9513686,3.52018738 C28.4391717,3.84332784 28.0431146,4.29451752 27.7631972,4.87375641 C27.4832798,5.4529953 27.3433211,6.13023376 27.3433211,6.9054718 L27.3433211,6.91230774 C27.3433211,7.69502258 27.4834934,8.37320455 27.7638381,8.94685364 C28.0441827,9.52050273 28.4444945,9.96353912 28.9647734,10.2759628 C29.4850523,10.5883865 30.1073897,10.7445984 30.8317854,10.7445984 Z" id="e"></path>
<path d="M42.8889222,10.8432922 C43.6544048,10.8432922 44.3193599,10.7182515 44.8837876,10.4681702 C45.4482153,10.2180888 45.8843624,9.8641154 46.1922288,9.40625 C46.5000952,8.9483846 46.6540284,8.40514119 46.6540284,7.77651978 L46.6540284,7.76968384 C46.6540284,7.03781128 46.4269471,6.45353444 45.9727845,6.01685333 C45.5186219,5.58017222 44.7736471,5.25081889 43.7378602,5.02879333 L42.662909,4.79402161 C42.0255291,4.65815735 41.567272,4.46812185 41.2881379,4.2239151 C41.0090038,3.97970835 40.8694367,3.67499288 40.8694367,3.30976868 L40.8694367,3.30293274 C40.8694367,2.99253845 40.9568798,2.72857157 41.1317658,2.5110321 C41.3066519,2.29349264 41.5445924,2.12613678 41.8455873,2.00896454 C42.1465821,1.8917923 42.4887706,1.83320618 42.8721528,1.83320618 C43.2704886,1.82950338 43.6187119,1.88830312 43.9168229,2.00960541 C44.2149339,2.13090769 44.4536398,2.29557546 44.6329408,2.5036087 C44.8122417,2.71164195 44.9233969,2.95148722 44.9664063,3.22314453 L44.9800782,3.30944824 L46.4725556,3.30944824 L46.4657197,3.21748352 C46.4296174,2.70357768 46.2604458,2.24190267 45.9582047,1.8324585 C45.6559637,1.42301432 45.2439739,1.09844971 44.7222352,0.858764648 C44.2004965,0.61907959 43.59103,0.499237061 42.8938355,0.499237061 C42.1964275,0.499237061 41.5788789,0.620646159 41.0411897,0.863464355 C40.5035005,1.10628255 40.0824494,1.44400279 39.7780366,1.87662506 C39.4736238,2.30924733 39.3195659,2.81070964 39.3158631,3.38101196 L39.3158631,3.3878479 C39.3158631,4.11587524 39.5434429,4.71264903 39.9986024,5.17816925 C40.4537619,5.64368947 41.1820741,5.9841512 42.1835389,6.19955444 L43.2584901,6.42877197 C43.9133159,6.56997681 44.3840165,6.76526388 44.6705918,7.01463318 C44.9571671,7.26400248 45.1004548,7.57788595 45.1004548,7.95628357 L45.1004548,7.96311951 C45.1004548,8.26575216 45.008134,8.53359985 44.8234925,8.7666626 C44.638851,8.99972534 44.3851558,9.18176778 44.062407,9.31278992 C43.7396582,9.44381205 43.3691824,9.50932312 42.9509797,9.50932312 C42.510489,9.50932312 42.1183127,9.44824473 41.7744508,9.32608795 C41.4305889,9.20393117 41.1567063,9.03305054 40.9528031,8.81344604 C40.7488999,8.59384155 40.6318523,8.33500163 40.6016603,8.03692627 L40.5948243,7.96546936 L39.0848298,7.96546936 L39.0916657,8.05198669 C39.1384492,8.6035614 39.3212749,9.08891296 39.6401429,9.50804138 C39.9590109,9.9271698 40.3941255,10.2544937 40.9454865,10.4900131 C41.4968476,10.7255325 42.1446595,10.8432922 42.8889222,10.8432922 Z" id="S"></path>
<path d="M51.1482117,10.6480408 C51.2942587,10.6480408 51.4353211,10.6405818 51.571399,10.6256638 C51.7074769,10.6107457 51.8341553,10.5933177 51.9514344,10.5733795 L51.9514344,9.38873291 C51.8471151,9.39784749 51.7556845,9.40489705 51.6771424,9.40988159 C51.5986003,9.41486613 51.5027192,9.4173584 51.3894989,9.4173584 C51.0234203,9.4173584 50.7602367,9.32863363 50.5999482,9.15118408 C50.4396597,8.97373454 50.3595154,8.68609111 50.3595154,8.28825378 L50.3595154,4.35150146 L51.9514344,4.35150146 L51.9514344,3.17657471 L50.3595154,3.17657471 L50.3595154,1.30950928 L48.8407624,1.30950928 L48.8407624,3.17657471 L47.6799347,3.17657471 L47.6799347,4.35150146 L48.8407624,4.35150146 L48.8407624,8.647995 C48.8407624,9.35985819 49.0218079,9.87116496 49.383899,10.1819153 C49.74599,10.4926656 50.3340943,10.6480408 51.1482117,10.6480408 Z" id="t"></path>
<path d="M55.5667207,10.729538 C55.8977652,10.729538 56.2024985,10.6836624 56.4809206,10.5919113 C56.7593426,10.5001602 57.0076082,10.3658447 57.2257173,10.1889648 C57.4438264,10.012085 57.6249076,9.79920959 57.7689607,9.55033875 L57.8833559,9.55033875 L57.8833559,10.6033936 L59.3585298,10.6033936 L59.3585298,5.52461243 C59.3585298,5.00500997 59.2454876,4.55926768 59.0194032,4.18738556 C58.7933188,3.81550344 58.463022,3.5305481 58.0285127,3.33251953 C57.5940034,3.13449097 57.0638266,3.03547668 56.4379823,3.03547668 C55.8755128,3.03547668 55.3772905,3.12012482 54.9433153,3.28942108 C54.50934,3.45871735 54.1592119,3.69494883 53.8929307,3.99811554 C53.6266496,4.30128225 53.4637086,4.65659078 53.4041078,5.06404114 L53.3972719,5.11381531 L54.8273714,5.11381531 L54.835489,5.09074402 C54.9253531,4.82706197 55.1011115,4.62308757 55.3627641,4.4788208 C55.6244167,4.33455404 55.9612113,4.26242065 56.3731477,4.26242065 C56.872812,4.26242065 57.2494295,4.37054952 57.503,4.58680725 C57.7565706,4.80306498 57.8833559,5.11566671 57.8833559,5.52461243 L57.8833559,7.85908508 C57.8833559,8.17823792 57.8006659,8.4644928 57.6352861,8.71784973 C57.4699063,8.97120667 57.2431454,9.17167409 56.9550035,9.31925201 C56.6668616,9.46682994 56.3379355,9.5406189 55.9682252,9.5406189 C55.5699607,9.5406189 55.2410346,9.44488017 54.981447,9.25340271 C54.7218594,9.06192525 54.5920656,8.79564412 54.5920656,8.45455933 L54.5920656,8.44088745 C54.5920656,8.10884603 54.7122463,7.85029093 54.9526079,7.66522217 C55.1929694,7.4801534 55.5687857,7.37295024 56.0800569,7.34361267 L58.6209962,7.1807251 L58.6209962,6.13279724 L55.8801057,6.29814148 C54.9940685,6.34990946 54.3105994,6.56422679 53.8296983,6.94109344 C53.3487972,7.3179601 53.1083467,7.83825684 53.1083467,8.50198364 L53.1083467,8.51565552 C53.1083467,8.96561686 53.2153184,9.35676066 53.4292619,9.68908691 C53.6432054,10.0214132 53.935691,10.2779032 54.3067186,10.4585571 C54.6777462,10.639211 55.0977469,10.729538 55.5667207,10.729538 Z" id="a"></path>
<path d="M64.1054292,10.6480408 C64.2514761,10.6480408 64.3925385,10.6405818 64.5286164,10.6256638 C64.6646943,10.6107457 64.7913728,10.5933177 64.9086518,10.5733795 L64.9086518,9.38873291 C64.8043326,9.39784749 64.7129019,9.40489705 64.6343598,9.40988159 C64.5558178,9.41486613 64.4599366,9.4173584 64.3467164,9.4173584 C63.9806377,9.4173584 63.7174541,9.32863363 63.5571656,9.15118408 C63.3968771,8.97373454 63.3167329,8.68609111 63.3167329,8.28825378 L63.3167329,4.35150146 L64.9086518,4.35150146 L64.9086518,3.17657471 L63.3167329,3.17657471 L63.3167329,1.30950928 L61.7979798,1.30950928 L61.7979798,3.17657471 L60.6371522,3.17657471 L60.6371522,4.35150146 L61.7979798,4.35150146 L61.7979798,8.647995 C61.7979798,9.35985819 61.9790254,9.87116496 62.3411164,10.1819153 C62.7032075,10.4926656 63.2913117,10.6480408 64.1054292,10.6480408 Z" id="t"></path>
<path d="M69.5248706,10.7445984 C70.0004667,10.7445984 70.4226037,10.6835378 70.7912815,10.5614166 C71.1599592,10.4392955 71.4748218,10.2774048 71.7358692,10.0757446 C71.9969165,9.87408447 72.2072818,9.65173848 72.3669651,9.40870667 C72.5266483,9.16567485 72.6371448,8.92175293 72.6984546,8.67694092 L72.7134082,8.61595154 L71.2782886,8.61723328 L71.2535083,8.6711731 C71.1963286,8.79778035 71.0942523,8.92734273 70.9472797,9.05986023 C70.800307,9.19237773 70.611304,9.30315908 70.3802707,9.39220428 C70.1492374,9.48124949 69.874892,9.52577209 69.5572345,9.52577209 C69.1423786,9.52577209 68.783207,9.43375397 68.4797199,9.24971771 C68.1762327,9.06568146 67.9425291,8.80091349 67.778609,8.45541382 C67.614689,8.10991414 67.5327289,7.69349162 67.5327289,7.20614624 L67.5327289,6.61291504 C67.5327289,6.10328166 67.6165582,5.67290243 67.7842166,5.32177734 C67.9518751,4.97065226 68.1800958,4.7049408 68.4688785,4.52464294 C68.7576613,4.34434509 69.0864805,4.25419617 69.4553363,4.25419617 C69.8251178,4.25419617 70.1513914,4.34062449 70.4341571,4.51348114 C70.7169228,4.68633779 70.9384321,4.94645945 71.098685,5.29384613 C71.2589379,5.64123281 71.3390644,6.08092244 71.3390644,6.61291504 L71.3390644,7.20368958 L72.0547016,6.22016907 L66.791991,6.22016907 L66.791991,7.28070068 L72.7922351,7.28070068 L72.7922351,6.75946045 C72.7922351,6.01569621 72.6578484,5.36466217 72.389075,4.80635834 C72.1203016,4.2480545 71.7359048,3.8133316 71.2358844,3.50218964 C70.7358641,3.19104767 70.1396422,3.03547668 69.4472187,3.03547668 C68.7575723,3.03547668 68.1566506,3.19704692 67.6444538,3.52018738 C67.1322569,3.84332784 66.7361998,4.29451752 66.4562824,4.87375641 C66.176365,5.4529953 66.0364063,6.13023376 66.0364063,6.9054718 L66.0364063,6.91230774 C66.0364063,7.69502258 66.1765786,8.37320455 66.4569232,8.94685364 C66.7372679,9.52050273 67.1375797,9.96353912 67.6578586,10.2759628 C68.1781375,10.5883865 68.8004749,10.7445984 69.5248706,10.7445984 Z" id="e"></path>
<path d="M82.2927313,10.8432922 C83.0288051,10.8432922 83.6864258,10.7116826 84.2655935,10.4484634 C84.8447612,10.1852442 85.319129,9.81747437 85.6886969,9.34515381 C86.0582647,8.87283325 86.2910782,8.32001241 86.3871374,7.68669128 L86.3883123,7.64920044 L84.863471,7.64920044 L84.8497992,7.67921448 C84.7603623,8.0474294 84.5970297,8.36688487 84.3598013,8.63758087 C84.1225729,8.90827688 83.8281825,9.11684418 83.4766302,9.26328278 C83.1250779,9.40972137 82.7308722,9.48294067 82.294013,9.48294067 C81.7022772,9.48294067 81.1907924,9.32808177 80.7595587,9.01836395 C80.328325,8.70864614 79.9959453,8.26908112 79.7624197,7.69966888 C79.5288941,7.13025665 79.4121313,6.45672099 79.4121313,5.67906189 L79.4121313,5.66539001 C79.4121313,4.88395691 79.5288941,4.20896149 79.7624197,3.64040375 C79.9959453,3.07184601 80.328325,2.63290405 80.7595587,2.32357788 C81.1907924,2.01425171 81.6999985,1.85958862 82.2871771,1.85958862 C82.7203334,1.85958862 83.1123851,1.94160207 83.4633322,2.10562897 C83.8142792,2.26965586 84.110432,2.50024414 84.3517904,2.7973938 C84.5931489,3.09454346 84.7610032,3.44541931 84.8553534,3.85002136 L84.8621893,3.87501526 L86.3814764,3.87501526 L86.3858557,3.83506775 C86.3018306,3.18273417 86.0725419,2.60572052 85.6979895,2.10402679 C85.3234371,1.60233307 84.8426428,1.20944468 84.2556067,0.925361633 C83.6685705,0.641278585 83.0124273,0.499237061 82.2871771,0.499237061 C81.3713751,0.499237061 80.5812368,0.708658854 79.9167624,1.12750244 C79.2522879,1.54634603 78.7396994,2.14148204 78.3789968,2.91291046 C78.0182943,3.68433889 77.8379431,4.60222371 77.8379431,5.66656494 L77.8379431,5.68023682 C77.8379431,6.74087524 78.0182943,7.65690867 78.3789968,8.4283371 C78.7396994,9.19976552 79.2534272,9.79511515 79.9201803,10.214386 C80.5869335,10.6336568 81.3777838,10.8432922 82.2927313,10.8432922 Z" id="C"></path>
</g>
</g>
<g id="Read-C" transform="translate(216.000000, 254.000000)">
<g id="Background" filter="url(#filter-10)" fill="#FFEEB3">
<g id="RectangleBackground">
<rect id="RectangleBackgroundRectangle" x="0" y="0" width="110" height="40" rx="10"></rect>
</g>
</g>
<rect id="Overlay" stroke-opacity="0.25" stroke="#000000" fill="url(#linearGradient-8)" x="-0.5" y="-0.5" width="111" height="41" rx="10"></rect>
<g id="Text" transform="translate(13.356327, 14.664917)" fill="#000000" fill-rule="nonzero">
<path d="M0,10.335083 L1.53627014,10.335083 L1.53627014,6.54081726 L3.61268616,6.54081726 C3.62429301,6.54081726 3.63776906,6.54081726 3.65311432,6.54081726 C3.66845957,6.54081726 3.68150838,6.54081726 3.69226074,6.54081726 L5.70309448,10.335083 L7.47509766,10.335083 L5.26708984,6.30551147 C5.86680094,6.10036214 6.33500926,5.74651337 6.67171478,5.24396515 C7.00842031,4.74141693 7.17677307,4.15795898 7.17677307,3.49359131 L7.17677307,3.47991943 C7.17677307,2.86653646 7.04375712,2.33546956 6.77772522,1.88671875 C6.51169332,1.43796794 6.13302867,1.08979797 5.64173126,0.842208862 C5.15043386,0.594619751 4.56672668,0.470825195 3.89060974,0.470825195 L0,0.470825195 L0,10.335083 Z M1.53627014,5.29667664 L1.53627014,1.75630188 L3.69525146,1.75630188 C4.28898112,1.75630188 4.75437673,1.91345723 5.09143829,2.22776794 C5.42849986,2.54207865 5.59703064,2.97270711 5.59703064,3.51965332 L5.59703064,3.5333252 C5.59703064,4.09308879 5.43501536,4.52692159 5.1109848,4.83482361 C4.78695424,5.14272563 4.32992554,5.29667664 3.73989868,5.29667664 L1.53627014,5.29667664 Z" id="R"></path>
<path d="M11.9391818,10.4762878 C12.4147779,10.4762878 12.8369149,10.4152273 13.2055926,10.2931061 C13.5742704,10.1709849 13.889133,10.0090942 14.1501803,9.80743408 C14.4112277,9.60577393 14.621593,9.38342794 14.7812762,9.14039612 C14.9409595,8.8973643 15.051456,8.65344238 15.1127658,8.40863037 L15.1277194,8.34764099 L13.6925998,8.34892273 L13.6678195,8.40286255 C13.6106397,8.52946981 13.5085635,8.65903219 13.3615909,8.79154968 C13.2146182,8.92406718 13.0256152,9.03484853 12.7945819,9.12389374 C12.5635486,9.21293894 12.2892032,9.25746155 11.9715457,9.25746155 C11.5566897,9.25746155 11.1975182,9.16544342 10.894031,8.98140717 C10.5905439,8.79737091 10.3568403,8.53260295 10.1929202,8.18710327 C10.0290001,7.8416036 9.94704008,7.42518107 9.94704008,6.93783569 L9.94704008,6.34460449 C9.94704008,5.83497111 10.0308693,5.40459188 10.1985278,5.0534668 C10.3661863,4.70234172 10.5944069,4.43663025 10.8831897,4.2563324 C11.1719724,4.07603455 11.5007917,3.98588562 11.8696475,3.98588562 C12.239429,3.98588562 12.5657026,4.07231394 12.8484683,4.24517059 C13.131234,4.41802724 13.3527433,4.67814891 13.5129962,5.02553558 C13.6732491,5.37292226 13.7533755,5.8126119 13.7533755,6.34460449 L13.7533755,6.93537903 L14.4690127,5.95185852 L9.20630217,5.95185852 L9.20630217,7.01239014 L15.2065463,7.01239014 L15.2065463,6.4911499 C15.2065463,5.74738566 15.0721596,5.09635162 14.8033862,4.53804779 C14.5346128,3.97974396 14.1502159,3.54502106 13.6501956,3.23387909 C13.1501753,2.92273712 12.5539533,2.76716614 11.8615298,2.76716614 C11.1718834,2.76716614 10.5709618,2.92873637 10.0587649,3.25187683 C9.54656808,3.57501729 9.15051095,4.02620697 8.87059355,4.60544586 C8.59067615,5.18468475 8.45071745,5.86192322 8.45071745,6.63716125 L8.45071745,6.64399719 C8.45071745,7.42671204 8.59088977,8.104894 8.87123442,8.67854309 C9.15157906,9.25219218 9.55189085,9.69522858 10.0721698,10.0076523 C10.5924487,10.320076 11.2147861,10.4762878 11.9391818,10.4762878 Z" id="e"></path>
<path d="M18.8538244,10.4612274 C19.1848689,10.4612274 19.4896022,10.4153519 19.7680242,10.3236008 C20.0464462,10.2318497 20.2947118,10.0975342 20.512821,9.9206543 C20.7309301,9.74377441 20.9120112,9.53089905 21.0560644,9.2820282 L21.1704595,9.2820282 L21.1704595,10.335083 L22.6456335,10.335083 L22.6456335,5.25630188 C22.6456335,4.73669942 22.5325913,4.29095713 22.3065069,3.91907501 C22.0804225,3.54719289 21.7501256,3.26223755 21.3156164,3.06420898 C20.8811071,2.86618042 20.3509303,2.76716614 19.725086,2.76716614 C19.1626165,2.76716614 18.6643941,2.85181427 18.2304189,3.02111053 C17.7964437,3.1904068 17.4463155,3.42663829 17.1800344,3.72980499 C16.9137533,4.0329717 16.7508123,4.38828023 16.6912115,4.79573059 L16.6843755,4.84550476 L18.114475,4.84550476 L18.1225927,4.82243347 C18.2124568,4.55875142 18.3882151,4.35477702 18.6498678,4.21051025 C18.9115204,4.06624349 19.2483149,3.99411011 19.6602514,3.99411011 C20.1599157,3.99411011 20.5365331,4.10223897 20.7901037,4.3184967 C21.0436742,4.53475444 21.1704595,4.84735616 21.1704595,5.25630188 L21.1704595,7.59077454 C21.1704595,7.90992737 21.0877696,8.19618225 20.9223897,8.44953918 C20.7570099,8.70289612 20.530249,8.90336355 20.2421072,9.05094147 C19.9539653,9.19851939 19.6250392,9.27230835 19.2553289,9.27230835 C18.8570643,9.27230835 18.5281382,9.17656962 18.2685506,8.98509216 C18.008963,8.79361471 17.8791692,8.52733358 17.8791692,8.18624878 L17.8791692,8.1725769 C17.8791692,7.84053548 17.99935,7.58198039 18.2397115,7.39691162 C18.4800731,7.21184285 18.8558894,7.10463969 19.3671606,7.07530212 L21.9080999,6.91241455 L21.9080999,5.86448669 L19.1672094,6.02983093 C18.2811722,6.08159892 17.5977031,6.29591624 17.116802,6.6727829 C16.6359009,7.04964956 16.3954504,7.56994629 16.3954504,8.2336731 L16.3954504,8.24734497 C16.3954504,8.69730632 16.5024221,9.08845011 16.7163656,9.42077637 C16.9303091,9.75310262 17.2227946,10.0095927 17.5938222,10.1902466 C17.9648499,10.3709005 18.3848506,10.4612274 18.8538244,10.4612274 Z" id="a"></path>
<path d="M27.2957616,10.4612274 C27.8174291,10.4612274 28.2748316,10.3469925 28.6679692,10.1185226 C29.0611068,9.8900528 29.3639175,9.57155863 29.5764012,9.16304016 L29.6907964,9.16304016 L29.6907964,10.335083 L31.1760106,10.335083 L31.1760106,0 L29.6907964,0 L29.6907964,4.08543396 L29.5764012,4.08543396 C29.3800817,3.68681335 29.0784103,3.36993917 28.6713872,3.1348114 C28.2643641,2.89968363 27.8058222,2.78211975 27.2957616,2.78211975 C26.6672826,2.78211975 26.1230067,2.93850962 25.6629338,3.25128937 C25.202861,3.56406911 24.8471074,4.00696309 24.5956731,4.57997131 C24.3442388,5.15297953 24.2185216,5.83126831 24.2185216,6.61483765 L24.2185216,6.62850952 C24.2185216,7.40666707 24.3448618,8.08317566 24.5975423,8.65803528 C24.8502227,9.2328949 25.2077387,9.67714183 25.6700902,9.99077606 C26.1324417,10.3044103 26.6743321,10.4612274 27.2957616,10.4612274 Z M27.7184148,9.18792725 C27.3069056,9.18792725 26.9526118,9.08533478 26.6555333,8.88014984 C26.3584549,8.6749649 26.1305369,8.38078817 25.9717793,7.99761963 C25.8130218,7.61445109 25.7336431,7.15808105 25.7336431,6.62850952 L25.7336431,6.61483765 C25.7336431,6.08241781 25.8130218,5.62553151 25.9717793,5.24417877 C26.1305369,4.86282603 26.3586507,4.56937917 26.6561208,4.3638382 C26.9535909,4.15829722 27.3076889,4.05552673 27.7184148,4.05552673 C28.129924,4.05552673 28.4851435,4.1590271 28.7840734,4.36602783 C29.0830032,4.57302856 29.3129862,4.8671875 29.4740224,5.24850464 C29.6350586,5.62982178 29.7155766,6.08569336 29.7155766,6.61611938 L29.7155766,6.62979126 C29.7155766,7.15558879 29.6352544,7.61008962 29.4746099,7.99329376 C29.3139653,8.3764979 29.0841959,8.67140452 28.7853017,8.87801361 C28.4864074,9.0846227 28.1307785,9.18792725 27.7184148,9.18792725 Z" id="d"></path>
<path d="M40.4045396,10.5749817 C41.1700222,10.5749817 41.8349773,10.449941 42.399405,10.1998596 C42.9638327,9.94977824 43.3999798,9.59580485 43.7078462,9.13793945 C44.0157126,8.68007406 44.1696458,8.13683065 44.1696458,7.50820923 L44.1696458,7.50137329 C44.1696458,6.76950073 43.9425645,6.1852239 43.4884019,5.74854279 C43.0342393,5.31186167 42.2892645,4.98250834 41.2534776,4.76048279 L40.1785264,4.52571106 C39.5411464,4.3898468 39.0828894,4.1998113 38.8037553,3.95560455 C38.5246212,3.71139781 38.3850541,3.40668233 38.3850541,3.04145813 L38.3850541,3.03462219 C38.3850541,2.72422791 38.4724971,2.46026103 38.6473832,2.24272156 C38.8222693,2.02518209 39.0602098,1.85782623 39.3612046,1.74065399 C39.6621995,1.62348175 40.004388,1.56489563 40.3877702,1.56489563 C40.786106,1.56119283 41.1343293,1.61999257 41.4324403,1.74129486 C41.7305512,1.86259715 41.9692572,2.02726491 42.1485581,2.23529816 C42.3278591,2.4433314 42.4390143,2.68317668 42.4820237,2.95483398 L42.4956956,3.0411377 L43.988173,3.0411377 L43.9813371,2.94917297 C43.9452348,2.43526713 43.7760631,1.97359212 43.4738221,1.56414795 C43.1715811,1.15470378 42.7595913,0.83013916 42.2378526,0.590454102 C41.7161139,0.350769043 41.1066473,0.230926514 40.4094529,0.230926514 C39.7120449,0.230926514 39.0944963,0.352335612 38.556807,0.595153809 C38.0191178,0.837972005 37.5980668,1.17569224 37.293654,1.60831451 C36.9892411,2.04093679 36.8351833,2.54239909 36.8314805,3.11270142 L36.8314805,3.11953735 C36.8314805,3.8475647 37.0590603,4.44433848 37.5142198,4.9098587 C37.9693793,5.37537893 38.6976914,5.71584066 39.6991563,5.9312439 L40.7741075,6.16046143 C41.4289333,6.30166626 41.8996339,6.49695333 42.1862092,6.74632263 C42.4727845,6.99569194 42.6160722,7.3095754 42.6160722,7.68797302 L42.6160722,7.69480896 C42.6160722,7.99744161 42.5237514,8.26528931 42.3391099,8.49835205 C42.1544684,8.73141479 41.9007732,8.91345723 41.5780244,9.04447937 C41.2552756,9.17550151 40.8847998,9.24101257 40.4665971,9.24101257 C40.0261064,9.24101257 39.63393,9.17993418 39.2900681,9.0577774 C38.9462063,8.93562063 38.6723237,8.76473999 38.4684205,8.5451355 C38.2645173,8.32553101 38.1474697,8.06669108 38.1172776,7.76861572 L38.1104417,7.69715881 L36.6004472,7.69715881 L36.6072831,7.78367615 C36.6540666,8.33525085 36.8368923,8.82060242 37.1557603,9.23973083 C37.4746283,9.65885925 37.9097428,9.98618317 38.4611039,10.2217026 C39.012465,10.457222 39.6602769,10.5749817 40.4045396,10.5749817 Z" id="S"></path>
<path d="M48.6638291,10.3797302 C48.809876,10.3797302 48.9509385,10.3722712 49.0870163,10.3573532 C49.2230942,10.3424352 49.3497727,10.3250071 49.4670517,10.305069 L49.4670517,9.12042236 C49.3627325,9.12953695 49.2713018,9.13658651 49.1927598,9.14157104 C49.1142177,9.14655558 49.0183365,9.14904785 48.9051163,9.14904785 C48.5390376,9.14904785 48.275854,9.06032308 48.1155655,8.88287354 C47.955277,8.70542399 47.8751328,8.41778056 47.8751328,8.01994324 L47.8751328,4.08319092 L49.4670517,4.08319092 L49.4670517,2.90826416 L47.8751328,2.90826416 L47.8751328,1.04119873 L46.3563797,1.04119873 L46.3563797,2.90826416 L45.1955521,2.90826416 L45.1955521,4.08319092 L46.3563797,4.08319092 L46.3563797,8.37968445 C46.3563797,9.09154765 46.5374253,9.60285441 46.8995163,9.91360474 C47.2616074,10.2243551 47.8497117,10.3797302 48.6638291,10.3797302 Z" id="t"></path>
<path d="M53.0823381,10.4612274 C53.4133826,10.4612274 53.7181159,10.4153519 53.9965379,10.3236008 C54.27496,10.2318497 54.5232255,10.0975342 54.7413347,9.9206543 C54.9594438,9.74377441 55.1405249,9.53089905 55.2845781,9.2820282 L55.3989732,9.2820282 L55.3989732,10.335083 L56.8741472,10.335083 L56.8741472,5.25630188 C56.8741472,4.73669942 56.761105,4.29095713 56.5350206,3.91907501 C56.3089362,3.54719289 55.9786394,3.26223755 55.5441301,3.06420898 C55.1096208,2.86618042 54.579444,2.76716614 53.9535997,2.76716614 C53.3911302,2.76716614 52.8929079,2.85181427 52.4589326,3.02111053 C52.0249574,3.1904068 51.6748292,3.42663829 51.4085481,3.72980499 C51.142267,4.0329717 50.979326,4.38828023 50.9197252,4.79573059 L50.9128892,4.84550476 L52.3429887,4.84550476 L52.3511064,4.82243347 C52.4409705,4.55875142 52.6167289,4.35477702 52.8783815,4.21051025 C53.1400341,4.06624349 53.4768287,3.99411011 53.8887651,3.99411011 C54.3884294,3.99411011 54.7650468,4.10223897 55.0186174,4.3184967 C55.2721879,4.53475444 55.3989732,4.84735616 55.3989732,5.25630188 L55.3989732,7.59077454 C55.3989732,7.90992737 55.3162833,8.19618225 55.1509035,8.44953918 C54.9855236,8.70289612 54.7587628,8.90336355 54.4706209,9.05094147 C54.182479,9.19851939 53.8535529,9.27230835 53.4838426,9.27230835 C53.085578,9.27230835 52.756652,9.17656962 52.4970644,8.98509216 C52.2374767,8.79361471 52.1076829,8.52733358 52.1076829,8.18624878 L52.1076829,8.1725769 C52.1076829,7.84053548 52.2278637,7.58198039 52.4682252,7.39691162 C52.7085868,7.21184285 53.0844031,7.10463969 53.5956743,7.07530212 L56.1366136,6.91241455 L56.1366136,5.86448669 L53.3957231,6.02983093 C52.5096859,6.08159892 51.8262168,6.29591624 51.3453157,6.6727829 C50.8644146,7.04964956 50.6239641,7.56994629 50.6239641,8.2336731 L50.6239641,8.24734497 C50.6239641,8.69730632 50.7309358,9.08845011 50.9448793,9.42077637 C51.1588228,9.75310262 51.4513083,10.0095927 51.822336,10.1902466 C52.1933636,10.3709005 52.6133643,10.4612274 53.0823381,10.4612274 Z" id="a"></path>
<path d="M61.6210465,10.3797302 C61.7670935,10.3797302 61.9081559,10.3722712 62.0442338,10.3573532 C62.1803117,10.3424352 62.3069901,10.3250071 62.4242692,10.305069 L62.4242692,9.12042236 C62.3199499,9.12953695 62.2285193,9.13658651 62.1499772,9.14157104 C62.0714351,9.14655558 61.975554,9.14904785 61.8623338,9.14904785 C61.4962551,9.14904785 61.2330715,9.06032308 61.072783,8.88287354 C60.9124945,8.70542399 60.8323503,8.41778056 60.8323503,8.01994324 L60.8323503,4.08319092 L62.4242692,4.08319092 L62.4242692,2.90826416 L60.8323503,2.90826416 L60.8323503,1.04119873 L59.3135972,1.04119873 L59.3135972,2.90826416 L58.1527696,2.90826416 L58.1527696,4.08319092 L59.3135972,4.08319092 L59.3135972,8.37968445 C59.3135972,9.09154765 59.4946427,9.60285441 59.8567338,9.91360474 C60.2188249,10.2243551 60.8069291,10.3797302 61.6210465,10.3797302 Z" id="t"></path>
<path d="M67.040488,10.4762878 C67.5160841,10.4762878 67.9382211,10.4152273 68.3068988,10.2931061 C68.6755766,10.1709849 68.9904392,10.0090942 69.2514865,9.80743408 C69.5125339,9.60577393 69.7228992,9.38342794 69.8825824,9.14039612 C70.0422657,8.8973643 70.1527622,8.65344238 70.214072,8.40863037 L70.2290256,8.34764099 L68.793906,8.34892273 L68.7691257,8.40286255 C68.7119459,8.52946981 68.6098697,8.65903219 68.4628971,8.79154968 C68.3159244,8.92406718 68.1269214,9.03484853 67.8958881,9.12389374 C67.6648548,9.21293894 67.3905094,9.25746155 67.0728519,9.25746155 C66.6579959,9.25746155 66.2988244,9.16544342 65.9953372,8.98140717 C65.6918501,8.79737091 65.4581465,8.53260295 65.2942264,8.18710327 C65.1303063,7.8416036 65.0483463,7.42518107 65.0483463,6.93783569 L65.0483463,6.34460449 C65.0483463,5.83497111 65.1321755,5.40459188 65.299834,5.0534668 C65.4674925,4.70234172 65.6957131,4.43663025 65.9844959,4.2563324 C66.2732786,4.07603455 66.6020979,3.98588562 66.9709537,3.98588562 C67.3407352,3.98588562 67.6670088,4.07231394 67.9497745,4.24517059 C68.2325402,4.41802724 68.4540495,4.67814891 68.6143024,5.02553558 C68.7745553,5.37292226 68.8546817,5.8126119 68.8546817,6.34460449 L68.8546817,6.93537903 L69.5703189,5.95185852 L64.3076084,5.95185852 L64.3076084,7.01239014 L70.3078525,7.01239014 L70.3078525,6.4911499 C70.3078525,5.74738566 70.1734658,5.09635162 69.9046924,4.53804779 C69.635919,3.97974396 69.2515221,3.54502106 68.7515018,3.23387909 C68.2514815,2.92273712 67.6552595,2.76716614 66.962836,2.76716614 C66.2731896,2.76716614 65.672268,2.92873637 65.1600711,3.25187683 C64.6478743,3.57501729 64.2518171,4.02620697 63.9718997,4.60544586 C63.6919823,5.18468475 63.5520236,5.86192322 63.5520236,6.63716125 L63.5520236,6.64399719 C63.5520236,7.42671204 63.692196,8.104894 63.9725406,8.67854309 C64.2528853,9.25219218 64.6531971,9.69522858 65.173476,10.0076523 C65.6937549,10.320076 66.3160923,10.4762878 67.040488,10.4762878 Z" id="e"></path>
<path d="M79.8083487,10.5749817 C80.5444225,10.5749817 81.2020432,10.4433721 81.7812109,10.1801529 C82.3603786,9.9169337 82.8347464,9.54916382 83.2043142,9.07684326 C83.5738821,8.60452271 83.8066956,8.05170186 83.9027548,7.41838074 L83.9039297,7.38088989 L82.3790884,7.38088989 L82.3654165,7.41090393 C82.2759797,7.77911886 82.1126471,8.09857432 81.8754187,8.36927032 C81.6381903,8.63996633 81.3437999,8.84853363 80.9922476,8.99497223 C80.6406953,9.14141083 80.2464895,9.21463013 79.8096304,9.21463013 C79.2178946,9.21463013 78.7064098,9.05977122 78.275176,8.75005341 C77.8439423,8.44033559 77.5115627,8.00077057 77.2780371,7.43135834 C77.0445115,6.86194611 76.9277487,6.18841044 76.9277487,5.41075134 L76.9277487,5.39707947 C76.9277487,4.61564636 77.0445115,3.94065094 77.2780371,3.3720932 C77.5115627,2.80353546 77.8439423,2.36459351 78.275176,2.05526733 C78.7064098,1.74594116 79.2156159,1.59127808 79.8027945,1.59127808 C80.2359508,1.59127808 80.6280025,1.67329152 80.9789495,1.83731842 C81.3298966,2.00134532 81.6260494,2.23193359 81.8674078,2.52908325 C82.1087662,2.82623291 82.2766205,3.17710876 82.3709707,3.58171082 L82.3778067,3.60670471 L83.8970938,3.60670471 L83.901473,3.5667572 C83.817448,2.91442362 83.5881592,2.33740997 83.2136068,1.83571625 C82.8390544,1.33402252 82.3582602,0.941134135 81.771224,0.657051086 C81.1841879,0.372968038 80.5280447,0.230926514 79.8027945,0.230926514 C78.8869925,0.230926514 78.0968542,0.440348307 77.4323797,0.859191895 C76.7679052,1.27803548 76.2553167,1.87317149 75.8946142,2.64459991 C75.5339117,3.41602834 75.3535604,4.33391317 75.3535604,5.39825439 L75.3535604,5.41192627 C75.3535604,6.4725647 75.5339117,7.38859812 75.8946142,8.16002655 C76.2553167,8.93145498 76.7690446,9.52680461 77.4357977,9.94607544 C78.1025508,10.3653463 78.8934011,10.5749817 79.8083487,10.5749817 Z" id="C"></path>
</g>
</g>
</g>
</svg>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Loaded 100 of 856 files, more files were not shown because too many files have changed in this diff. Show more