Skip to content

Commit 13e1f4d

Browse files
committed
Merge branch 'development'
2 parents 9e3eebf + 8aaf1af commit 13e1f4d

File tree

11 files changed

+75
-43
lines changed

11 files changed

+75
-43
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
77

88
#### 6.x Releases
99

10+
- `6.1.x` Releases - [6.1.0](#610)
1011
- `6.0.x` Releases - [6.0.0](#600)
1112
- `6.0.0` Betas - [6.0.0-beta](#600-beta) | [6.0.0-beta.2](#600-beta2) | [6.0.0-beta.3](#600-beta3) | [6.0.0-beta.4](#600-beta4)
1213

@@ -98,6 +99,12 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
9899

99100
---
100101

102+
## 6.1.0
103+
104+
Released October 20, 2022 • [diff](https://github.com/groue/GRDB.swift/compare/v6.0.0...v6.1.0)
105+
106+
- **New**: [#1288](https://github.com/groue/GRDB.swift/pull/1288) by [@jcavar](https://github.com/jcavar): Support for strict tables
107+
101108
## 6.0.0
102109

103110
Released September 9, 2022 • [diff](https://github.com/groue/GRDB.swift/compare/v6.0.0-beta.4...v6.0.0)

Documentation/FullTextSearch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ let pattern = FTS3Pattern(matchingAnyTokenIn: "") // nil
304304
let pattern = FTS3Pattern(matchingAnyTokenIn: "*") // nil
305305
```
306306

307-
FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/6.0/Structs/StatementArguments.html):
307+
FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/6.1/Structs/StatementArguments.html):
308308

309309
```swift
310310
let documents = try Document.fetchAll(db,
@@ -587,7 +587,7 @@ let pattern = FTS5Pattern(matchingAnyTokenIn: "") // nil
587587
let pattern = FTS5Pattern(matchingAnyTokenIn: "*") // nil
588588
```
589589

590-
FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/6.0/Structs/StatementArguments.html):
590+
FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/6.1/Structs/StatementArguments.html):
591591

592592
```swift
593593
let documents = try Document.fetchAll(db,

Documentation/Migrations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ try dbQueue.read { db in
7777
}
7878
```
7979

80-
See the [DatabaseMigrator reference](http://groue.github.io/GRDB.swift/docs/6.0/Structs/DatabaseMigrator.html) for more migrator methods.
80+
See the [DatabaseMigrator reference](http://groue.github.io/GRDB.swift/docs/6.1/Structs/DatabaseMigrator.html) for more migrator methods.
8181

8282

8383
## The `eraseDatabaseOnSchemaChange` Option

GRDB.swift.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'GRDB.swift'
3-
s.version = '6.0.0'
3+
s.version = '6.1.0'
44

55
s.license = { :type => 'MIT', :file => 'LICENSE' }
66
s.summary = 'A toolkit for SQLite databases, with a focus on application development.'

GRDB/Core/Statement.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ final class StatementCursor: DatabaseCursor {
504504
try? _statement.reset()
505505
}
506506

507-
@usableFromInline
507+
@inlinable
508508
func _element(sqliteStatement: SQLiteStatement) throws { }
509509
}
510510

GRDB/QueryInterface/Schema/TableDefinition.swift

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,16 @@ public struct TableOptions: OptionSet {
241241
/// Creates a without rowid table. See <https://www.sqlite.org/withoutrowid.html>
242242
public static let withoutRowID = TableOptions(rawValue: 1 << 2)
243243

244-
#if GRDBCUSTOMSQLITE
245-
/// Creates a strict table. See <https://www.sqlite.org/stricttables.html>
244+
#if GRDBCUSTOMSQLITE || GRDBCIPHER
245+
/// Creates a STRICT table
246+
///
247+
/// See <https://www.sqlite.org/stricttables.html>
248+
public static let strict = TableOptions(rawValue: 1 << 3)
249+
#else
250+
/// Creates a STRICT table
251+
///
252+
/// See <https://www.sqlite.org/stricttables.html>
253+
@available(iOS 15.4, macOS 12.4, tvOS 15.4, watchOS 8.5, *) // SQLite 3.37+
246254
public static let strict = TableOptions(rawValue: 1 << 3)
247255
#endif
248256
}
@@ -641,12 +649,17 @@ public final class TableDefinition {
641649

642650
var tableOptions: [String] = []
643651

644-
#if GRDBCUSTOMSQLITE
652+
#if GRDBCUSTOMSQLITE || GRDBCIPHER
645653
if options.contains(.strict) {
646654
tableOptions.append("STRICT")
647655
}
656+
#else
657+
if #available(iOS 15.4, macOS 12.4, tvOS 15.4, watchOS 8.5, *) {
658+
if options.contains(.strict) {
659+
tableOptions.append("STRICT")
660+
}
661+
}
648662
#endif
649-
650663
if options.contains(.withoutRowID) {
651664
tableOptions.append("WITHOUT ROWID")
652665
}

GRDB/Record/FetchableRecord.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,12 @@ public final class RecordCursor<Record: FetchableRecord>: DatabaseCursor {
521521
public let _statement: Statement
522522
/// :nodoc:
523523
public var _isDone = false
524-
private let row: Row // Instantiated once, reused for performance
524+
@usableFromInline
525+
let _row: Row // Instantiated once, reused for performance
525526

526527
init(statement: Statement, arguments: StatementArguments? = nil, adapter: (any RowAdapter)? = nil) throws {
527528
self._statement = statement
528-
row = try Row(statement: statement).adapted(with: adapter, layout: statement)
529+
_row = try Row(statement: statement).adapted(with: adapter, layout: statement)
529530
try statement.reset(withArguments: arguments)
530531
}
531532

@@ -536,8 +537,9 @@ public final class RecordCursor<Record: FetchableRecord>: DatabaseCursor {
536537
}
537538

538539
/// :nodoc:
540+
@inlinable
539541
public func _element(sqliteStatement: SQLiteStatement) throws -> Record {
540-
try Record(row: row)
542+
try Record(row: _row)
541543
}
542544
}
543545

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# make distclean - Restore repository to a pristine state
99

1010
default: test
11-
smokeTest: test_framework_GRDBiOS_maxTarget test_framework_GRDBiOS_minTarget test_framework_SQLCipher4Encrypted test_framework_GRDBCustomSQLiteiOS_maxTarget test_SPM
11+
smokeTest: test_framework_GRDBiOS_maxTarget test_framework_GRDBiOS_minTarget test_framework_SQLCipher3 test_framework_SQLCipher4Encrypted test_framework_GRDBCustomSQLiteiOS_maxTarget test_SPM
1212

1313
# Requirements
1414
# ============
@@ -478,10 +478,10 @@ ifdef JAZZY
478478
--author_url https://github.com/groue \
479479
--source-host github \
480480
--source-host-url https://github.com/groue/GRDB.swift \
481-
--source-host-files-url https://github.com/groue/GRDB.swift/tree/v6.0.0 \
482-
--module-version 6.0.0 \
481+
--source-host-files-url https://github.com/groue/GRDB.swift/tree/v6.1.0 \
482+
--module-version 6.1.0 \
483483
--module GRDB \
484-
--root-url http://groue.github.io/GRDB.swift/docs/6.0/ \
484+
--root-url http://groue.github.io/GRDB.swift/docs/6.1/ \
485485
--output Documentation/Reference \
486486
--swift-build-tool xcodebuild \
487487
--undocumented-text '' \

0 commit comments

Comments
 (0)