Commit Graph
204 Commits
Author SHA1 Message Date
Gwendal Roué b16656bd23 Partial update WIP: cache & column case insensitivity 2016-07-28 19:28:46 +02:00
Gwendal Roué 548ff068fd Partial update WIP: implementation 2016-07-28 08:41:22 +02:00
Gwendal Roué 0e46ff2b6d Documentation 2016-07-21 19:10:41 +02:00
Gwendal Roué fcf90a053a Database.indexes(on:) and Database.table(_:hasUniqueKey:) are public 2016-07-21 19:08:27 +02:00
Gwendal Roué df32c1c5d5 Allow SelectStatement to perform database changes - Fixes #80 and #82 for good. 2016-07-18 12:57:38 +02:00
Gwendal Roué 34ff64b103 Rename DatabaseScheduler to SchedulingWatchdog 2016-07-08 18:22:34 +02:00
Gwendal Roué e664ab18ee Fixes #80 2016-07-08 14:30:45 +02:00
Gwendal Roué d35b65c9d2 #56: cleanup
- Dabase.indexes(tableName) returns actual indexes (no more fake index on INTEGER PRIMARY KEY column)
- Database.colums(_:uniquelyIdentifyRowsIn:) checks indexes, and primary key
- DatabaseSchemaCache caches table indexes (with invalidation on CREATE/DROP INDEX statements)
2016-07-06 19:09:25 +02:00
Gwendal Roué baff716ef6 #56: fetchOne(_:key:Dictionary) performs the same unique index check as deleteOne() 2016-07-06 08:18:14 +02:00
Gwendal Roué 1141676223 #56: Database.indexes(tableName) includes the implicit unique index on INTEGER PRIMARY KEY column. 2016-07-05 22:33:56 +02:00
Gwendal Roué a6ce80d39b #56: TableMapping.deleteOne(_🔑), TableMapping.deleteAll(_:keys:) 2016-07-05 22:16:23 +02:00
Gwendal Roué e0ea5af18e Refactor database events filtering 2016-06-20 20:38:31 +02:00
Gwendal Roué 6a466fcb12 Detailed database changes observation 2016-06-20 15:21:14 +02:00
Gwendal Roué 219899fc9b Query Interface arguments to SQL snippets 2016-06-18 14:49:17 +02:00
swiftlyfalling 003a6ef4d2 Added missing call to uninstall the preupdate hook 2016-06-03 12:45:28 -04:00
Gwendal Roué cd85b54dd7 #63 follow-up: let DatabaseEventType dispatch events to the correct TransactionObserver method so that we avoid runtime checks on events type 2016-06-03 08:37:53 +02:00
Gwendal Roué 6dd04142b3 #63 follow-up: remove DatabaseEventType from public API 2016-06-03 08:31:17 +02:00
swiftlyfalling 901b7a0f12 Add support for SQLite Pre-Update Hooks (+ tests)
If SQLITE_ENABLE_PREUPDATE_HOOK is defined, and GRDB is built with a
custom SQLite library with the functionality (see: GRDBCustomSQLite),
enable support for SQLite Pre-Update Hooks and the new
`willChangeWithEvent` callback on TransactionObservers.
2016-06-01 20:42:21 -04:00
swiftlyfalling 5cb4044408 Merge remote-tracking branch 'groue/master' into Custom-SQLite 2016-05-31 17:33:59 -04:00
Gwendal Roué df5a327da4 Top-level Database.inSavepoint opens a transaction if the default transaction kind is not DEFERRED 2016-05-31 13:09:33 +02:00
Gwendal Roué fe7e39776b Documentation 2016-05-31 06:49:35 +02:00
Gwendal Roué da33e480c3 Improve Database.execute() detection of white-space string endings 2016-05-31 06:47:44 +02:00
swiftlyfalling 30bc7e4f6c Replace most uses of #if SQLITE_HAS_CODEC with the appropriate USING_BUILTIN_SQLITE or USING_SQLCIPHER defines.
This enables easier compilation of a custom version of SQLite that
itself uses the SQLITE_HAS_CODEC define. (ex. If building SQLite with
the SQLite Encryption Extension.)
The SQLITE_HAS_CODEC define is now only used to guard use of the SQLite
encryption APIs.
GRDBCipher builds define USING_BUILTIN_SQLITE and USING_SQLCIPHER.
2016-05-30 18:19:45 -04:00
Gwendal Roué 90f304a881 Typo 2016-05-30 12:33:42 +02:00
Gwendal Roué ce7736a4b8 Failed statements can not be reused: remove them from the statement cache. 2016-05-30 12:21:20 +02:00
Gwendal Roué 9d00189ac0 Inner Documentation 2016-05-30 07:46:40 +02:00
Gwendal Roué 3af2d7c0df Inner Documentation 2016-05-29 20:03:33 +02:00
Gwendal Roué 098e9fee8c Issue #61: TODO 2016-05-28 20:40:51 +02:00
Gwendal Roué ee7f505cde Issue #61: add savepoint sanity check 2016-05-28 20:39:02 +02:00
Gwendal Roué 4581850b05 Issue #61: since savepoint names can be reused and nested, there is no purpose forcing the user to name them: use a single default savepoint name. And provide thorough testing. 2016-05-28 18:57:07 +02:00
Gwendal Roué bc757016af Issue #61: Database.inSavepoint(named:) 2016-05-28 18:46:12 +02:00
Gwendal Roué 2cf606bdbd Issue #61: pass all tests for TransactionObserver and savepoints :-) 2016-05-28 15:59:20 +02:00
Gwendal Roué 03a5671bb0 Issue #61: prevent SelectStatement from hiding the update statements we track 2016-05-28 14:51:54 +02:00
Gwendal Roué 37c16fbb48 Issue #61: recognize savepoints statements 2016-05-28 14:44:37 +02:00
Gwendal Roué 92431f20d7 Issue #61: DatabaseEvent.copy() returns an event that can outlive a transaction observer’s databaseDidChangeWithEvent callback. 2016-05-28 14:27:25 +02:00
Gwendal Roué 8d540751e1 Issue #60: PrimaryKey documentation 2016-05-28 12:03:58 +02:00
Gwendal Roué fc8b2ee679 Issue #60: make cachedUpdateStatement() and cachedSelectStatement() public 2016-05-25 08:55:05 +02:00
Gwendal Roué bc512e775c Issue #60: make PrimaryKey public 2016-05-25 08:41:54 +02:00
Gwendal Roué 9794b72607 Fixes #55 2016-05-21 15:08:16 +02:00
Gwendal Roué 9dbf992c40 Configuration.maximumReaderCount replaces DatabasePool initializer option 2016-05-19 18:10:36 +02:00
Gwendal Roué 92e1336db0 Fix issue #54 2016-05-19 14:00:45 +02:00
Gwendal Roué 60fafd399f Fix Database closing in GRDBCipher targets 2016-05-18 19:20:09 +02:00
Gwendal Roué f553f2d2b0 Remove Row subscripting by column name; row.databaseValue(named:) returns an optional DatabaseValue 2016-05-18 19:03:29 +02:00
Gwendal Roué a7266e38c4 Issue #51: Database.close() logs when sqlite_close() fails 2016-05-17 20:30:50 +02:00
Gwendal Roué c1169f0d2c Issue #51: Restore statement caching, now that the database is closed in the correct queue. 2016-05-17 20:08:55 +02:00
Gwendal Roué c13ac87a5b Database.primaryKey(): work around an SQLite bug 2016-05-17 19:40:17 +02:00
Gwendal Roué d5367fc2b2 Issue #51: Perform Database.close() in the correct queue 2016-05-17 19:03:07 +02:00
Gwendal Roué 6f779faa05 Documentation 2016-05-17 13:45:39 +02:00
Gwendal Roué 82fa559962 Issue #51: sqlite3_close_v2() is not available until iOS 8.2 and OS X 10.10. Until then, use sqlite3_close(), and avoid caching statements. Disable the concurrency tests that check database deallocation while some statements are running. 2016-05-17 13:39:29 +02:00
Gwendal Roué 10d20748ad SQLITE_FULL, SQLITE_IOERR, SQLITE_BUSY, and SQLITE_NOMEM errors can mean that a transaction has been automatically rollbacked: update isInsideTransaction flag accordingly. 2016-05-09 20:52:36 +02:00