From 62f33e1d5541afc5e22961f599aeee2edd980a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Wed, 22 Jul 2020 08:39:45 +0200 Subject: [PATCH 01/13] Dictionary(grouping:by:) with Cursor --- GRDB/Core/Cursor.swift | 16 +++++++++++++++- Tests/GRDBTests/CursorTests.swift | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/GRDB/Core/Cursor.swift b/GRDB/Core/Cursor.swift index 2c04634ad..b7e420dfb 100644 --- a/GRDB/Core/Cursor.swift +++ b/GRDB/Core/Cursor.swift @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -// MARK: - Array, Sequence, Set extensions +// MARK: - Array, Sequence, Dictionary, Set extensions extension Array { /// Creates an array containing the elements of a cursor. @@ -25,6 +25,20 @@ extension Array { } } +extension Dictionary { + /// Creates a new dictionary whose keys are the groupings returned by the + /// given closure and whose values are arrays of the elements that returned + /// each key. + public init(grouping values: C, by keyForValue: (C.Element) throws -> Key) + throws where Value == [C.Element] + { + self.init() + while let value = try values.next() { + try self[keyForValue(value), default: []].append(value) + } + } +} + extension Sequence { /// Returns a cursor over the concatenated results of mapping transform diff --git a/Tests/GRDBTests/CursorTests.swift b/Tests/GRDBTests/CursorTests.swift index 96c102475..f2a8b6c3a 100644 --- a/Tests/GRDBTests/CursorTests.swift +++ b/Tests/GRDBTests/CursorTests.swift @@ -170,4 +170,22 @@ class CursorTests: GRDBTestCase { XCTAssertTrue(suffix == [1, 2, 3, 4, 5]) } } + + func testDictionaryGrouping() throws { + do { + let cursor = AnyCursor([]) + let dictionary = try Dictionary(grouping: cursor, by: { $0 % 2 }) + XCTAssertEqual(dictionary, [:]) + } + do { + let cursor = AnyCursor([1, 2, 3, 4, 5]) + let dictionary = try Dictionary(grouping: cursor, by: { $0 % 2 }) + XCTAssertEqual(dictionary, [0: [2, 4], 1: [1, 3, 5]]) + } + do { + let cursor = AnyCursor([5, 4, 3, 2, 1]) + let dictionary = try Dictionary(grouping: cursor, by: { $0 % 2 }) + XCTAssertEqual(dictionary, [0: [4, 2], 1: [5, 3, 1]]) + } + } } From 294ed772c1887edb40804a67d6d44885924d9bb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Tue, 21 Jul 2020 20:32:17 +0200 Subject: [PATCH 02/13] Expose remove_diacritics=2 option of unicode61 FTS tokenizer This is because iOS 14 runs SQLite 3.31.1 --- GRDB/FTS/FTS3.swift | 6 ++++++ GRDB/FTS/FTS3TokenizerDescriptor.swift | 7 +++++-- Tests/GRDBTests/FTS3TableBuilderTests.swift | 13 +++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/GRDB/FTS/FTS3.swift b/GRDB/FTS/FTS3.swift index 1ebddf61e..c8c00acd5 100644 --- a/GRDB/FTS/FTS3.swift +++ b/GRDB/FTS/FTS3.swift @@ -21,6 +21,12 @@ public struct FTS3: VirtualTableModule { /// option matches the raw "remove_diacritics=2" tokenizer argument, /// available from SQLite 3.27.0 case remove + #elseif !GRDBCIPHER + /// Remove diacritics from Latin script characters. This + /// option matches the raw "remove_diacritics=2" tokenizer argument, + /// available from SQLite 3.27.0 + @available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) + case remove #endif } diff --git a/GRDB/FTS/FTS3TokenizerDescriptor.swift b/GRDB/FTS/FTS3TokenizerDescriptor.swift index 0c9bd9bc4..2ce38af69 100644 --- a/GRDB/FTS/FTS3TokenizerDescriptor.swift +++ b/GRDB/FTS/FTS3TokenizerDescriptor.swift @@ -68,10 +68,13 @@ public struct FTS3TokenizerDescriptor { break case .keep: arguments.append("remove_diacritics=0") - #if GRDBCUSTOMSQLITE + #if GRDBCUSTOMSQLITE case .remove: arguments.append("remove_diacritics=2") - #endif + #elseif !GRDBCIPHER + case .remove: + arguments.append("remove_diacritics=2") + #endif } if !separators.isEmpty { // TODO: test "=" and "\"", "(" and ")" as separators, with diff --git a/Tests/GRDBTests/FTS3TableBuilderTests.swift b/Tests/GRDBTests/FTS3TableBuilderTests.swift index 678f0f332..b2db2aab8 100644 --- a/Tests/GRDBTests/FTS3TableBuilderTests.swift +++ b/Tests/GRDBTests/FTS3TableBuilderTests.swift @@ -74,6 +74,19 @@ class FTS3TableBuilderTests: GRDBTestCase { assertDidExecute(sql: "CREATE VIRTUAL TABLE \"documents\" USING fts3(tokenize=unicode61 \"remove_diacritics=2\")") } } + #elseif !GRDBCIPHER + func testUnicode61TokenizerDiacriticsRemove() throws { + guard #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) else { + throw XCTSkip() + } + let dbQueue = try makeDatabaseQueue() + try dbQueue.inDatabase { db in + try db.create(virtualTable: "documents", using: FTS3()) { t in + t.tokenizer = .unicode61(diacritics: .remove) + } + assertDidExecute(sql: "CREATE VIRTUAL TABLE \"documents\" USING fts3(tokenize=unicode61 \"remove_diacritics=2\")") + } + } #endif func testUnicode61TokenizerSeparators() throws { From 1823e11090606c7cee44ea7d46d228d525774768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Tue, 21 Jul 2020 20:41:27 +0200 Subject: [PATCH 03/13] Expose remove_diacritics=2 option of unicode61 FTS5 tokenizer This is because iOS 14 runs SQLite 3.31.1 --- GRDB/FTS/FTS5.swift | 6 ++++++ GRDB/FTS/FTS5TokenizerDescriptor.swift | 7 +++++-- Tests/GRDBTests/FTS5TableBuilderTests.swift | 15 +++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/GRDB/FTS/FTS5.swift b/GRDB/FTS/FTS5.swift index 06b243885..bdda6f6c8 100644 --- a/GRDB/FTS/FTS5.swift +++ b/GRDB/FTS/FTS5.swift @@ -26,6 +26,12 @@ public struct FTS5: VirtualTableModule { /// option matches the raw "remove_diacritics=2" tokenizer argument, /// available from SQLite 3.27.0 case remove + #elseif !GRDBCIPHER + /// Remove diacritics from Latin script characters. This + /// option matches the raw "remove_diacritics=2" tokenizer argument, + /// available from SQLite 3.27.0 + @available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) + case remove #endif } diff --git a/GRDB/FTS/FTS5TokenizerDescriptor.swift b/GRDB/FTS/FTS5TokenizerDescriptor.swift index 04d571911..a54fd0496 100644 --- a/GRDB/FTS/FTS5TokenizerDescriptor.swift +++ b/GRDB/FTS/FTS5TokenizerDescriptor.swift @@ -144,10 +144,13 @@ public struct FTS5TokenizerDescriptor { break case .keep: components.append(contentsOf: ["remove_diacritics", "0"]) - #if GRDBCUSTOMSQLITE + #if GRDBCUSTOMSQLITE case .remove: components.append(contentsOf: ["remove_diacritics", "2"]) - #endif + #elseif !GRDBCIPHER + case .remove: + components.append(contentsOf: ["remove_diacritics", "2"]) + #endif } if !separators.isEmpty { // TODO: test "=" and "\"", "(" and ")" as separators, with diff --git a/Tests/GRDBTests/FTS5TableBuilderTests.swift b/Tests/GRDBTests/FTS5TableBuilderTests.swift index 600d79018..8a369180e 100644 --- a/Tests/GRDBTests/FTS5TableBuilderTests.swift +++ b/Tests/GRDBTests/FTS5TableBuilderTests.swift @@ -128,6 +128,21 @@ class FTS5TableBuilderTests: GRDBTestCase { assertDidExecute(sql: "CREATE VIRTUAL TABLE \"documents\" USING fts5(content, tokenize='unicode61 remove_diacritics 2')") } } + #elseif !GRDBCIPHER + func testUnicode61TokenizerDiacriticsRemove() throws { + guard #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) else { + throw XCTSkip() + } + + let dbQueue = try makeDatabaseQueue() + try dbQueue.inDatabase { db in + try db.create(virtualTable: "documents", using: FTS5()) { t in + t.tokenizer = .unicode61(diacritics: .remove) + t.column("content") + } + assertDidExecute(sql: "CREATE VIRTUAL TABLE \"documents\" USING fts5(content, tokenize='unicode61 remove_diacritics 2')") + } + } #endif func testUnicode61TokenizerSeparators() throws { From ee2d8eae50857e544ec885b6a2ac18c1a208072e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Wed, 22 Jul 2020 08:06:50 +0200 Subject: [PATCH 04/13] Expose ascNullLast and descNullFirst This is because iOS 14 runs SQLite 3.31.1 --- .../SQL/SQLCollatedExpression.swift | 26 ++++++++++++++ GRDB/QueryInterface/SQL/SQLOrdering.swift | 11 ++---- ...QLSpecificExpressible+QueryInterface.swift | 16 +++++++++ .../SQLGeneration/SQLOrderingGenerator.swift | 9 +++-- .../QueryInterfaceRequestTests.swift | 36 +++++++++++++++++++ ...bleRecord+QueryInterfaceRequestTests.swift | 9 +++++ 6 files changed, 97 insertions(+), 10 deletions(-) diff --git a/GRDB/QueryInterface/SQL/SQLCollatedExpression.swift b/GRDB/QueryInterface/SQL/SQLCollatedExpression.swift index f571cc9ff..380e4425f 100644 --- a/GRDB/QueryInterface/SQL/SQLCollatedExpression.swift +++ b/GRDB/QueryInterface/SQL/SQLCollatedExpression.swift @@ -62,6 +62,32 @@ public struct SQLCollatedExpression { public var descNullsFirst: SQLOrderingTerm { _SQLOrdering.descNullsFirst(sqlExpression) } + #elseif !GRDBCIPHER + /// Returns an ordering suitable for QueryInterfaceRequest.order() + /// + /// let email: SQLCollatedExpression = Column("email").collating(.nocase) + /// + /// // SELECT * FROM player ORDER BY email COLLATE NOCASE ASC NULLS LAST + /// Player.order(email.ascNullsLast) + /// + /// See https://github.com/groue/GRDB.swift/#the-query-interface + @available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) + public var ascNullsLast: SQLOrderingTerm { + _SQLOrdering.ascNullsLast(sqlExpression) + } + + /// Returns an ordering suitable for QueryInterfaceRequest.order() + /// + /// let email: SQLCollatedExpression = Column("email").collating(.nocase) + /// + /// // SELECT * FROM player ORDER BY email COLLATE NOCASE DESC NULLS FIRST + /// Player.order(email.descNullsFirst) + /// + /// See https://github.com/groue/GRDB.swift/#the-query-interface + @available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) + public var descNullsFirst: SQLOrderingTerm { + _SQLOrdering.descNullsFirst(sqlExpression) + } #endif init(_ expression: SQLExpression, collationName: Database.CollationName) { diff --git a/GRDB/QueryInterface/SQL/SQLOrdering.swift b/GRDB/QueryInterface/SQL/SQLOrdering.swift index 54785a7d7..4e20e3f3b 100644 --- a/GRDB/QueryInterface/SQL/SQLOrdering.swift +++ b/GRDB/QueryInterface/SQL/SQLOrdering.swift @@ -24,10 +24,11 @@ public protocol SQLOrderingTerm: _SQLOrderingTerm { } public enum _SQLOrdering: SQLOrderingTerm, Refinable { case asc(SQLExpression) case desc(SQLExpression) - #if GRDBCUSTOMSQLITE + + // Only available from 3.30.0. This enum is not public, so those cases don't + // harm as long as we don't expose them through public APIs. case ascNullsLast(SQLExpression) case descNullsFirst(SQLExpression) - #endif var expression: SQLExpression { get { @@ -36,12 +37,10 @@ public enum _SQLOrdering: SQLOrderingTerm, Refinable { return expression case .desc(let expression): return expression - #if GRDBCUSTOMSQLITE case .ascNullsLast(let expression): return expression case .descNullsFirst(let expression): return expression - #endif } } set { @@ -50,12 +49,10 @@ public enum _SQLOrdering: SQLOrderingTerm, Refinable { self = .asc(newValue) case .desc: self = .desc(newValue) - #if GRDBCUSTOMSQLITE case .ascNullsLast: self = .ascNullsLast(newValue) case .descNullsFirst: self = .descNullsFirst(newValue) - #endif } } } @@ -67,12 +64,10 @@ public enum _SQLOrdering: SQLOrderingTerm, Refinable { return _SQLOrdering.desc(expression) case .desc(let expression): return _SQLOrdering.asc(expression) - #if GRDBCUSTOMSQLITE case .ascNullsLast(let expression): return _SQLOrdering.descNullsFirst(expression) case .descNullsFirst(let expression): return _SQLOrdering.ascNullsLast(expression) - #endif } } diff --git a/GRDB/QueryInterface/SQL/SQLSpecificExpressible+QueryInterface.swift b/GRDB/QueryInterface/SQL/SQLSpecificExpressible+QueryInterface.swift index 12edf8b51..7c84b6f5e 100644 --- a/GRDB/QueryInterface/SQL/SQLSpecificExpressible+QueryInterface.swift +++ b/GRDB/QueryInterface/SQL/SQLSpecificExpressible+QueryInterface.swift @@ -31,6 +31,22 @@ extension SQLSpecificExpressible { public var descNullsFirst: SQLOrderingTerm { _SQLOrdering.descNullsFirst(sqlExpression) } + #elseif !GRDBCIPHER + /// Returns a value that can be used as an argument to QueryInterfaceRequest.order() + /// + /// See https://github.com/groue/GRDB.swift/#the-query-interface + @available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) + public var ascNullsLast: SQLOrderingTerm { + _SQLOrdering.ascNullsLast(sqlExpression) + } + + /// Returns a value that can be used as an argument to QueryInterfaceRequest.order() + /// + /// See https://github.com/groue/GRDB.swift/#the-query-interface + @available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) + public var descNullsFirst: SQLOrderingTerm { + _SQLOrdering.descNullsFirst(sqlExpression) + } #endif } diff --git a/GRDB/QueryInterface/SQLGeneration/SQLOrderingGenerator.swift b/GRDB/QueryInterface/SQLGeneration/SQLOrderingGenerator.swift index 11ab4c855..b7ff6c0e1 100644 --- a/GRDB/QueryInterface/SQLGeneration/SQLOrderingGenerator.swift +++ b/GRDB/QueryInterface/SQLGeneration/SQLOrderingGenerator.swift @@ -26,12 +26,17 @@ private struct SQLOrderingGenerator: _SQLOrderingTermVisitor { resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " ASC" case .desc(let expression): resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " DESC" - #if GRDBCUSTOMSQLITE + #if GRDBCUSTOMSQLITE case .ascNullsLast(let expression): resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " ASC NULLS LAST" case .descNullsFirst(let expression): resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " DESC NULLS FIRST" - #endif + #elseif !GRDBCIPHER + case .ascNullsLast(let expression): + resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " ASC NULLS LAST" + case .descNullsFirst(let expression): + resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " DESC NULLS FIRST" + #endif } } diff --git a/Tests/GRDBTests/QueryInterfaceRequestTests.swift b/Tests/GRDBTests/QueryInterfaceRequestTests.swift index ccb77d1ba..25b3e7233 100644 --- a/Tests/GRDBTests/QueryInterfaceRequestTests.swift +++ b/Tests/GRDBTests/QueryInterfaceRequestTests.swift @@ -744,6 +744,15 @@ class QueryInterfaceRequestTests: GRDBTestCase { XCTAssertEqual( sql(dbQueue, tableRequest.order(Col.age.descNullsFirst)), "SELECT * FROM \"readers\" ORDER BY \"age\" DESC NULLS FIRST") + #elseif !GRDBCIPHER + if #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) { + XCTAssertEqual( + sql(dbQueue, tableRequest.order(Col.age.ascNullsLast)), + "SELECT * FROM \"readers\" ORDER BY \"age\" ASC NULLS LAST") + XCTAssertEqual( + sql(dbQueue, tableRequest.order(Col.age.descNullsFirst)), + "SELECT * FROM \"readers\" ORDER BY \"age\" DESC NULLS FIRST") + } #endif } @@ -765,6 +774,15 @@ class QueryInterfaceRequestTests: GRDBTestCase { XCTAssertEqual( sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).descNullsFirst)), "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE DESC NULLS FIRST") + #elseif !GRDBCIPHER + if #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) { + XCTAssertEqual( + sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).ascNullsLast)), + "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE ASC NULLS LAST") + XCTAssertEqual( + sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).descNullsFirst)), + "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE DESC NULLS FIRST") + } #endif } @@ -805,6 +823,15 @@ class QueryInterfaceRequestTests: GRDBTestCase { XCTAssertEqual( sql(dbQueue, tableRequest.order(Col.age.ascNullsLast).reversed()), "SELECT * FROM \"readers\" ORDER BY \"age\" DESC NULLS FIRST") + #elseif !GRDBCIPHER + if #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) { + XCTAssertEqual( + sql(dbQueue, tableRequest.order(Col.age.descNullsFirst).reversed()), + "SELECT * FROM \"readers\" ORDER BY \"age\" ASC NULLS LAST") + XCTAssertEqual( + sql(dbQueue, tableRequest.order(Col.age.ascNullsLast).reversed()), + "SELECT * FROM \"readers\" ORDER BY \"age\" DESC NULLS FIRST") + } #endif } @@ -826,6 +853,15 @@ class QueryInterfaceRequestTests: GRDBTestCase { XCTAssertEqual( sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).descNullsFirst).reversed()), "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE ASC NULLS LAST") + #elseif !GRDBCIPHER + if #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) { + XCTAssertEqual( + sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).ascNullsLast).reversed()), + "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE DESC NULLS FIRST") + XCTAssertEqual( + sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).descNullsFirst).reversed()), + "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE ASC NULLS LAST") + } #endif } diff --git a/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift b/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift index 9f2a4aee7..9814dda95 100644 --- a/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift +++ b/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift @@ -259,6 +259,15 @@ class TableRecordQueryInterfaceRequestTests: GRDBTestCase { XCTAssertEqual( sql(dbQueue, Reader.order(Col.age.descNullsFirst)), "SELECT * FROM \"readers\" ORDER BY \"age\" DESC NULLS FIRST") + #elseif !GRDBCIPHER + if #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) { + XCTAssertEqual( + sql(dbQueue, Reader.order(Col.age.ascNullsLast)), + "SELECT * FROM \"readers\" ORDER BY \"age\" ASC NULLS LAST") + XCTAssertEqual( + sql(dbQueue, Reader.order(Col.age.descNullsFirst)), + "SELECT * FROM \"readers\" ORDER BY \"age\" DESC NULLS FIRST") + } #endif } From e2816905bbc8fb75626b15f008abb7570c6523fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Wed, 22 Jul 2020 20:20:06 +0200 Subject: [PATCH 05/13] OSX 11 is OSX 10.16 --- GRDB/FTS/FTS3.swift | 2 +- GRDB/FTS/FTS5.swift | 2 +- GRDB/QueryInterface/SQL/SQLCollatedExpression.swift | 4 ++-- .../SQL/SQLSpecificExpressible+QueryInterface.swift | 4 ++-- Tests/GRDBTests/FTS3TableBuilderTests.swift | 2 +- Tests/GRDBTests/FTS5TableBuilderTests.swift | 2 +- Tests/GRDBTests/QueryInterfaceRequestTests.swift | 8 ++++---- .../TableRecord+QueryInterfaceRequestTests.swift | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/GRDB/FTS/FTS3.swift b/GRDB/FTS/FTS3.swift index c8c00acd5..536e2c9b5 100644 --- a/GRDB/FTS/FTS3.swift +++ b/GRDB/FTS/FTS3.swift @@ -25,7 +25,7 @@ public struct FTS3: VirtualTableModule { /// Remove diacritics from Latin script characters. This /// option matches the raw "remove_diacritics=2" tokenizer argument, /// available from SQLite 3.27.0 - @available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) + @available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) case remove #endif } diff --git a/GRDB/FTS/FTS5.swift b/GRDB/FTS/FTS5.swift index bdda6f6c8..902eadcc1 100644 --- a/GRDB/FTS/FTS5.swift +++ b/GRDB/FTS/FTS5.swift @@ -30,7 +30,7 @@ public struct FTS5: VirtualTableModule { /// Remove diacritics from Latin script characters. This /// option matches the raw "remove_diacritics=2" tokenizer argument, /// available from SQLite 3.27.0 - @available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) + @available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) case remove #endif } diff --git a/GRDB/QueryInterface/SQL/SQLCollatedExpression.swift b/GRDB/QueryInterface/SQL/SQLCollatedExpression.swift index 380e4425f..780538677 100644 --- a/GRDB/QueryInterface/SQL/SQLCollatedExpression.swift +++ b/GRDB/QueryInterface/SQL/SQLCollatedExpression.swift @@ -71,7 +71,7 @@ public struct SQLCollatedExpression { /// Player.order(email.ascNullsLast) /// /// See https://github.com/groue/GRDB.swift/#the-query-interface - @available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) + @available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) public var ascNullsLast: SQLOrderingTerm { _SQLOrdering.ascNullsLast(sqlExpression) } @@ -84,7 +84,7 @@ public struct SQLCollatedExpression { /// Player.order(email.descNullsFirst) /// /// See https://github.com/groue/GRDB.swift/#the-query-interface - @available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) + @available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) public var descNullsFirst: SQLOrderingTerm { _SQLOrdering.descNullsFirst(sqlExpression) } diff --git a/GRDB/QueryInterface/SQL/SQLSpecificExpressible+QueryInterface.swift b/GRDB/QueryInterface/SQL/SQLSpecificExpressible+QueryInterface.swift index 7c84b6f5e..3f65b53fb 100644 --- a/GRDB/QueryInterface/SQL/SQLSpecificExpressible+QueryInterface.swift +++ b/GRDB/QueryInterface/SQL/SQLSpecificExpressible+QueryInterface.swift @@ -35,7 +35,7 @@ extension SQLSpecificExpressible { /// Returns a value that can be used as an argument to QueryInterfaceRequest.order() /// /// See https://github.com/groue/GRDB.swift/#the-query-interface - @available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) + @available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) public var ascNullsLast: SQLOrderingTerm { _SQLOrdering.ascNullsLast(sqlExpression) } @@ -43,7 +43,7 @@ extension SQLSpecificExpressible { /// Returns a value that can be used as an argument to QueryInterfaceRequest.order() /// /// See https://github.com/groue/GRDB.swift/#the-query-interface - @available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) + @available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) public var descNullsFirst: SQLOrderingTerm { _SQLOrdering.descNullsFirst(sqlExpression) } diff --git a/Tests/GRDBTests/FTS3TableBuilderTests.swift b/Tests/GRDBTests/FTS3TableBuilderTests.swift index b2db2aab8..cd51aab51 100644 --- a/Tests/GRDBTests/FTS3TableBuilderTests.swift +++ b/Tests/GRDBTests/FTS3TableBuilderTests.swift @@ -76,7 +76,7 @@ class FTS3TableBuilderTests: GRDBTestCase { } #elseif !GRDBCIPHER func testUnicode61TokenizerDiacriticsRemove() throws { - guard #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) else { + guard #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) else { throw XCTSkip() } let dbQueue = try makeDatabaseQueue() diff --git a/Tests/GRDBTests/FTS5TableBuilderTests.swift b/Tests/GRDBTests/FTS5TableBuilderTests.swift index 8a369180e..e03c0cf8d 100644 --- a/Tests/GRDBTests/FTS5TableBuilderTests.swift +++ b/Tests/GRDBTests/FTS5TableBuilderTests.swift @@ -130,7 +130,7 @@ class FTS5TableBuilderTests: GRDBTestCase { } #elseif !GRDBCIPHER func testUnicode61TokenizerDiacriticsRemove() throws { - guard #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) else { + guard #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) else { throw XCTSkip() } diff --git a/Tests/GRDBTests/QueryInterfaceRequestTests.swift b/Tests/GRDBTests/QueryInterfaceRequestTests.swift index 25b3e7233..65c1e351a 100644 --- a/Tests/GRDBTests/QueryInterfaceRequestTests.swift +++ b/Tests/GRDBTests/QueryInterfaceRequestTests.swift @@ -745,7 +745,7 @@ class QueryInterfaceRequestTests: GRDBTestCase { sql(dbQueue, tableRequest.order(Col.age.descNullsFirst)), "SELECT * FROM \"readers\" ORDER BY \"age\" DESC NULLS FIRST") #elseif !GRDBCIPHER - if #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) { + if #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) { XCTAssertEqual( sql(dbQueue, tableRequest.order(Col.age.ascNullsLast)), "SELECT * FROM \"readers\" ORDER BY \"age\" ASC NULLS LAST") @@ -775,7 +775,7 @@ class QueryInterfaceRequestTests: GRDBTestCase { sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).descNullsFirst)), "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE DESC NULLS FIRST") #elseif !GRDBCIPHER - if #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) { + if #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) { XCTAssertEqual( sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).ascNullsLast)), "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE ASC NULLS LAST") @@ -824,7 +824,7 @@ class QueryInterfaceRequestTests: GRDBTestCase { sql(dbQueue, tableRequest.order(Col.age.ascNullsLast).reversed()), "SELECT * FROM \"readers\" ORDER BY \"age\" DESC NULLS FIRST") #elseif !GRDBCIPHER - if #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) { + if #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) { XCTAssertEqual( sql(dbQueue, tableRequest.order(Col.age.descNullsFirst).reversed()), "SELECT * FROM \"readers\" ORDER BY \"age\" ASC NULLS LAST") @@ -854,7 +854,7 @@ class QueryInterfaceRequestTests: GRDBTestCase { sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).descNullsFirst).reversed()), "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE ASC NULLS LAST") #elseif !GRDBCIPHER - if #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) { + if #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) { XCTAssertEqual( sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).ascNullsLast).reversed()), "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE DESC NULLS FIRST") diff --git a/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift b/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift index 9814dda95..e17bfc22d 100644 --- a/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift +++ b/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift @@ -260,7 +260,7 @@ class TableRecordQueryInterfaceRequestTests: GRDBTestCase { sql(dbQueue, Reader.order(Col.age.descNullsFirst)), "SELECT * FROM \"readers\" ORDER BY \"age\" DESC NULLS FIRST") #elseif !GRDBCIPHER - if #available(OSX 11, iOS 14, tvOS 14, watchOS 7, *) { + if #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) { XCTAssertEqual( sql(dbQueue, Reader.order(Col.age.ascNullsLast)), "SELECT * FROM \"readers\" ORDER BY \"age\" ASC NULLS LAST") From 25baecdc39fe5b10ba353f1abbeae0add79240ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Wed, 22 Jul 2020 20:36:32 +0200 Subject: [PATCH 06/13] CHANGELOG --- CHANGELOG.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aacc01622..04da168ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,7 @@ All notable changes to this project will be documented in this file. GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception: APIs flagged [**:fire: EXPERIMENTAL**](README.md#what-are-experimental-features). Those are unstable, and may break between any two minor releases of the library. - #### 5.x Releases @@ -70,9 +68,9 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception: - [0.110.0](#01100), ... - + +- **New**: [#813](https://github.com/groue/GRDB.swift/pull/813): Expose SQLite 3.31.1 APIs to iOS, macOS, tvOS, watchOS ## 5.0.0-beta.8 From d08d3b311fdb5d2cbcc80ad9442c7646cd55e92d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 23 Jul 2020 07:55:09 +0200 Subject: [PATCH 07/13] Fix for GRDB+SQLCipher --- .../SQLGeneration/SQLOrderingGenerator.swift | 7 ------- 1 file changed, 7 deletions(-) diff --git a/GRDB/QueryInterface/SQLGeneration/SQLOrderingGenerator.swift b/GRDB/QueryInterface/SQLGeneration/SQLOrderingGenerator.swift index b7ff6c0e1..cf161f103 100644 --- a/GRDB/QueryInterface/SQLGeneration/SQLOrderingGenerator.swift +++ b/GRDB/QueryInterface/SQLGeneration/SQLOrderingGenerator.swift @@ -26,17 +26,10 @@ private struct SQLOrderingGenerator: _SQLOrderingTermVisitor { resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " ASC" case .desc(let expression): resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " DESC" - #if GRDBCUSTOMSQLITE case .ascNullsLast(let expression): resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " ASC NULLS LAST" case .descNullsFirst(let expression): resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " DESC NULLS FIRST" - #elseif !GRDBCIPHER - case .ascNullsLast(let expression): - resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " ASC NULLS LAST" - case .descNullsFirst(let expression): - resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " DESC NULLS FIRST" - #endif } } From a526351b4c271e764a76cc191340e6e6bc951554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 23 Jul 2020 08:31:53 +0200 Subject: [PATCH 08/13] Failing test for #812 --- Tests/GRDBTests/QueryInterfaceRequestTests.swift | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Tests/GRDBTests/QueryInterfaceRequestTests.swift b/Tests/GRDBTests/QueryInterfaceRequestTests.swift index ccb77d1ba..7d4378d06 100644 --- a/Tests/GRDBTests/QueryInterfaceRequestTests.swift +++ b/Tests/GRDBTests/QueryInterfaceRequestTests.swift @@ -617,6 +617,21 @@ class QueryInterfaceRequestTests: GRDBTestCase { "SELECT * FROM \"readers\" WHERE 1 AND 0") } + // Regression test for https://github.com/groue/GRDB.swift/issues/812 + func testFilterOnView() throws { + let dbQueue = try makeDatabaseQueue() + try dbQueue.write { db in + try db.execute(sql: "CREATE VIEW v AS SELECT * FROM readers") + struct ViewRecord: TableRecord, FetchableRecord, Decodable { + static let databaseTableName = "v" + } + _ = try ViewRecord.filter(Column("id") == 1).fetchOne(db) + XCTAssertEqual( + lastSQLQuery, + "SELECT * FROM \"v\" WHERE \"id\" = 1 LIMIT 1") + } + } + // MARK: - Group From 2f54eda08a5f98f573631168c5708c1f37410f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 23 Jul 2020 08:46:05 +0200 Subject: [PATCH 09/13] Fix #812 --- GRDB/QueryInterface/SQL/SQLRelation.swift | 2 +- .../SQLGeneration/SQLGenerationContext.swift | 1 + .../SQLGeneration/SQLQueryGenerator.swift | 21 +++++++++++++------ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/GRDB/QueryInterface/SQL/SQLRelation.swift b/GRDB/QueryInterface/SQL/SQLRelation.swift index c628df8d9..7fac40144 100644 --- a/GRDB/QueryInterface/SQL/SQLRelation.swift +++ b/GRDB/QueryInterface/SQL/SQLRelation.swift @@ -395,7 +395,7 @@ enum SQLSource { func qualified(with alias: TableAlias) -> SQLSource { switch self { - case let .table(tableName, sourceAlias): + case let .table(tableName: tableName, alias: sourceAlias): if let sourceAlias = sourceAlias { alias.becomeProxy(of: sourceAlias) return self diff --git a/GRDB/QueryInterface/SQLGeneration/SQLGenerationContext.swift b/GRDB/QueryInterface/SQLGeneration/SQLGenerationContext.swift index 8643527d8..644d96cff 100644 --- a/GRDB/QueryInterface/SQLGeneration/SQLGenerationContext.swift +++ b/GRDB/QueryInterface/SQLGeneration/SQLGenerationContext.swift @@ -405,6 +405,7 @@ public class TableAlias: Hashable { /// } public var exists: SQLExpression { + // TODO: this fails with SQL views. Can we do something? _SQLExpressionQualifiedFastPrimaryKey(alias: self) != nil } diff --git a/GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift b/GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift index 4a571b668..63d419bbe 100644 --- a/GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift +++ b/GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift @@ -175,9 +175,12 @@ struct SQLQueryGenerator: Refinable { // Can we intersect the region with rowIds? // // Give up unless request feeds from a single database table - guard case let .table(tableName: tableName, alias: alias) = relation.source else { - // TODO: try harder - return selectedRegion + guard + case let .table(tableName: tableName, alias: alias) = relation.source, + try db.tableExists(tableName) // skip views + else { + // TODO: try harder + return selectedRegion } // The filter knows better @@ -206,7 +209,10 @@ struct SQLQueryGenerator: Refinable { } // Do we filter on a unique key? - if case let .table(tableName, sourceAlias) = relation.source { + if + case let .table(tableName: tableName, alias: sourceAlias) = relation.source, + try db.tableExists(tableName) // skip views + { let identifyingColums = try filters .joined(operator: .and) .identifyingColums(db, for: sourceAlias) @@ -432,8 +438,11 @@ struct SQLQueryGenerator: Refinable { } // Grouping something which is not a table: assume non unique grouping. - guard case let .table(tableName: tableName, alias: alias) = relation.source else { - return .nonUnique + guard + case let .table(tableName: tableName, alias: alias) = relation.source, + try db.tableExists(tableName) // skip views + else { + return .nonUnique } var groupingColumns: Set = [] From 0ea70d6bfcc06546025852c5cc7bafd74b6cc0bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 23 Jul 2020 19:00:58 +0200 Subject: [PATCH 10/13] CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04da168ff..64e4a88ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,6 +71,7 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception: ## Next Release - **New**: [#813](https://github.com/groue/GRDB.swift/pull/813): Expose SQLite 3.31.1 APIs to iOS, macOS, tvOS, watchOS +- **Fixed**: [#814](https://github.com/groue/GRDB.swift/pull/814): Fix regression with views ## 5.0.0-beta.8 From c4991176f4ded419acbc6dbcb87d1ff3764c3565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 23 Jul 2020 19:04:58 +0200 Subject: [PATCH 11/13] v5.0.0-beta.9 --- CHANGELOG.md | 11 +++++++++- Documentation/FullTextSearch.md | 4 ++-- Documentation/Migrations.md | 2 +- GRDB.swift.podspec | 2 +- Makefile | 6 +++--- README.md | 38 ++++++++++++++++----------------- Support/Info.plist | 2 +- 7 files changed, 37 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64e4a88ab..ce64bf565 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,13 @@ All notable changes to this project will be documented in this file. GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception: APIs flagged [**:fire: EXPERIMENTAL**](README.md#what-are-experimental-features). Those are unstable, and may break between any two minor releases of the library. + #### 5.x Releases -- `5.0.0` Betas - [5.0.0-beta](#500-beta) | [5.0.0-beta.2](#500-beta2) | [5.0.0-beta.3](#500-beta3) | [5.0.0-beta.4](#500-beta4) | [5.0.0-beta.5](#500-beta5) | [5.0.0-beta.6](#500-beta6) | [5.0.0-beta.7](#500-beta7) | [5.0.0-beta.7](#500-beta8) +- `5.0.0` Betas - [5.0.0-beta](#500-beta) | [5.0.0-beta.2](#500-beta2) | [5.0.0-beta.3](#500-beta3) | [5.0.0-beta.4](#500-beta4) | [5.0.0-beta.5](#500-beta5) | [5.0.0-beta.6](#500-beta6) | [5.0.0-beta.7](#500-beta7) | [5.0.0-beta.8](#500-beta8) | [5.0.0-beta.9](#500-beta9) #### 4.x Releases @@ -68,7 +70,14 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception: - [0.110.0](#01100), ... + + + +## 5.0.0-beta.9 + +Released July 23, 2020 • [diff](https://github.com/groue/GRDB.swift/compare/v5.0.0-beta.8...v5.0.0-beta.9) - **New**: [#813](https://github.com/groue/GRDB.swift/pull/813): Expose SQLite 3.31.1 APIs to iOS, macOS, tvOS, watchOS - **Fixed**: [#814](https://github.com/groue/GRDB.swift/pull/814): Fix regression with views diff --git a/Documentation/FullTextSearch.md b/Documentation/FullTextSearch.md index 3ac780708..fcd577ebf 100644 --- a/Documentation/FullTextSearch.md +++ b/Documentation/FullTextSearch.md @@ -280,7 +280,7 @@ let pattern = FTS3Pattern(matchingAnyTokenIn: "") // nil let pattern = FTS3Pattern(matchingAnyTokenIn: "*") // nil ``` -FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/StatementArguments.html): +FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/StatementArguments.html): ```swift let documents = try Document.fetchAll(db, @@ -529,7 +529,7 @@ let pattern = FTS5Pattern(matchingAnyTokenIn: "") // nil let pattern = FTS5Pattern(matchingAnyTokenIn: "*") // nil ``` -FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/StatementArguments.html): +FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/StatementArguments.html): ```swift let documents = try Document.fetchAll(db, diff --git a/Documentation/Migrations.md b/Documentation/Migrations.md index 331fab06b..0c74aeff9 100644 --- a/Documentation/Migrations.md +++ b/Documentation/Migrations.md @@ -68,7 +68,7 @@ try dbQueue.read { db in } ``` -See the [DatabaseMigrator reference](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/DatabaseMigrator.html) for more migrator methods. +See the [DatabaseMigrator reference](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/DatabaseMigrator.html) for more migrator methods. ## The `eraseDatabaseOnSchemaChange` Option diff --git a/GRDB.swift.podspec b/GRDB.swift.podspec index 48ada8829..3a6711b7f 100644 --- a/GRDB.swift.podspec +++ b/GRDB.swift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'GRDB.swift' - s.version = '5.0.0-beta.8' + s.version = '5.0.0-beta.9' s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = 'A toolkit for SQLite databases, with a focus on application development.' diff --git a/Makefile b/Makefile index c1ff3a999..169ec792d 100644 --- a/Makefile +++ b/Makefile @@ -401,10 +401,10 @@ ifdef JAZZY --author 'Gwendal Roué' \ --author_url https://github.com/groue \ --github_url https://github.com/groue/GRDB.swift \ - --github-file-prefix https://github.com/groue/GRDB.swift/tree/v5.0.0-beta.8 \ - --module-version 5.0.0-beta.8 \ + --github-file-prefix https://github.com/groue/GRDB.swift/tree/v5.0.0-beta.9 \ + --module-version 5.0.0-beta.9 \ --module GRDB \ - --root-url http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/ \ + --root-url http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/ \ --output Documentation/Reference \ --xcodebuild-arguments -project,GRDB.xcodeproj,-scheme,GRDBiOS else diff --git a/README.md b/README.md index a0cf61de8..653e3e92d 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,13 @@ --- -**Latest release**: July 19, 2020 • version 5.0.0-beta.8 • [CHANGELOG](CHANGELOG.md) • [Migrating From GRDB 4 to GRDB 5](Documentation/GRDB5MigrationGuide.md) +**Latest release**: July 23, 2020 • version 5.0.0-beta.9 • [CHANGELOG](CHANGELOG.md) • [Migrating From GRDB 4 to GRDB 5](Documentation/GRDB5MigrationGuide.md) **Requirements**: iOS 10.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ • Swift 5.2+ / Xcode 11.4+ | Swift version | GRDB version | | ------------- | ----------------------------------------------------------- | -| **Swift 5.2** | **v5.0.0-beta.8**, [v4.14.0](https://github.com/groue/GRDB.swift/tree/v4.14.0)| +| **Swift 5.2** | **v5.0.0-beta.9**, [v4.14.0](https://github.com/groue/GRDB.swift/tree/v4.14.0)| | Swift 5.1 | [v4.14.0](https://github.com/groue/GRDB.swift/tree/v4.14.0) | | Swift 5 | [v4.14.0](https://github.com/groue/GRDB.swift/tree/v4.14.0) | | Swift 4.2 | [v4.14.0](https://github.com/groue/GRDB.swift/tree/v4.14.0) | @@ -269,7 +269,7 @@ Documentation #### Reference -- [GRDB Reference](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/index.html) (generated by [Jazzy](https://github.com/realm/jazzy)) +- [GRDB Reference](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/index.html) (generated by [Jazzy](https://github.com/realm/jazzy)) #### Getting Started @@ -471,7 +471,7 @@ let dbQueue = try DatabaseQueue( configuration: config) ``` -See [Configuration](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/Configuration.html) for more details. +See [Configuration](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/Configuration.html) for more details. ## Database Pools @@ -551,7 +551,7 @@ let dbPool = try DatabasePool( configuration: config) ``` -See [Configuration](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/Configuration.html) for more details. +See [Configuration](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/Configuration.html) for more details. Database pools are more memory-hungry than database queues. See [Memory Management](#memory-management) for more information. @@ -611,7 +611,7 @@ try dbQueue.write { db in } ``` -The `?` and colon-prefixed keys like `:score` in the SQL query are the **statements arguments**. You pass arguments with arrays or dictionaries, as in the example above. See [Values](#values) for more information on supported arguments types (Bool, Int, String, Date, Swift enums, etc.), and [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments. +The `?` and colon-prefixed keys like `:score` in the SQL query are the **statements arguments**. You pass arguments with arrays or dictionaries, as in the example above. See [Values](#values) for more information on supported arguments types (Bool, Int, String, Date, Swift enums, etc.), and [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments. You can also embed query arguments right into your SQL queries, with the `literal` argument label, as in the example below. See [SQL Interpolation] for more details. @@ -814,7 +814,7 @@ try dbQueue.read { db in - **Cursors are granted with direct access to SQLite,** unlike arrays and sets that have to take the time to copy database values. If you look after extra performance, you may prefer cursors. -- **Cursors adopt the [Cursor](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Protocols/Cursor.html) protocol, which looks a lot like standard [lazy sequences](https://developer.apple.com/reference/swift/lazysequenceprotocol) of Swift.** As such, cursors come with many convenience methods: `compactMap`, `contains`, `dropFirst`, `dropLast`, `drop(while:)`, `enumerated`, `filter`, `first`, `flatMap`, `forEach`, `joined`, `joined(separator:)`, `max`, `max(by:)`, `min`, `min(by:)`, `map`, `prefix`, `prefix(while:)`, `reduce`, `reduce(into:)`, `suffix`: +- **Cursors adopt the [Cursor](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Protocols/Cursor.html) protocol, which looks a lot like standard [lazy sequences](https://developer.apple.com/reference/swift/lazysequenceprotocol) of Swift.** As such, cursors come with many convenience methods: `compactMap`, `contains`, `dropFirst`, `dropLast`, `drop(while:)`, `enumerated`, `filter`, `first`, `flatMap`, `forEach`, `joined`, `joined(separator:)`, `max`, `max(by:)`, `min`, `min(by:)`, `map`, `prefix`, `prefix(while:)`, `reduce`, `reduce(into:)`, `suffix`: ```swift // Prints all Github links @@ -897,7 +897,7 @@ let rows = try Row.fetchAll(db, arguments: ["name": "Arthur"]) ``` -See [Values](#values) for more information on supported arguments types (Bool, Int, String, Date, Swift enums, etc.), and [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments. +See [Values](#values) for more information on supported arguments types (Bool, Int, String, Date, Swift enums, etc.), and [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments. Unlike row arrays that contain copies of the database rows, row cursors are close to the SQLite metal, and require a little care: @@ -1182,7 +1182,7 @@ GRDB ships with built-in support for the following value types: - Generally speaking, all types that adopt the [DatabaseValueConvertible](#custom-value-types) protocol. -Values can be used as [statement arguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/StatementArguments.html): +Values can be used as [statement arguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/StatementArguments.html): ```swift let url: URL = ... @@ -1589,7 +1589,7 @@ try dbQueue.inDatabase { db in // or dbPool.writeWithoutTransaction } ``` -Transactions can't be left opened unless you set the [allowsUnsafeTransactions](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/Configuration.html) configuration flag: +Transactions can't be left opened unless you set the [allowsUnsafeTransactions](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/Configuration.html) configuration flag: ```swift // fatal error: A transaction has been left opened at the end of a database access @@ -1703,7 +1703,7 @@ try dbQueue.write { db in } ``` -The `?` and colon-prefixed keys like `:name` in the SQL query are the statement arguments. You set them with arrays or dictionaries (arguments are actually of type [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/StatementArguments.html), which happens to adopt the ExpressibleByArrayLiteral and ExpressibleByDictionaryLiteral protocols). +The `?` and colon-prefixed keys like `:name` in the SQL query are the statement arguments. You set them with arrays or dictionaries (arguments are actually of type [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/StatementArguments.html), which happens to adopt the ExpressibleByArrayLiteral and ExpressibleByDictionaryLiteral protocols). ```swift updateStatement.arguments = ["name": "Arthur", "score": 1000] @@ -2474,7 +2474,7 @@ try Place.fetchSet(db, sql: "SELECT ...", arguments:...) // Set try Place.fetchOne(db, sql: "SELECT ...", arguments:...) // Place? ``` -See [fetching methods](#fetching-methods) for information about the `fetchCursor`, `fetchAll`, `fetchSet` and `fetchOne` methods. See [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/StatementArguments.html) for more information about the query arguments. +See [fetching methods](#fetching-methods) for information about the `fetchCursor`, `fetchAll`, `fetchSet` and `fetchOne` methods. See [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/StatementArguments.html) for more information about the query arguments. > :point_up: **Note**: for performance reasons, the same row argument to `init(row:)` is reused during the iteration of a fetch query. If you want to keep the row for later use, make sure to store a copy: `self.row = row.copy()`. @@ -2855,7 +2855,7 @@ protocol EncodableRecord { } ``` -See [DatabaseDateDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Enums/DatabaseDateDecodingStrategy.html), [DatabaseDateEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Enums/DatabaseDateEncodingStrategy.html), and [DatabaseUUIDEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Enums/DatabaseUUIDEncodingStrategy.html) to learn about all available strategies. +See [DatabaseDateDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Enums/DatabaseDateDecodingStrategy.html), [DatabaseDateEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Enums/DatabaseDateEncodingStrategy.html), and [DatabaseUUIDEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Enums/DatabaseUUIDEncodingStrategy.html) to learn about all available strategies. > :point_up: **Note**: there is no customization of uuid decoding, because UUID can already decode all its encoded variants (16-bytes blobs, and uuid strings). @@ -4253,7 +4253,7 @@ Player // SELECT * FROM player ``` -Raw SQL snippets are also accepted, with eventual [arguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/StatementArguments.html): +Raw SQL snippets are also accepted, with eventual [arguments](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/StatementArguments.html): ```swift // SELECT DATE(creationDate), COUNT(*) FROM player WHERE name = 'Arthur' GROUP BY date(creationDate) @@ -4904,7 +4904,7 @@ try Player.customRequest().fetchAll(db) // [Player] - The `adapted(_:)` method eases the consumption of complex rows with [row adapters](#row-adapters). See [Joined Queries Support](#joined-queries-support) for some sample code that uses this method. -- [AnyFetchRequest](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/AnyFetchRequest.html): a type-erased request. +- [AnyFetchRequest](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/AnyFetchRequest.html): a type-erased request. ## Joined Queries Support @@ -6064,7 +6064,7 @@ After `stopObservingDatabaseChangesUntilNextTransaction()`, the `databaseDidChan ### DatabaseRegion -**[DatabaseRegion](https://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/DatabaseRegion.html) is a type that helps observing changes in the results of a database [request](#requests)**. +**[DatabaseRegion](https://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/DatabaseRegion.html) is a type that helps observing changes in the results of a database [request](#requests)**. A request knows which database modifications can impact its results. It can communicate this information to [transaction observers](#transactionobserver-protocol) by the way of a DatabaseRegion. @@ -6074,7 +6074,7 @@ DatabaseRegion fuels, for example, [ValueObservation and DatabaseRegionObservati For example, if you observe the region of `Player.select(max(Column("score")))`, then you'll get be notified of all changes performed on the `score` column of the `player` table (updates, insertions and deletions), even if they do not modify the value of the maximum score. However, you will not get any notification for changes performed on other database tables, or updates to other columns of the player table. -For more details, see the [reference](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/DatabaseRegion.html#/s:4GRDB14DatabaseRegionV10isModified2bySbAA0B5EventV_tF). +For more details, see the [reference](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/DatabaseRegion.html#/s:4GRDB14DatabaseRegionV10isModified2bySbAA0B5EventV_tF). #### The DatabaseRegionConvertible Protocol @@ -7171,7 +7171,7 @@ try snapshot2.read { db in ### DatabaseWriter and DatabaseReader Protocols -Both DatabaseQueue and DatabasePool adopt the [DatabaseReader](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Protocols/DatabaseReader.html) and [DatabaseWriter](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Protocols/DatabaseWriter.html) protocols. DatabaseSnapshot adopts DatabaseReader only. +Both DatabaseQueue and DatabasePool adopt the [DatabaseReader](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Protocols/DatabaseReader.html) and [DatabaseWriter](http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Protocols/DatabaseWriter.html) protocols. DatabaseSnapshot adopts DatabaseReader only. These protocols provide a unified API that let you write generic code that targets all concurrency modes. They fuel, for example: @@ -7902,4 +7902,4 @@ This chapter has been superseded by [ValueObservation] and [DatabaseRegionObserv [Sharing a Database]: Documentation/SharingADatabase.md [FAQ]: #faq [Database Observation]: #database-changes-observation -[SQLRequest]: http://groue.github.io/GRDB.swift/docs/5.0.0-beta.8/Structs/SQLRequest.html +[SQLRequest]: http://groue.github.io/GRDB.swift/docs/5.0.0-beta.9/Structs/SQLRequest.html diff --git a/Support/Info.plist b/Support/Info.plist index deb05ed7a..9dd0315ef 100644 --- a/Support/Info.plist +++ b/Support/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 5.0.0-beta.8 + 5.0.0-beta.9 CFBundleSignature ???? CFBundleVersion From 24f9b2c01b29ff92a8b274099608533a82fe4a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 23 Jul 2020 20:24:33 +0200 Subject: [PATCH 12/13] Makefile: add support for Xcode 11.6 --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 169ec792d..f2c52f236 100644 --- a/Makefile +++ b/Makefile @@ -56,6 +56,13 @@ ifeq ($(XCODEVERSION),12.0) MIN_IOS_DESTINATION = "platform=iOS Simulator,name=iPhone 5s,OS=10.3.1" MAX_TVOS_DESTINATION = "platform=tvOS Simulator,name=Apple TV 4K,OS=14.0" MIN_TVOS_DESTINATION = "platform=tvOS Simulator,name=Apple TV,OS=10.2" +else ifeq ($(XCODEVERSION),11.6) + MAX_SWIFT_VERSION = 5.2 + MIN_SWIFT_VERSION = # MAX_SWIFT_VERSION is the minimum supported Swift version + MAX_IOS_DESTINATION = "platform=iOS Simulator,name=iPhone 11,OS=13.6" + MIN_IOS_DESTINATION = "platform=iOS Simulator,name=iPhone 5s,OS=10.3.1" + MAX_TVOS_DESTINATION = "platform=tvOS Simulator,name=Apple TV 4K,OS=13.4" + MIN_TVOS_DESTINATION = "platform=tvOS Simulator,name=Apple TV,OS=10.2" else ifeq ($(XCODEVERSION),11.5) MAX_SWIFT_VERSION = 5.2 MIN_SWIFT_VERSION = # MAX_SWIFT_VERSION is the minimum supported Swift version From 531d732437755a9d507f10470ae689dbb1d8f046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 23 Jul 2020 20:38:19 +0200 Subject: [PATCH 13/13] Travis: bump to Xcode 11.6 --- .travis.yml | 205 ++++++++++++++++++++++++++++------------------------ 1 file changed, 109 insertions(+), 96 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5334c8f9c..d189df4f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,18 +28,122 @@ jobs: include: ########################################### - ## Test GRDB Xcode 11.4 + ## Test GRDB Xcode 11.6 - - name: "Test GRDB Xcode 11.4 - GRDBOSX" + - name: "Test GRDB Xcode 11.6 - GRDBOSX" gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 + osx_image: xcode11.6 script: make test_framework_GRDBOSX_maxSwift - - name: "Test GRDB Xcode 11.4 - GRDBWatchOS" + - name: "Test GRDB Xcode 11.6 - GRDBWatchOS" gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 + osx_image: xcode11.6 script: make test_framework_GRDBWatchOS + - name: "Test GRDB Xcode 11.6 - GRDBiOS iOS maxTarget" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_framework_GRDBiOS_maxTarget_maxSwift + + - name: "Test GRDB Xcode 11.6 - GRDBiOS iOS minTarget" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_framework_GRDBiOS_minTarget + + - name: "Test GRDB Xcode 11.6 - GRDBtvOS maxTarget" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_framework_GRDBtvOS_maxTarget_maxSwift + + - name: "Test GRDB Xcode 11.6 - GRDBtvOS minTarget" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_framework_GRDBtvOS_minTarget + + - name: "Test GRDB Xcode 11.6 - SPM" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_SPM + + ########################################### + ## Test GRDBCustom Xcode 11.6 + + - name: "Test GRDBCustom Xcode 11.6 - GRDBOSX" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_framework_GRDBCustomSQLiteOSX + + - name: "Test GRDBCustom Xcode 11.6 - GRDBiOS maxTarget" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_framework_GRDBCustomSQLiteiOS_maxTarget_maxSwift + + - name: "Test GRDBCustom Xcode 11.6 - GRDBiOS minTarget" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_framework_GRDBCustomSQLiteiOS_minTarget + + ########################################### + ## Test SQLCipher Xcode 11.6 + + - name: "Test SQLCipher Xcode 11.6 - SQLCipher 3" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_framework_SQLCipher3 + + - name: "Test SQLCipher Xcode 11.6 - SQLCipher 4" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_framework_SQLCipher4 + + ########################################### + ## Test Installation Xcode 11.6 + + # Manual Install + - name: "Test Installation Xcode 11.6 - Manual Install" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_install_manual + + # CocoaPods Lint + - name: "Test Installation Xcode 11.6 - CocoaPods Lint" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_CocoaPodsLint_GRDB + + # CocoaPods Install GRDB + - name: "Test Installation Xcode 11.6 - CocoaPods Framework" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_install_GRDB_CocoaPods_framework + + # CocoaPods Install GRDB + - name: "Test Installation Xcode 11.6 - CocoaPods Static" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_install_GRDB_CocoaPods_static + + # SPM Install + - name: "Test Installation Xcode 11.6 - SPM Package" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_install_SPM_Package + + # SPM Install + - name: "Test Installation Xcode 11.6 - SPM Package in Xcode Project" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_install_SPM_Project + + # Custom SQLite Install + - name: "Test Installation Xcode 11.6 - Custom SQLite" + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11.6 + script: make test_install_customSQLite + + ########################################### + ## Test GRDB Xcode 11.4 + - name: "Test GRDB Xcode 11.4 - GRDBiOS iOS maxTarget" gemfile: .ci/gemfiles/Gemfile.travis osx_image: xcode11.4 @@ -49,94 +153,3 @@ jobs: gemfile: .ci/gemfiles/Gemfile.travis osx_image: xcode11.4 script: make test_framework_GRDBiOS_minTarget - - - name: "Test GRDB Xcode 11.4 - GRDBtvOS maxTarget" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_framework_GRDBtvOS_maxTarget_maxSwift - - - name: "Test GRDB Xcode 11.4 - GRDBtvOS minTarget" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_framework_GRDBtvOS_minTarget - - - name: "Test GRDB Xcode 11.4 - SPM" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_SPM - - ########################################### - ## Test GRDBCustom Xcode 11.4 - - - name: "Test GRDBCustom Xcode 11.4 - GRDBOSX" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_framework_GRDBCustomSQLiteOSX - - - name: "Test GRDBCustom Xcode 11.4 - GRDBiOS maxTarget" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_framework_GRDBCustomSQLiteiOS_maxTarget_maxSwift - - - name: "Test GRDBCustom Xcode 11.4 - GRDBiOS minTarget" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_framework_GRDBCustomSQLiteiOS_minTarget - - ########################################### - ## Test SQLCipher Xcode 11.4 - - - name: "Test SQLCipher Xcode 11.4 - SQLCipher 3" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_framework_SQLCipher3 - - - name: "Test SQLCipher Xcode 11.4 - SQLCipher 4" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_framework_SQLCipher4 - - ########################################### - ## Test Installation Xcode 11.4 - - # Manual Install - - name: "Test Installation Xcode 11.4 - Manual Install" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_install_manual - - # CocoaPods Lint - - name: "Test Installation Xcode 11.4 - CocoaPods Lint" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_CocoaPodsLint_GRDB - - # CocoaPods Install GRDB - - name: "Test Installation Xcode 11.4 - CocoaPods Framework" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_install_GRDB_CocoaPods_framework - - # CocoaPods Install GRDB - - name: "Test Installation Xcode 11.4 - CocoaPods Static" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_install_GRDB_CocoaPods_static - - # SPM Install - - name: "Test Installation Xcode 11.4 - SPM Package" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_install_SPM_Package - - # SPM Install - - name: "Test Installation Xcode 11.4 - SPM Package in Xcode Project" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_install_SPM_Project - - # Custom SQLite Install - - name: "Test Installation Xcode 11.4 - Custom SQLite" - gemfile: .ci/gemfiles/Gemfile.travis - osx_image: xcode11.4 - script: make test_install_customSQLite