Skip to content

Commit 4a9a758

Browse files
committed
Update SQLiteAdapter.swift
1 parent d5c4976 commit 4a9a758

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/SQLiteAdapter/SQLiteAdapter.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public protocol SQLiteType {
5858
func dropIndex(in table: SQLTable, forColumn columnName: String) throws
5959
func beginTransaction() throws
6060
func endTransaction() throws
61-
func insertRow(sql: String, params: [Any]?) throws -> (Int, Int)
61+
func insertRow(sql: String, params: [Any]?) throws -> (changes: Int, lastInsertID: Int)
6262
func updateRow(sql: String, params: [Any]?) throws -> Int
6363
func deleteRow(sql: String, params: [Any]?) throws -> Int
6464
func deleteByID(in table: SQLTable, id: Int) throws -> Int
@@ -324,7 +324,7 @@ open class SQLite: SQLiteType {
324324
/// Can be used to insert one or several rows depending on the SQL statement
325325
/// - Returns: (the number of inserted rows, id for the last inserted row)
326326
@discardableResult
327-
public func insertRow(sql: String, params: [Any]? = nil) throws -> (Int, Int) {
327+
public func insertRow(sql: String, params: [Any]? = nil) throws -> (changes: Int, lastInsertID: Int) {
328328
guard sql.uppercased().trimmingCharacters(in: .whitespaces).hasPrefix("INSERT ") else {
329329
throw SQLiteError.Statement("Invalid SQL statement")
330330
}

0 commit comments

Comments
 (0)