Core/Result.swift

SQLite.swift · Sources/SQLite/Core/Result.swift · swift · MIT
database

Represents SQLite errors with codes and messages for debugging database operations.

// Source: https://github.com/stephencelis/SQLite.swift | License: MIT | Copyright 2014-2015 Stephen Celis (<stephen@stephencelis.com>)
// Provided via justclaw.it.com; keep this notice with the code.
#if StandaloneSQLite
import sqlite3
#elseif SQLCipher
import SQLCipher
#elseif SQLiteSwiftCSQLite
import SQLiteSwiftCSQLite
#else
import SQLite3 // SystemSQLite
#endif

public enum Result: Error {

    fileprivate static let successCodes: Set = [SQLITE_OK, SQLITE_ROW, SQLITE_DONE]

    /// Represents a SQLite specific [error code](https://sqlite.org/rescode.html)
    ///
    /// - message: English-language text that describes the error
    ///
    /// - code: SQLite [error code](https://sqlite.org/rescode.html#primary_result_code_list)
    case error(message: String, code: Int32)

    /// Rep

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key