Commit Graph
59 Commits
Author SHA1 Message Date
Gwendal Roué bf601e6810 Merge SelectStatement and UpdateStatement
Addresses #1015
2021-07-29 20:20:15 +02:00
Gwendal Roué b13922b76e Database schema cache distinguishes the main from the temp schema
Addresses https://github.com/groue/GRDB.swift/pull/946#issuecomment-805756799
2021-03-27 14:50:25 +01:00
Gwendal Roué 39eb57fe64 Fix for Xcode 11.4 2021-03-21 16:36:54 +01:00
Gwendal Roué 659e6a53bb Documentation 2021-03-20 14:40:17 +01:00
Gwendal Roué 21a2206443 Remove asynchronous migration to target identifier
Migrating up to a specific identifier is a test-oriented use case: it does not need any async version.
2021-03-20 14:20:41 +01:00
Gwendal Roué 8ad880e20d DatabaseMigrator publisher 2021-03-20 14:11:43 +01:00
Gwendal Roué c9c652dddc DatabaseMigrator async migrations 2021-03-20 13:25:43 +01:00
Gwendal Roué 8be0976bd1 Fix #931 2021-03-06 14:01:56 +01:00
Gwendal Roué 836efb120f Xcode 12.3 formatting 2020-12-23 12:13:05 +01:00
Gwendal Roué 800b9ffc3d Name the temporary database used by DatabaseMigrator.eraseDatabaseOnSchemaChange 2020-06-03 20:09:22 +02:00
Gwendal Roué 9ee3fd38b5 Remove mentions of unsupported iOS versions 2020-05-31 13:54:02 +02:00
Gwendal Roué cff769ddd5 Documentation 2020-05-11 08:54:31 +02:00
Gwendal Roué 3fea5db763 DatabaseMigrator.hasBeenSuperseded(_:) 2020-05-11 08:27:41 +02:00
Gwendal Roué 1ea5d1713a Cleanup 2020-04-12 10:04:09 +02:00
Gwendal Roué 0372c1dd63 Complete #747: export the underlying SQLite library 2020-04-12 07:27:50 +02:00
Gwendal Roué eee2c65c14 Merge branch 'development' into GRDB5
# Conflicts:
#	CHANGELOG.md
#	README.md
2020-03-29 18:55:06 +02:00
Gwendal Roué 97a84c6470 Fix failing test for #741 2020-03-29 12:09:58 +02:00
Gwendal Roué dab8e28f6d Merge branch 'master' into GRDB5
# Conflicts:
#	GRDB/Migration/DatabaseMigrator.swift
#	GRDB/QueryInterface/Request/QueryInterfaceRequest.swift
#	README.md
2020-03-21 14:35:57 +01:00
Gwendal Roué c1d1797576 Address #725 2020-03-18 20:36:56 +01:00
Gwendal Roué 19061934ce SE-0242: Synthesize default values for the memberwise initializer
...and more initializers cleanup
2020-03-09 08:49:06 +01:00
Gwendal Roué 9aa67f9db9 SE-0255: Implicit returns from single-expression functions 2020-03-08 23:12:46 +01:00
Gwendal Roué 7865b0a2ee SE-0249: Key Path Expressions as Functions 2020-03-08 19:58:51 +01:00
Gwendal Roué b9d4a5215a Remove deprecated DatabaseMigrator methods 2020-03-08 17:13:31 +01:00
Gwendal Roué e9dd8b2b09 Enhance DatabaseMigrator querying methods
// New
dbQueue.read(migrator.hasCompletedMigrations)
dbQueue.read(migrator.completedMigrations).contains("v2")
dbQueue.read(migrator.completedMigrations).last == "v2"
dbQueue.read(migrator.appliedMigrations)

// Deprecated
migrator.hasCompletedMigrations(in: dbQueue)
migrator.hasCompletedMigrations(in: dbQueue, through: "v2")
migrator.lastCompletedMigration(in: dbQueue) == "v2"
migrator.appliedMigrations(in: dbQueue)
2020-03-07 13:59:46 +01:00
Gwendal Roué f5019eeb60 Merge branch 'development' into dev/barrierMigrations
# Conflicts:
#	GRDB/Migration/DatabaseMigrator.swift
2020-03-01 09:13:45 +01:00
Gwendal Roué 0e43f1b95a appliedIdentifiers always filters out unknown migrations 2020-03-01 08:58:50 +01:00
Gwendal Roué e1b14d4ee5 DatabaseMigrator uses barrierWriteWithoutTransaction
This prevents concurrent reads from reading right in between two migration transactions
2020-02-29 17:26:59 +01:00
Gwendal Roué 7af846c87f Rename new DatabaseMigrator methods 2020-02-29 15:07:36 +01:00
Gwendal Roué d35d6fc2f8 Rename isMigrated(in:upTo:) to isMigrated(in:beyond:), introduce lastAppliedMigration(in:) 2020-02-28 14:27:52 +01:00
Gwendal Roué 91a3557281 Rename hasUnappliedMigrations to isMigrated 2020-02-28 07:40:19 +01:00
Gwendal Roué a17669b082 DatabaseMigrator.hasUnappliedMigrations 2020-02-27 20:50:25 +01:00
Gwendal Roué bf89883ff5 Import SQLite C functions for SPM 2020-02-26 22:26:29 +01:00
Gwendal Roué 98c4356638 Cleanup 2020-02-26 14:07:38 +01:00
Gwendal Roué 8557d113a3 Deprecate registerMigrationWithDeferredForeignKeyCheck
This method is now equivalent to registerMigration, starting SQLite 3.7.16
2020-02-26 13:57:14 +01:00
Gwendal Roué fd7783c39d Fix uses of throwingFirstError(execute:finally:) 2020-01-06 08:12:49 +01:00
Gwendal Roué e5726f3993 throwingFirstError(execute:finally:) 2020-01-05 13:30:12 +01:00
Michael Kirk cd6d46e349 move fix to private 2019-11-18 11:33:35 -07:00
Michael Kirk 9ea160b116 Fix: appliedMigrations throws error on new install
Before setup, the grdb_migrations table doesn't exist, so calling
`appliedMigrations` would throw an error.

To avoid this, if the table to track migrations doesn't exist yet, we can be
sure no migrations have been run, and we retun the empty set.

FIXES https://github.com/groue/GRDB.swift/issues/652
2019-11-18 09:09:46 -07:00
Gwendal Roué 725e16390b Fix failing test for eraseDatabaseOnSchemaChange 2019-09-17 08:22:36 +02:00
Gwendal Roué 62e50b1a73 Simplify eraseDatabaseOnSchemaChange implementation 2019-09-17 08:10:28 +02:00
Gwendal Roué bb0c11f7d5 TODO 2019-07-29 09:11:47 +02:00
Gwendal Roué df6bb8761c Swiftlint + whitespace 2019-07-01 08:57:53 +02: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é a230fe400d Availability checks: assume iOS >= 9.0 2019-02-07 08:52:38 +01:00
Gwendal Roué 3593806685 Cleanup 2018-07-07 14:49:43 +02:00
Gwendal Roué fee4486d1b DatabaseMigrator.eraseDatabaseOnSchemaChange 2018-07-07 14:23:50 +02:00
Gwendal Roué 1bf7f67008 Update inline documentation with singular table names 2018-05-01 20:32:18 +02:00
Gwendal Roué b8fc762e11 Cleanup 2018-04-21 19:28:58 +02:00