Commit Graph
412 Commits
Author SHA1 Message Date
Gwendal Roué d8b0b95842 DatabaseConfiguration.onConnect 2019-09-02 08:37:28 +02:00
Kevin Wooten 4d3f0bd88b Add support for tvOS
## Xcode Project
- [x] tvOS Target
- [x] tvOS Unit Test Target
- [x] tvOS Scheme

## Makefile
- [x] tvOS Target Min/Max
- [x] tvOS Actions (copies iOS)

## CI
- [x] tvOS Travis stages

## Packaging
- [x] CocoaPods - Podfile Updated
- [x] ~SwiftPM - Not Changes Required~

## Documentation
- [x] Readme Updated
2019-08-22 13:15:31 -07:00
Gwendal Roué a5c8f23ba4 Support for variable observed region of ValueObservation based on actual selection 2019-08-03 16:32:33 +02:00
Gwendal Roué 870d22fd95 Explain why we call sqlite3_set_authorizer once per database connection 2019-08-02 16:06:19 +02:00
Gwendal Roué c6cb92d757 Cleanup 2019-08-02 15:40:19 +02:00
Gwendal Roué e351b79526 Database only exposes its current authorizer with the withAuthorizer(_:_:) wrapper method. 2019-08-02 15:16:48 +02:00
Gwendal Roué a59f4ef096 Fix #583 by keeping a single authorizer active for the whole lifetime of a database connection
SQLite invalidates statements when authorizer changes, which can lead to undesired behaviors. This is why we now call sqlite3_set_authorizer only once. See http://sqlite.1065341.n5.nabble.com/Issue-report-sqlite3-set-authorizer-triggers-error-4-516-SQLITE-ABORT-ROLLBACK-during-statement-itern-td107972.html
2019-08-02 14:17:48 +02:00
Gwendal Roué 35ceeebb3d Style tweaks 2019-07-26 20:56:33 +02:00
Gwendal Roué df6bb8761c Swiftlint + whitespace 2019-07-01 08:57:53 +02:00
Gwendal Roué caa624f56b Readonly: avoid hitting the db if unnecessary 2019-06-19 04:16:07 +02:00
Gwendal Roué 335850c5fe Fix #554 2019-06-18 20:40:49 +02:00
Gwendal Roué 50c9792eb2 Merge pull request #546 from openbitapp/master
fix errors for Xcode 11 beta
2019-06-09 11:57:59 +02:00
Roberto Casula b6f988194c fix errors for Xcode 11 beta 2019-06-08 15:46:48 +02:00
Gwendal Roué ac85ffff84 Database.readOnly is reentrant 2019-06-06 18:58:44 +02:00
Gwendal Roué a3c86e343b Less @inlinable methods 2019-05-23 13:27:23 +02:00
Gwendal Roué 2a72d08334 Restore Database.logError 2019-04-21 12:59:12 +02:00
Gwendal Roué 1f50b4fefe Integrate SQLCipher as a CocoaPod 2019-04-19 08:33:19 +02:00
Gwendal Roué b67a53e645 whitespace 2019-04-09 19:57:22 +02:00
Gwendal Roué a0f37c6e85 Simplify Database.validateFormat() 2019-04-09 19:56:01 +02:00
Gwendal Roué 82dc51c554 Document prepareDatabase call site
Because it willl be easy to forget the context of #508 when we read this code in the future
2019-04-09 19:55:45 +02:00
Gwendal Roué 6115078e95 Simplify Database.validateSQLCipher() 2019-04-09 19:46:58 +02:00
Gwendal Roué 8d35330e12 whitespace 2019-04-09 19:40:27 +02:00
Michael Kirk 29c1c5481c inline setupConnection, re-order method calls to call validateFormat later, convert static->instance methods where possible 2019-04-04 15:55:53 -06:00
Michael Kirk ebc7a9d8e0 fix #if scope 2019-04-04 15:42:19 -06:00
Michael Kirk 99065a4faf prepareDB block 2019-04-02 10:47:31 -06:00
Gwendal Roué 9500a74744 Merge branch 'development' into GRDB-4.0
# Conflicts:
#	.travis.yml
#	CHANGELOG.md
#	GRDB/QueryInterface/SQLSelectQueryGenerator.swift
#	GRDB/Utils/OrderedDictionary.swift
#	README.md
2019-03-10 12:16:08 +01:00
Gwendal Roué 211ac7aada Make Configuration.cipherPageSize an Int
As said in https://github.com/groue/GRDB.swift/issues/498#issuecomment-471156347
2019-03-09 13:38:28 +01:00
Gwendal Roué d60b68ab8a Document the BusyMode.timeout unit (#498) 2019-03-09 12:45:11 +01:00
Marcel Ball 6543d75f6d Updated based upon feedback from @groue
- Renamed `KDFIternations` to `kdfIterations` to better fit naming conventions
- In case of errors setting values return the sqlite error code and message instead of .SQLITE_MISUSE and a generic message
- Fixed formatting/typos in documentation
2019-03-07 17:51:16 -04:00
Marcel Ball 8415e8c2a0 Rename parameter to better align with the SQLCipher PRAGMA 2019-03-06 20:58:55 -04:00
Marcel Ball d4eb7ba27b Added configuration options to GRDBcipher for kdf_iterations 2019-03-06 20:41:38 -04:00
Marcel Ball cf128ac800 Added configuration option to set cipher_page_size on connection
* Defaults to 1024 - which is the default in SQLCipher
2019-03-06 16:50:55 -04:00
Gwendal Roué caaf2365e0 Fix compiler warning: make SQLiteValue @usableFromInline 2019-02-23 20:31:56 +01:00
Gwendal Roué e80f3639af Revert wrong Xcode refactoring 2019-02-23 15:34:25 +01:00
Gwendal Roué 746c22e950 @inlinable FastDatabaseValueCursor and FastNullableDatabaseValueCursor 2019-02-23 14:28:44 +01:00
Gwendal Roué 36ce78bd37 Explicit sql argument label when building prepared statements 2019-02-17 13:28:41 +01:00
Gwendal Roué db67d3840b Principle of least astonishment: rrename argument label rawSQL to sql 2019-02-17 13:28:41 +01:00
Gwendal Roué c546c578ce fetchCursor/All/One(_:rawSQL:arguments:adapter:) 2019-02-17 13:28:40 +01:00
Gwendal Roué 59162d93de Rename Database.execute(_:String) to Database.execute(rawSQL:String) 2019-02-17 13:27:54 +01:00
Gwendal Roué fb8946254d Swift 5: update calls to Data.withUnsafeBytes 2019-02-08 08:22:23 +01:00
Gwendal Roué a230fe400d Availability checks: assume iOS >= 9.0 2019-02-07 08:52:38 +01:00
Gwendal Roué cbc3467e2d Database.beginSnapshotIsolation() 2018-11-18 16:49:51 +01:00
Gwendal Roué 65cc0bb2b3 Cache frequently used statements 2018-11-18 16:49:14 +01:00
Gwendal Roué 49de0e0f49 Call sqlite3_close() even if opening failed
Thanks to https://github.com/feistydog/FeistyDB/commit/6859f622797480656f8897c2db5e620e6a98c858
2018-11-16 08:48:25 +01:00
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