Skip to content

Commit b44c9d7

Browse files
Merge pull request #1 from thebluepotato/master
Updating swift 4 branch from master
2 parents 36042f1 + d9672a8 commit b44c9d7

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ osx_image: xcode9
44
env:
55
global:
66
- IOS_SIMULATOR="iPhone 6s"
7+
- IOS_VERSION="11.0"
78
matrix:
89
include:
910
- env: BUILD_SCHEME="SQLite iOS"

Documentation/Index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ We can log SQL using the database’s `trace` function.
15781578
15791579
``` swift
15801580
#if DEBUG
1581-
db.trace(print)
1581+
db.trace { print($0) }
15821582
#endif
15831583
```
15841584

Sources/SQLite/Core/Connection.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ public final class Connection {
3838
/// The location of a SQLite database.
3939
public enum Location {
4040

41-
/// An in-memory database (equivalent to `.URI(":memory:")`).
41+
/// An in-memory database (equivalent to `.uri(":memory:")`).
4242
///
4343
/// See: <https://www.sqlite.org/inmemorydb.html#sharedmemdb>
4444
case inMemory
4545

46-
/// A temporary, file-backed database (equivalent to `.URI("")`).
46+
/// A temporary, file-backed database (equivalent to `.uri("")`).
4747
///
4848
/// See: <https://www.sqlite.org/inmemorydb.html#temp_db>
4949
case temporary
@@ -93,7 +93,7 @@ public final class Connection {
9393
/// - location: The location of the database. Creates a new database if it
9494
/// doesn’t already exist (unless in read-only mode).
9595
///
96-
/// Default: `.InMemory`.
96+
/// Default: `.inMemory`.
9797
///
9898
/// - readonly: Whether or not to open the database in a read-only state.
9999
///
@@ -321,7 +321,7 @@ public final class Connection {
321321
///
322322
/// - mode: The mode in which a transaction acquires a lock.
323323
///
324-
/// Default: `.Deferred`
324+
/// Default: `.deferred`
325325
///
326326
/// - block: A closure to run SQL statements within the transaction.
327327
/// The transaction will be committed when the block returns. The block

Sources/SQLite/Typed/Schema.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ extension Table {
4242
block(builder)
4343

4444
let clauses: [Expressible?] = [
45-
create(Table.identifier, tableName(), temporary ? .Temporary : nil, ifNotExists),
45+
create(Table.identifier, tableName(), temporary ? .temporary : nil, ifNotExists),
4646
"".wrap(builder.definitions) as Expression<Void>,
4747
withoutRowid ? Expression<Void>(literal: "WITHOUT ROWID") : nil
4848
]
@@ -52,7 +52,7 @@ extension Table {
5252

5353
public func create(_ query: QueryType, temporary: Bool = false, ifNotExists: Bool = false) -> String {
5454
let clauses: [Expressible?] = [
55-
create(Table.identifier, tableName(), temporary ? .Temporary : nil, ifNotExists),
55+
create(Table.identifier, tableName(), temporary ? .temporary : nil, ifNotExists),
5656
Expression<Void>(literal: "AS"),
5757
query
5858
]
@@ -133,7 +133,7 @@ extension Table {
133133

134134
public func createIndex(_ columns: [Expressible], unique: Bool = false, ifNotExists: Bool = false) -> String {
135135
let clauses: [Expressible?] = [
136-
create("INDEX", indexName(columns), unique ? .Unique : nil, ifNotExists),
136+
create("INDEX", indexName(columns), unique ? .unique : nil, ifNotExists),
137137
Expression<Void>(literal: "ON"),
138138
tableName(qualified: false),
139139
"".wrap(columns) as Expression<Void>
@@ -176,7 +176,7 @@ extension View {
176176

177177
public func create(_ query: QueryType, temporary: Bool = false, ifNotExists: Bool = false) -> String {
178178
let clauses: [Expressible?] = [
179-
create(View.identifier, tableName(), temporary ? .Temporary : nil, ifNotExists),
179+
create(View.identifier, tableName(), temporary ? .temporary : nil, ifNotExists),
180180
Expression<Void>(literal: "AS"),
181181
query
182182
]
@@ -513,8 +513,8 @@ private func reference(_ primary: (QueryType, Expressible)) -> Expressible {
513513

514514
private enum Modifier : String {
515515

516-
case Unique = "UNIQUE"
516+
case unique = "UNIQUE"
517517

518-
case Temporary = "TEMPORARY"
518+
case temporary = "TEMPORARY"
519519

520520
}

run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -ev
33
if [ -n "$BUILD_SCHEME" ]; then
44
if [ -n "$IOS_SIMULATOR" ]; then
5-
make test BUILD_SCHEME="$BUILD_SCHEME" IOS_SIMULATOR="$IOS_SIMULATOR"
5+
make test BUILD_SCHEME="$BUILD_SCHEME" IOS_SIMULATOR="$IOS_SIMULATOR" IOS_VERSION="$IOS_VERSION"
66
else
77
make test BUILD_SCHEME="$BUILD_SCHEME"
88
fi

0 commit comments

Comments
 (0)