From a5cbf08a7695023360c23c37ad7c82dc98e621dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 2 Mar 2017 08:01:43 +0100 Subject: [PATCH] Documentation --- GRDB/Core/DatabaseError.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/GRDB/Core/DatabaseError.swift b/GRDB/Core/DatabaseError.swift index 5c69e30377..df9d62a53e 100644 --- a/GRDB/Core/DatabaseError.swift +++ b/GRDB/Core/DatabaseError.swift @@ -64,6 +64,9 @@ public struct ResultCode : RawRepresentable, Equatable, CustomStringConvertible } } + // Primary Result codes + // https://www.sqlite.org/rescode.html#primary_result_code_list + public static let SQLITE_OK = ResultCode(rawValue: 0) // Successful result public static let SQLITE_ERROR = ResultCode(rawValue: 1) // SQL error or missing database public static let SQLITE_INTERNAL = ResultCode(rawValue: 2) // Internal logic error in SQLite @@ -96,6 +99,9 @@ public struct ResultCode : RawRepresentable, Equatable, CustomStringConvertible public static let SQLITE_ROW = ResultCode(rawValue: 100) // sqlite3_step() has another row ready public static let SQLITE_DONE = ResultCode(rawValue: 101) // sqlite3_step() has finished executing + // Extended Result Code + // https://www.sqlite.org/rescode.html#extended_result_code_list + public static let SQLITE_IOERR_READ = ResultCode(rawValue: (SQLITE_IOERR.rawValue | (1<<8))) public static let SQLITE_IOERR_SHORT_READ = ResultCode(rawValue: (SQLITE_IOERR.rawValue | (2<<8))) public static let SQLITE_IOERR_WRITE = ResultCode(rawValue: (SQLITE_IOERR.rawValue | (3<<8)))