Files
GRDB.swift/GRDB/UpdateStatement.swift
T
2015-06-30 19:00:50 +02:00

24 lines
606 B
Swift

//
// UpdateStatement.swift
// GRDB
//
// Created by Gwendal Roué on 30/06/2015.
// Copyright © 2015 Gwendal Roué. All rights reserved.
//
public class UpdateStatement : Statement {
public lazy var lastInsertedRowID: Int64 = sqlite3_last_insert_rowid(self.cStatement)
public func execute() throws {
let code = sqlite3_step(cStatement)
switch code {
case SQLITE_DONE:
// the statement has finished executing successfully
break
default:
try Error.checkCResultCode(code, cConnection: cConnection)
}
}
}