Commit Graph
674 Commits
Author SHA1 Message Date
Gwendal Roué c2fb23c69c Stop using String.characters view 2017-10-10 08:15:28 +02:00
Gwendal Roué a91da59448 Database.primaryKey(_:) no longer returns an Optional. PrimaryKeyInfo.isRowID tells whether the primary key is the rowed. 2017-09-15 09:00:56 +02:00
Gwendal Roué a7ecf41e3b QueryInterfaceRequest.deleteAll() now honors the order and limit clauses. New Set(cursor) initialiser. 2017-09-07 19:22:21 +02:00
Gwendal Roué 8ccc23333d Replace DatabaseCursor with new concrete cursors RowCursor, StatementColumnCursor, NullableStatementColumnCursor, and StatementCursor. 2017-08-23 08:16:30 +02:00
Gwendal Roué c700f5fc68 Move TableMapping deletion methods to MutablePersistable (prevent TableMapping from being able to modify the database) 2017-08-18 17:15:10 +02:00
Gwendal Roué 376d295853 Replace TableMapping.selectsRowID with TableMapping.databaseSelection 2017-08-18 16:27:24 +02:00
Gwendal Roué 2b2e92c810 Cleanup 2017-07-21 12:13:03 +02:00
Gwendal Roué ec163e94eb Implement fetchCursor(_:keys:), fetchAll(_:keys:), and fetchOne(_🔑) on top of the Query Interface 2017-07-21 09:13:20 +02:00
Gwendal Roué cc12c046b9 func === (lhs: SQLExpressible?, rhs: SQLCollatedExpression) bugfix 2017-07-18 09:00:49 +02:00
Gwendal Roué 29a26800b7 Cleanup 2017-07-17 20:20:20 +02:00
Gwendal Roué bc5eeb3b3a expr == DatabaseValue.null is converted to expr IS NULL. 2017-07-17 20:19:19 +02:00
Gwendal Roué 5f2d6f8e2f Table creation API enhancements 2017-07-01 16:44:33 +02:00
Gwendal Roué 83c3745165 Documentation 2017-06-30 07:47:14 +02:00
Gwendal Roué 56a4a964b7 QueryInterfaceRequest.order() clears the isReversed flag 2017-06-30 07:47:13 +02:00
Gwendal Roué 56869577d4 Documentation 2017-06-20 07:54:19 +02:00
Gwendal Roué cbb607b6b0 SQLSpecificExpressible.collating(_:) inline documentation 2017-06-20 07:54:19 +02:00
Gwendal Roué 7f64abe820 Identify experimental features in the inline documentation 2017-06-20 07:54:19 +02:00
Gwendal Roué 59962e5e88 Identify experimental features in the inline documentation 2017-06-20 07:54:19 +02:00
Gwendal Roué a3ad726111 Cleanup 2017-06-20 07:54:19 +02:00
Gwendal Roué 8ea215931e Refactor Request
Rename TypedRequest's associated type from `Fetched` to `RowConverter`, because if TypedRequest needs a type that can decode rows, the type of the decoded rows does not need to be identical to the decoder type.

Introduce AdaptedRequest and AdaptedTypedRequest as results of Request.adapted(_:) and TypedRequest.adapted(_:), instead of the generic AnyRequest and AnyTypedRequest.
2017-06-20 07:54:19 +02:00
Gwendal Roué 604cf6b522 Remove QueryInterfaceRequest.contains(_:) 2017-06-20 07:54:19 +02:00
Gwendal Roué b3d731b040 Remove QueryInterfaceRequest.exists() 2017-06-20 07:54:19 +02:00
Gwendal Roué 55e4abd534 Rename USING_SQLCIPHER to GRDBCIPHER and USING_CUSTOMSQLITE to GRDBCUSTOMSQLITE 2017-05-22 19:15:10 +02:00
Gwendal Roué dae4ae1c6b Reduce internal coupling 2017-04-22 11:12:43 +02:00
Gwendal Roué 5b7ad40163 [whitespace] 2017-04-11 11:05:49 +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é 5302364139 [format] 2017-03-26 13:33:39 +02:00
Gwendal Roué e64b766599 Expose withoutRowID table creation option for custom SQLite builds and SQLCipher. 2017-03-26 12:48:21 +02:00
Gwendal Roué 9b4e55be28 Documentation for Request.fetchCount() (https://github.com/groue/GRDB.swift/issues/176#issuecomment-282783884) 2017-03-01 08:24:43 +01:00
Gwendal Roué 42ebffc4fc Keep Request.fetchCount() simple (https://github.com/groue/GRDB.swift/issues/176#issuecomment-282783884) 2017-03-01 07:56:17 +01:00
Gwendal Roué 2d2c596f75 Add Request.fetchCount(). Implements https://github.com/groue/GRDB.swift/issues/176#issuecomment-282783884 2017-03-01 05:32:52 +01:00
Gwendal Roué d4c7b41897 StatementArguments.append(contentsOf:) returns the updated values; operators +, &+, += 2016-12-15 21:39:28 +01:00
Gwendal Roué 5dca5fe3cb StatementArguments.append(contentsOf:) refuses to update named arguments 2016-12-15 17:38:33 +01:00
Gwendal Roué cb08660a78 Rename FetchRequest -> Request 2016-12-08 13:56:05 +01:00
Gwendal Roué 0008e4b645 FetchedRecordsController's ObservedRequest adopts TypedFetchRequest 2016-12-07 22:39:53 +01:00
Gwendal Roué 89e7a62d99 Introduce AnyFetchRequest, TypedFetchRequest, AnyTypedFetchRequest 2016-12-07 22:21:19 +01:00
Gwendal Roué 74e89c542a Cleanup 2016-12-07 18:45:14 +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é 527aed0ea3 Documentation 2016-11-29 14:17:41 +01:00
Gwendal Roué 87024f0426 QueryInterfaceSelectQueryDefinition.makeDeleteStatement() throws 2016-11-27 15:26:23 +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é a548212f27 #147: tests for QueryInterfaceRequest.fetchCursor(_:) and (RowConvertible & TableMapping).fetchCursor(_:) 2016-11-26 11:20:35 +01:00
Gwendal Roué 612c963105 TODO 2016-11-26 10:23:41 +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é 57f6b2d122 availability cleanup 2016-11-05 14:40:14 +01:00
Gwendal Roué c4dfd24782 CountableRange.contains(): turn 0..<10.contains(x) to "x >= 0 AND x < 10" instead of "x BETWEEN 0 AND 9" (and avoid Int ranges to mess with double values) 2016-10-21 09:14:19 +02:00
Gwendal Roué 9ae2de6dc1 DatabaseValue.negated: prefer 1 to NOT 0 2016-10-21 09:13:03 +02:00
Gwendal Roué 00de9bbbc5 Database.create(virtualTable:using:) wraps the table creation and virtual module post actions in a save point. Fix failing test for virtual module that throws in its database(_:didCreate:using:) method. 2016-10-17 19:23:11 +02:00
Gwendal Roué 2fd3ded6e2 TableMapping.none() 2016-10-17 09:09:17 +02:00