DatabaseError
public struct DatabaseError : Error, CustomStringConvertible, CustomNSErrorDatabaseError wraps an SQLite error.
- 
                  
                  The SQLite error code (see https://www.sqlite.org/rescode.html#primary_result_code_list). do { ... } catch let error as DatabaseError where error.resultCode == .SQL_CONSTRAINT { // A constraint error }This property returns a primary result code , that is to say the least significant 8 bits of any SQLite result code. See https://www.sqlite.org/rescode.html for more information.See also extendedResultCode.DeclarationSwift public var resultCode: ResultCode { get }
- 
                  
                  The SQLite extended error code (see https://www.sqlite.org/rescode.html#extended_result_code_list). do { ... } catch let error as DatabaseError where error.extendedResultCode == .SQLITE_CONSTRAINT_FOREIGNKEY { // A foreign key constraint error }See also resultCode.DeclarationSwift public let extendedResultCode: ResultCode
- 
                  
                  The SQLite error message. DeclarationSwift public let message: String?
- 
                  
                  The SQL query that yielded the error (if relevant). DeclarationSwift public let sql: String?
- 
                  
                  Creates a Database Error DeclarationSwift public init(resultCode: ResultCode = .SQLITE_ERROR, message: String? = nil, sql: String? = nil, arguments: StatementArguments? = nil)
 View on GitHub
View on GitHub Install in Dash
Install in Dash DatabaseError Structure Reference
        DatabaseError Structure Reference