Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
groue committed Mar 2, 2017
1 parent 023fa8a commit a5cbf08
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions GRDB/Core/DatabaseError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)))
Expand Down

0 comments on commit a5cbf08

Please sign in to comment.