Commit Graph
600 Commits
Author SHA1 Message Date
Gwendal Roué b510bff195 Documentation 2016-08-09 18:41:30 +02:00
Gwendal Roué 00a1eebf60 Swift 3 Grand Renaming: SQLColumn -> Column 2016-08-07 10:38:24 +02:00
Gwendal Roué bcd6e6767a Merge branch 'master' of github.com:groue/GRDB.swift into Swift3
Conflicts:
	GRDB.xcodeproj/project.pbxproj
	GRDB/Core/Database.swift
	GRDB/Core/DatabaseSchemaCache.swift
	GRDB/QueryInterface/SQLCollation.swift
	README.md
	TODO.md
	Tests/Public/Core/DatabaseValueConvertible/DatabaseValueConversionTests.swift
	Tests/Public/Core/StatementColumnConvertible/StatementColumnConvertibleTests.swift
	Tests/Public/QueryInterfaceRequest/QueryInterfaceRequestTests.swift
2016-08-07 10:11:31 +02:00
Gwendal Roué 6cca2fd991 Rename PrimaryKey to PrimaryKeyInfo 2016-08-06 14:21:39 +02:00
Gwendal Roué f6ae7587ea More where clause to end of function declarations 2016-08-02 08:20:05 +02:00
Gwendal Roué 2d78d04d52 Update for Xcode Version 8.0 beta 4 (8S188o) 2016-08-01 22:33:50 +02:00
Gwendal Roué 7404c642e3 Merge branch 'master' of github.com:groue/GRDB.swift into Swift3bis
Conflicts:
	GRDB.xcodeproj/project.pbxproj
	GRDB/Core/Database.swift
	GRDB/Core/DatabaseSchemaCache.swift
	GRDB/Record/Persistable.swift
	GRDB/Record/Record.swift
	README.md
	Tests/Private/DatabasePoolSchemaCacheTests.swift
	Tests/Public/Core/Persistable/MutablePersistableTests.swift
	Tests/Public/Core/Persistable/PersistableTests.swift
	Tests/Public/Record/RecordSubClassTests.swift
2016-07-30 12:58:10 +02:00
Gwendal Roué b16656bd23 Partial update WIP: cache & column case insensitivity 2016-07-28 19:28:46 +02:00
Gwendal Roué df7791a3e7 Partial update WIP: documentation 2016-07-28 09:05:46 +02:00
Gwendal Roué 176a23fe97 Partial update WIP: tests 2016-07-28 08:53:17 +02:00
Gwendal Roué 548ff068fd Partial update WIP: implementation 2016-07-28 08:41:22 +02:00
Gwendal Roué 50ce433bcb Partial update WIP: public API 2016-07-28 08:25:08 +02:00
Gwendal Roué 2a91ab07b9 Merge branch 'master' of github.com:groue/GRDB.swift into Swift3bis
Conflicts:
	GRDB.xcodeproj/project.pbxproj
	GRDB/Core/Database.swift
	GRDB/Core/DatabaseSchemaCache.swift
	GRDB/Core/Statement.swift
	TODO.md
	Tests/Private/RecordUniqueIndexTests.swift
2016-07-22 09:01:39 +02:00
Gwendal Roué fcf90a053a Database.indexes(on:) and Database.table(_:hasUniqueKey:) are public 2016-07-21 19:08:27 +02:00
Gwendal Roué 3989f0c332 Merge branch 'master' of github.com:groue/GRDB.swift into Swift3bis
Conflicts:
	GRDB/Record/Persistable.swift
2016-07-20 18:47:41 +02:00
Gwendal Roué 23ffef8943 Swift3: turn TableMapping.databaseTableName() into a read-only property 2016-07-20 18:38:56 +02:00
Gwendal Roué 8b09b2cdba Improve error messages for MutablePersistable.update(), delete() & exist() (see #81) 2016-07-20 13:49:16 +02:00
Gwendal Roué ebdd6c5a4d Update for Xcode Version 8.0 beta 3 (8S174q) 2016-07-19 14:01:46 +02:00
Gwendal Roué b24075ca1c Merge branch 'master' of github.com:groue/GRDB.swift into Swift3bis
Conflicts:
	GRDB.xcodeproj/project.pbxproj
	GRDB/Core/Database.swift
	GRDB/Core/DatabaseSchemaCache.swift
	GRDB/Core/Utils.swift
	GRDB/Record/TableMapping.swift
	README.md
	Tests/Private/DatabasePoolSchemaCacheTests.swift
	Tests/Public/Encryption/EncryptionTests.swift
	Tests/Public/Record/PrimaryKeyNoneTests.swift
2016-07-07 08:41:17 +02:00
Gwendal Roué e5bf8a8e75 Fix GRDBiOS 2016-07-06 21:09:24 +02:00
Gwendal Roué d35b65c9d2 #56: cleanup
- Dabase.indexes(tableName) returns actual indexes (no more fake index on INTEGER PRIMARY KEY column)
- Database.colums(_:uniquelyIdentifyRowsIn:) checks indexes, and primary key
- DatabaseSchemaCache caches table indexes (with invalidation on CREATE/DROP INDEX statements)
2016-07-06 19:09:25 +02:00
Gwendal Roué 0f27299586 #56: fetchOne(_:key:Dictionary) and deleteOne(_:key:Dictionary) raise a fatal error when there is no unique index on the key columns. 2016-07-06 08:39:18 +02:00
Gwendal Roué baff716ef6 #56: fetchOne(_:key:Dictionary) performs the same unique index check as deleteOne() 2016-07-06 08:18:14 +02:00
Gwendal Roué 1141676223 #56: Database.indexes(tableName) includes the implicit unique index on INTEGER PRIMARY KEY column. 2016-07-05 22:33:56 +02:00
Gwendal Roué a6ce80d39b #56: TableMapping.deleteOne(_🔑), TableMapping.deleteAll(_:keys:) 2016-07-05 22:16:23 +02:00
Gwendal Roué e785085d0d Cleanup our code thanks to DispatchQueue.sync<T>(block: @noescape () throws -> T) rethrows. 2016-06-30 18:38:16 +02:00
Gwendal Roué 82b801498a Merge branch 'master' of github.com:groue/GRDB.swift into Swift3
Conflicts:
	GRDB.xcodeproj/project.pbxproj
	GRDB/Core/DatabaseValueConvertible.swift
	GRDB/Core/Row.swift
	GRDB/Core/StatementColumnConvertible.swift
	GRDB/FetchRequest/FetchRequest.swift
	GRDB/QueryInterface/QueryInterfaceRequest.swift
	GRDB/Record/RowConvertible.swift
	README.md
	Tests/Public/Core/DatabaseValueConvertible/DatabaseValueConvertibleFetchTests.swift
	Tests/Public/Core/SQLiteStatementConvertible/SQLiteStatementConvertibleFetchTests.swift
	Tests/Public/FetchRequest/FetchRequestTests.swift
	Tests/Public/Foundation/NSDateTests.swift
2016-06-29 13:38:24 +02:00
Gwendal Roué 21e9e64b3d DatabaseValueConvertible and StatementColumnConvertible can now be fetched through a RowAdapter. DatabaseValueConvertible: raise a fatal error instead of converting to nil for invalid conversions triggered by fetch() methods. 2016-06-28 13:54:45 +02:00
Gwendal Roué 8992b4a284 Move FetchRequest to Core 2016-06-28 09:09:06 +02:00
Gwendal Roué b624874768 Merge branch 'master' of github.com:groue/GRDB.swift into Swift3bis
Conflicts:
	GRDB.xcodeproj/project.pbxproj
	GRDB/Core/Database.swift
	GRDB/Core/DatabaseWriter.swift
	GRDB/Core/Statement.swift
	GRDB/FetchRequest/QueryInterfaceRequest.swift
	GRDB/FetchRequest/SQLCollation.swift
	GRDB/FetchRequest/SQLSelectQuery.swift
	GRDB/Record/FetchedRecordsController.swift
	README.md
	Tests/Private/StatementInformationTests.swift
	Tests/Public/Core/DatabaseValueConvertible/DatabaseValueConversionTests.swift
	Tests/Public/Core/SQLiteStatementConvertible/SQLiteStatementConversionTests.swift
2016-06-21 09:03:02 +02:00
Gwendal Roué e0ea5af18e Refactor database events filtering 2016-06-20 20:38:31 +02:00
Gwendal Roué 6a466fcb12 Detailed database changes observation 2016-06-20 15:21:14 +02:00
Gwendal Roué 1d1d843dc7 Xcode 8 WIP 2016-06-14 20:05:13 +02:00
Gwendal Roué 0944ed331b Xcode 8 WIP 2016-06-14 14:04:04 +02:00
Gwendal Roué 2a5bdbcbdc BROKEN - Xcode 8 WIP 2016-06-14 09:08:43 +02:00
Gwendal Roué 6ac2cd4686 Merge branch 'master' of github.com:groue/GRDB.swift into Swift3bis
Conflicts:
	DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/AppDatabase.swift
	DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Person.swift
	DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/PersonEditionViewController.swift
	DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/PersonsViewController.swift
	GRDB/Core/Support/Foundation/NSNumber.swift
	GRDB/Core/Support/StandardLibrary/StandardLibrary.swift
	GRDB/Record/FetchedRecordsController.swift
	Tests/Public/Core/DatabaseValueConvertible/NSNumberTests.swift
	Tests/Public/FetchedRecordsController/FetchedRecordsControllerTests.swift
2016-06-07 19:01:08 +02:00
Gwendal Roué c9ebb6da00 FetchedRecordsController:
- make unowned references in the callbacks safe, as long as the unowned object is deallocated in the fetched records controller’s queue (usually the main queue).
- FetchedRecordsController.trackChanges(fetchAlong: { db in … }, …) allows the user to fetch values that are consistent with the fetched records.
2016-06-04 18:24:49 +02:00
Gwendal Roué e11673d15c Merge branch 'master' of github.com:groue/GRDB.swift into Swift3bis
Conflicts:
	GRDB/Core/Database.swift
	GRDB/FetchRequest/SQLSelectQuery.swift
	GRDB/Record/FetchedRecordsController.swift
	GRDB/Record/TableMapping.swift
	Tests/Public/Core/Persistable/MutablePersistableTests.swift
	Tests/Public/Core/Persistable/PersistableTests.swift
	Tests/Public/Core/Savepoint/SavepointTests.swift
	Tests/Public/Core/TransactionObserver/TransactionObserverSavepointsTests.swift
	Tests/Public/Core/TransactionObserver/TransactionObserverTests.swift
2016-06-03 05:17:11 +02:00
Gwendal Roué aa6097dff8 swift-DEVELOPMENT-SNAPSHOT-2016-05-31-a 2016-06-02 19:58:58 +02:00
Gwendal Roué bf0f9e1fa2 Merge pull request #63 from swiftlyfalling/preupdate-hooks
Add support for SQLite Pre-Update Hooks (+ tests)
2016-06-02 13:29:26 +02:00
Gwendal Roué 7c4ff7677d swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a 2016-06-02 08:38:15 +02:00
swiftlyfalling f15a4df79e Slow compilation fixes
Implemented a workaround for the cause of the two slowest-to-compile
methods.
2016-06-01 21:12:33 -04:00
swiftlyfalling 901b7a0f12 Add support for SQLite Pre-Update Hooks (+ tests)
If SQLITE_ENABLE_PREUPDATE_HOOK is defined, and GRDB is built with a
custom SQLite library with the functionality (see: GRDBCustomSQLite),
enable support for SQLite Pre-Update Hooks and the new
`willChangeWithEvent` callback on TransactionObservers.
2016-06-01 20:42:21 -04:00
Gwendal Roué 7206e46377 Relax FetchedRecordsController compareRecordsByPrimaryKey initializer argument by only requiring TableMapping protocol 2016-05-29 15:28:50 +02:00
Gwendal Roué 554b9a03b5 FetchedRecordsController: avoid instantiate records when building table view updates 2016-05-29 15:20:17 +02:00
Gwendal Roué bc512e775c Issue #60: make PrimaryKey public 2016-05-25 08:41:54 +02:00
Gwendal Roué 6e259f9a0e Rename SQLRequest to SQLFetchRequest 2016-05-22 20:21:30 +02:00
Gwendal Roué 1ee4437970 Fix Row.fetch(db, request) and RowConvertible.fetch(db, request) by using the request’s adapter. 2016-05-22 19:55:57 +02:00
Gwendal Roué 2f18d1ff8b Merge branch 'master' into RowAdapter
Conflicts:
	GRDB/Record/FetchedRecordsController.swift
2016-05-21 16:03:45 +02:00
Gwendal Roué 6c816bfdeb Minor 2016-05-21 16:01:22 +02:00