Gwendal Roué
6157ab0583
Have cursors reset their statement when they are deinitialized
...
This is the real fix for #424 . GRDB used to keep unfinished SQLite statements around. Now cursors properly reset their statement when they are done. We no longer have to clear the statement cache before a backup.
2018-10-05 08:13:23 +02:00
Gwendal Roué
8c3606fe4b
Fix failing test for #424
2018-10-04 07:58:36 +02:00
Gwendal Roué
46511e507e
Avoid code duplication in Database.setupTrace
...
Also, use sqlite3_trace_v2 with SQLCipher
2018-08-22 08:35:54 +02:00
Gwendal Roué
8f5eee0130
Avoid code duplication in Database.closeConnection
2018-08-22 08:01:26 +02:00
Gwendal Roué
86d93b11dd
Easier database backup invocation
2018-07-06 13:57:55 +02:00
Gwendal Roué
caea11fbbb
Database: a couple more asserts
2018-06-04 11:58:40 +02:00
Florent Pillet
55472c2d7f
Main framework compiles on Linux
2018-05-19 18:52:35 +02:00
Gwendal Roué
1bf7f67008
Update inline documentation with singular table names
2018-05-01 20:32:18 +02:00
Gwendal Roué
5747d1cff0
No more #if swift(>=4.1)
2018-04-30 08:26:23 +02:00
Gwendal Roué
7aacaef2cd
Foster autoIncrementedPrimaryKey in documentation
2018-04-21 20:11:34 +02:00
Gwendal Roué
090f872e80
Update documentation: don't mention dbQueue.inDatabase unless necessary
2018-04-15 18:09:34 +02:00
Gwendal Roué
a46505e907
Cleanup
2018-04-15 14:30:12 +02:00
Gwendal Roué
07a1d4d1b8
Database.rollback: add missing dispatch queue check
2018-04-11 13:21:56 +02:00
Gwendal Roué
9c6b48980c
Database.isInsideTransaction: add missing dispatch queue check
2018-04-11 13:18:34 +02:00
Gwendal Roué
1cbe60a13f
Better checks for Swift < 4.1 (thanks @hartbit!)
2018-03-12 18:33:06 +01:00
Gwendal Roué
a75e519294
SE-0185: let Swift 4.1 generate as much Equatable and Hashable conformance as possible
2018-03-12 18:20:10 +01:00
Gwendal Roué
7dc008db8b
Expose Database.beginTransaction(), commit(), rollback(). New Configuration.allowsUnsafeTransactions flag. New fatal error when a database access block ends with a transaction left opened.
2018-02-23 14:14:05 +01:00
Gwendal Roué
2289ed9d95
Cleanup Jazzy documentation from most redundant definitions and experimental APIs
2018-01-21 16:57:43 +01:00
Gwendal Roué
a1e508b1df
TransactionObserver.ignoreDatabaseChangesUntilNextTransaction()
2018-01-14 16:45:36 +01:00
Gwendal Roué
d567ee60bf
Remove compiler warning
2017-12-08 10:51:31 +01:00
Gwendal Roué
5b7f4a7ff5
Call sqlite3_config(SQLITE_CONFIG_LOG, ...) if and only if Database.logError is set.
2017-12-07 13:14:49 +01:00
Gwendal Roué
caf051f19d
Improve jazzy documentation layout
2017-10-31 13:37:48 +01:00
Gwendal Roué
340dcd1748
Extract transaction observation in the new DatabaseObservationBroker class
2017-10-29 12:22:54 +01:00
Gwendal Roué
8919bb5810
Move transaction and savepoint methods
2017-10-29 11:24:30 +01:00
Gwendal Roué
05a0130c1e
More straightforward cached statements API
2017-10-29 10:56:49 +01:00
Gwendal Roué
e486437865
Split Database.swift
2017-10-29 10:43:22 +01:00
Gwendal Roué
9930fd3938
Fix failing test for drop temporary table
2017-10-11 08:17:57 +02:00
Gwendal Roué
0419d67533
More fiddling with the deadly truncate optimization
2017-10-10 09:01:50 +02:00
Gwendal Roué
891dec64a0
Cleanup fix for failing test for "DROP TABLE t" executed from a prepared statement.
2017-10-05 15:34:36 +02:00
Gwendal Roué
90086789c6
Fix failing test for "DROP TABLE t" executed from a prepared statement.
...
Refactor authorization and truncate optimization prevention around the StatementAuthorizer protocol.
2017-10-05 15:15:13 +02:00
Gwendal Roué
2cdcdb9cd6
Refactor Statement initializers
2017-10-05 14:01:12 +02:00
Gwendal Roué
5b487d1722
Fix compiler warning
2017-09-15 19:01:49 +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é
0309abca6f
Tests for Statement.SelectionInfo.description
2017-09-08 13:18:45 +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é
221f378d10
Tests for zero-length blobs as function arguments
2017-09-03 10:31:02 +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é
c5da564fb3
Use built-in SQLite3 module when available
2017-08-19 15:21:44 +02:00
Gwendal Roué
823b094b60
SE-0168
2017-08-18 14:22:14 +02:00
Gwendal Roué
06a6c982aa
SE-0148
2017-08-18 14:22:14 +02:00
Gwendal Roué
210939d2c1
SE-0169
2017-08-18 14:20:35 +02:00
Gwendal Roué
398c0ef687
Documentation
2017-08-18 12:25:22 +02:00
Gwendal Roué
48ec0916bf
Use SQLITE_PREPARE_PERSISTENT flag for cached statements
2017-08-18 08:52:23 +02:00
Gwendal Roué
cdc6370ee5
Restore column ordering in filter(db, keys: [["a": ..., "b": ...], ...]) removed in 2b2e92c810
2017-07-21 13:45:24 +02:00
Gwendal Roué
81b21010f1
Fix memory leak with Configuration.trace
2017-07-20 17:47:11 +02:00
Gwendal Roué
40d02518b0
Cleanup
2017-07-17 15:33:09 +02:00
Gwendal Roué
a2556edc69
Use sqlite3_get_autocommit
...
This function knows whether the database is currently inside a
transaction or not, and provides robust rollback error handling.
2017-07-17 15:33:01 +02:00
Gwendal Roué
bd919e5209
DatabaseAggregate ( fixes #236 )
2017-07-01 11:39:52 +02:00
Gwendal Roué
9609e2ac4c
Database.foreignKeys(on:)
2017-06-20 07:54:19 +02:00
Gwendal Roué
31aea350cb
Rename Database.afterCommit(_:) to Database.afterNextTransactionCommit(_:)
2017-06-20 07:54:19 +02:00