File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments