mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
24 lines
606 B
Swift
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)
|
|
}
|
|
}
|
|
}
|