Commit Graph
317 Commits
Author SHA1 Message Date
Gwendal Roué 1c9416fbed Cleanup 2016-12-02 06:38:13 +01:00
Gwendal Roué b8d924ab6f Restore DatabasePool in a stable state 2016-12-01 19:17:19 +01:00
Gwendal Roué f781da41a4 WIP: the recent failing tests of DatabasePool.readFromCurrentState, a paramount brick of FetchedRecordsController, have led to a refactoring of the DatabaseWriter protocol, and DatabasePool.write { ... } always executing a transaction. 2016-12-01 14:12:20 +01:00
Gwendal Roué bd32afbed2 Rename DatabaseWriter.readFromWrite to readFromCurrentState 2016-12-01 08:55:47 +01:00
Gwendal Roué c539166747 Cleanup 2016-12-01 06:08:30 +01:00
Gwendal Roué 5c44f55ef6 FetchedRecordsController: remove some crash opportunities by compiling the fetch request statement right from the initializer and the setRequest() method. 2016-11-30 13:27:51 +01:00
Gwendal Roué 095778cf0f Documentation 2016-11-30 10:53:57 +01:00
Gwendal Roué 2cec3f29d1 Statement.fetchCursor() no longer throws. TODO: Type.fetchCursor(statement) should not throw 2016-11-30 09:18:22 +01:00
Gwendal Roué 6bcab179d1 Classify all try! and fatalError into TODO, Programmer Error, or GRDB bug that needs to be fixed. 2016-11-30 08:56:45 +01:00
Gwendal Roué 972789dba3 Replace Array(Type.fetchCursor()) with Type.fetchAll() 2016-11-29 19:02:58 +01:00
Gwendal Roué 527aed0ea3 Documentation 2016-11-29 14:17:41 +01:00
Gwendal Roué a8e266377c Documentation 2016-11-29 12:02:29 +01:00
Gwendal Roué ee99abc266 Replace fetchCursor().next() with fetchOne() 2016-11-28 08:41:59 +01:00
Gwendal Roué f8029a6dc9 Remove a couple try! 2016-11-27 15:38:36 +01:00
Gwendal Roué 09697f2593 DAO.init() throws DatabaseError instead of crashing whenever table does not exist, or database can't be accessed 2016-11-27 15:23:00 +01:00
Gwendal Roué b8c05e551d Cleanup 2016-11-27 15:14:38 +01:00
Gwendal Roué 829eb7d3a2 SelectStatement.SelectionInfo cleanup 2016-11-27 15:12:08 +01:00
Gwendal Roué 268080cbc5 #147: FetchedRecordsController.performFetch() can now throw database errors; remove work around for SR-2623 2016-11-27 08:19:43 +01:00
Gwendal Roué 8d9d0dd826 DatabasePool.nonIsolatedRead(_:) can now throw on macOS, too 2016-11-27 06:26:50 +01:00
Gwendal Roué 195c201f87 #147: DatabasePool.read(_:) and DatabasePool.nonIsolatedRead(_:) can now throw database errors. 2016-11-26 23:44:14 +01:00
Gwendal Roué ac6c7f6a35 #147: fetchAll() and fetchOne() can now throw database errors. 2016-11-26 22:38:40 +01:00
Gwendal Roué af6e31dcdf #147: The fetch method have been removed, along with DatabaseSequence and DatabaseIterator. 2016-11-26 21:14:10 +01:00
Gwendal Roué ae1010166a #147: record.exists(_:) can now throw a database error 2016-11-26 11:36:07 +01:00
Gwendal Roué 1aeb6d0d9e bugfix 2016-11-26 11:13:36 +01:00
Gwendal Roué c80f0d317a #147: Array(cursor) initialiser; base all fetchAll and fetchOne methods on fetchCursor. 2016-11-26 09:13:39 +01:00
Gwendal Roué 8215791051 cleanup 2016-11-26 08:37:53 +01:00
Gwendal Roué ab62abed79 #147: use cursor 2016-11-26 08:29:51 +01:00
Gwendal Roué 2eb190dbbb Base DatabaseSequence on DatabaseCursor (addresses #147) 2016-11-26 00:56:37 +01:00
Gwendal Roué b9fea2ea12 Introduce DatabaseCursor (addresses #147)
let cursor = try Row.fetchCursor(db, "SELECT * FROM persons)
while let row = try cursor.step() { ... }
2016-11-25 18:34:16 +01:00
Gwendal Roué 235fa57423 FetchedRecordsController cleanup 2016-11-23 12:48:28 +01:00
Gwendal Roué 90f0ebde1d FetchedRecordsController cleanup 2016-11-23 09:26:09 +01:00
Gwendal Roué e016725814 FetchedRecordsController cleanup 2016-11-23 08:54:02 +01:00
Gwendal Roué 3f449a40ad FetchedRecordsController cleanup 2016-11-23 08:12:58 +01:00
Gwendal Roué 23dc818eac Documentation 2016-11-06 12:48:05 +01:00
Gwendal Roué ad4d2831c9 Improve FetchedRecordsController misuse feedback 2016-11-06 12:37:28 +01:00
Gwendal Roué 7dfa4bcdb5 FetchedRecordsController: restore default record comparator 2016-10-29 10:49:32 +02:00
Gwendal Roué df120ec4a3 FetchedRecordsController: default record comparator now compares rows 2016-10-29 07:25:56 +02:00
Gwendal Roué 6dfa6a3710 FetchedRecordsController.isSameRecord is an iOS-only tool 2016-10-28 19:42:02 +02:00
Gwendal Roué 7ae39a00cb Naming things is hard 2016-10-28 19:22:52 +02:00
Gwendal Roué caf5ee7412 Fix the compareRecordsByPrimaryKey option of FetchedRecordsController when record has no primary key but has selectsRowID set to true 2016-10-17 20:17:37 +02:00
Gwendal Roué 34b7cda2ec Fix failing test for FetchedRecordsController: when the request changes, we now do update the tracked tables and columns 2016-10-17 13:34:46 +02:00
Gwendal Roué a4aab9f4c2 TableMapping.selectsRowID test 2016-10-08 08:33:19 +02:00
Gwendal Roué 2d6abc088f TableMapping.selectsRowID + passing tests for FTS3Record 2016-10-07 19:17:40 +02:00
Gwendal Roué 915e72584c fetchOne(_🔑), fetch(_:keys:), fetchAll(_:keys:), deleteOne(_🔑), and deleteAll(_:keys:) now assumes a rowID primary key when table has no explicit primary key. 2016-10-07 17:47:29 +02:00
Gwendal Roué 22ef3c8b2a Persistable DAO assumes "rowid" as a default primary key, so that a record that exposes "rowid" in its persistentDictionary can be updated, and deleted. 2016-10-07 17:44:38 +02:00
Gwendal Roué 1244b6b283 Move == operators inside their adopting type 2016-09-30 06:00:50 +02:00
Gwendal Roué 5a572b25a0 Refactor the query interface types to enhance extensibility 2016-09-27 23:11:21 +02:00
Gwendal Roué 0c525a8e52 Only the IGNORE conflict policy invalidates the last inserted rowID (#118) 2016-09-16 19:37:14 +02:00
Gwendal Roué 4ac562a55a Fixes #118 2016-09-16 13:52:43 +02:00
Gwendal Roué f573046107 Merge branch 'Swift2.3' of github.com:groue/GRDB.swift
Conflicts:
	CHANGELOG.md
	GRDB.swift.podspec
	GRDB/Core/DatabaseValue.swift
	GRDB/Core/Row.swift
	GRDB/Core/RowAdapter.swift
	GRDB/Record/Record.swift
	README.md
	Support/Info.plist
	Tests/Public/Core/DatabaseValue/DatabaseValueTests.swift
	Tests/Public/Record/MinimalPrimaryKeyRowIDTests.swift
	Tests/Public/Record/MinimalPrimaryKeySingleTests.swift
	Tests/Public/Record/PrimaryKeyMultipleTests.swift
	Tests/Public/Record/PrimaryKeyRowIDTests.swift
	Tests/Public/Record/PrimaryKeySingleTests.swift
	Tests/Public/Record/PrimaryKeySingleWithReplaceConflictResolutionTests.swift
2016-09-16 06:46:42 +02:00