Commit Graph
280 Commits
Author SHA1 Message Date
Gwendal Roué b1d93112da Embed a copy of sqlite3.h in order to work around my inability at importing <sqlite3.h> from all targeted SDKs (addresses #166, #170) 2017-03-26 15:37:31 +02:00
Gwendal Roué 7a90b9ce23 Add availability checks for FTS3 unicode61 tokenizer, FTS4 unindexed columns, and partial indexes. 2017-03-26 14:41:15 +02:00
Gwendal Roué b159c30cf1 SQLITE_CONSTRAINT_FOREIGNKEY was added in SQLite 3.7.16 (iOS 8.2+ and OS X 10.10+) 2017-03-26 13:17:59 +02:00
Gwendal Roué 5c7712bf6c PRAGMA query_only was added in SQLite 3.8.0 (iOS 8.2+ and OS X 10.10+) 2017-03-26 13:17:25 +02:00
Gwendal Roué 8d4522227c Replace all assertNoError and try! with throwing tests 2017-03-25 16:31:54 +01:00
Gwendal Roué bd58c18bb0 Simplify cursor step failure steps 2017-03-25 14:14:42 +01:00
Gwendal Roué 4e82a482d1 DatabaseCursor: test preservation of custom error codes 2017-03-25 14:12:47 +01:00
Gwendal Roué f2bb8bb8af Remove DatabaseValue.value() 2017-03-24 20:05:02 +01:00
Gwendal Roué 88f206e7f5 New DatabaseReader.read() guarantee: database modifications are prevented 2017-03-24 09:18:24 +01:00
Gwendal Roué 7a10486492 DatabaseError conversion to NSError preserves extended result code 2017-03-03 08:14:36 +01:00
Gwendal Roué 842831d729 Merge branch 'master' into RequestFetchCount 2017-03-02 13:01:13 +01:00
Gwendal Roué 77593c8031 Fix RequestTests.swift so that it tests the Request protocol, not the concrete type that adopts it. 2017-03-02 10:54:27 +01:00
Gwendal Roué 846604cce5 Merge branch 'master' into Issue171 2017-03-01 14:12:31 +01:00
Gwendal Roué b1ea970f62 #171: ResultCode tests 2017-03-01 13:57:51 +01:00
Gwendal Roué fc18b15106 #171: Apply @hartbit's suggestion of having two DatabaseError properties: resultCode and extendedResultCode 2017-03-01 09:05:06 +01:00
Gwendal Roué 8a4686984a Tests for Request.fetchCount() (https://github.com/groue/GRDB.swift/issues/176#issuecomment-282783884) 2017-03-01 08:06:54 +01:00
Gwendal Roué e4a346995b #171: rename ResultCode.code into ResultCode.resultCode (@hartbit's suggestion) 2017-02-26 17:24:44 +01:00
Gwendal Roué f0d1f2387d #171: always use extended result codes 2017-02-26 15:49:14 +01:00
Gwendal Roué 7eb592df79 #171: introduce ResultCode 2017-02-26 15:36:21 +01:00
Gwendal Roué 519d4470e3 Drop Configuration.fileAttributes 2017-01-20 08:22:46 +01:00
Gwendal Roué 0f34ee7d16 Revert "DatabaseError.code is now Database.ResultCode"
This reverts commit 968942f128.
2016-12-29 13:32:29 +01:00
Gwendal Roué 968942f128 DatabaseError.code is now Database.ResultCode 2016-12-28 11:55:47 +01:00
Gwendal Roué 92d78515c4 Failing test for cached select statements that have failed 2016-12-21 18:53:55 +01:00
Gwendal Roué 341bedd7ca Failing test for cached select statements that have failed 2016-12-21 18:46:01 +01:00
Gwendal Roué df15249f23 Tests for StatementArguments.append(contentsOf:) and operators +, &+, += 2016-12-16 05:02:01 +01:00
Gwendal Roué b737321cbd Rows expressed as dictionary literals now preserve column ordering, and allow duplicated column names 2016-12-16 05:01:07 +01:00
Gwendal Roué fc2689e207 Fix Pool.get when an error prevents a pool item from being created (counting semaphore wasn't signaled). This fixes DatabasePool.read when read connection can not be established. Tests. 2016-12-15 08:09:17 +01:00
Gwendal Roué 6afc2fd75a Test that DatabasePool.read and readFromCurrentState open a transaction 2016-12-15 03:58:44 +01:00
Gwendal Roué 46f24c582c Fix failing tests for Database.isInsideTransaction 2016-12-14 08:59:57 +01:00
Gwendal Roué 2068710a30 Failing test for Database.isInsideTransaction when transaction is implicitly rollbacked 2016-12-14 08:19:13 +01:00
Gwendal Roué 0568b5c6de Tests for free BEGIN/COMMIT/ROLLBACK statements 2016-12-14 08:11:20 +01:00
Gwendal Roué cb81e50f71 Request.adapted(_:) 2016-12-11 21:07:52 +01:00
Gwendal Roué 66daa2eb29 RangeRowAdapter(CountableClosedRange<Int>) 2016-12-09 09:54:25 +01:00
Gwendal Roué f6513932b0 Documentation 2016-12-09 08:48:26 +01:00
Gwendal Roué 1d6671c11a Introduce RangeRowAdapter 2016-12-08 19:07:11 +01:00
Gwendal Roué cb08660a78 Rename FetchRequest -> Request 2016-12-08 13:56:05 +01:00
Gwendal Roué 0e2a96b402 Failing tests from TypedFetchRequest 2016-12-08 08:39:06 +01:00
Gwendal Roué 67035b8422 Database.execute(_:) iterates all rows of statements 2016-12-02 08:28:24 +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é 019363e56b Failing tests for DatabasePool.read 2016-12-01 10:44:18 +01:00
Gwendal Roué d801f1f5fb Failing test for DatabasePool.readFromCurrentState 2016-12-01 08:56:04 +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é f495edfb3a Improve Cursor test coverage 2016-11-29 21:11:12 +01:00
Gwendal Roué 0c4fb36827 Add RowFetchTests 2016-11-28 20:48:38 +01:00
Gwendal Roué ec2017ff72 Cursor.enumerated, filter, flatMap, map now return cursors. Cursor.lazy returns a lazy sequence. Introduce AnyCursor. Force Cursor types to be classes. 2016-11-28 20:34:53 +01:00
Gwendal Roué bbe0bfadd9 #147: fetchCursor, fetchAll & fetchOne all throw sqlite3_prepare_v2 errors, sqlite3_step errors, and conversion errors (for DatabaseValueConvertible) 2016-11-27 20:13:58 +01:00
Gwendal Roué ebf9b0e4f1 Simplify tests for RowConvertible fetch requests 2016-11-27 18:44:54 +01:00
Gwendal Roué b85a8b8b0b #147: DatabaseValueConvertible.fetchOne() can throw conversion errors 2016-11-27 18:21:04 +01:00
Gwendal Roué ac6c7f6a35 #147: fetchAll() and fetchOne() can now throw database errors. 2016-11-26 22:38:40 +01:00