Skip to content

Commit ee7cef1

Browse files
authored
Merge pull request stephencelis#656 from joshfriend/fix-enum-name-refs
Fix usages of old Swift 2 enum case names
2 parents 5e771a1 + 89630b2 commit ee7cef1

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Sources/SQLite/Core/Connection.swift

+4-4
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

+6-6
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
}

0 commit comments

Comments
 (0)