SQLite

public struct SQLite

SQLite library information.

  • The version of SQLite in the format X.Y.Z, for example 3.25.3

    Declaration

    Swift

    public static let version: String
  • The version of SQLite in the format (X*1000000 + Y*1000 + Z), such as 3025003

    Declaration

    Swift

    public static let versionNumber: Int
  • The identifier of the SQLite source tree, for example 89e099fbe5e13c33e683bef07361231ca525b88f7907be7092058007b75036f2

    Declaration

    Swift

    public static let sourceID: String
  • Initializes the SQLite library

    Note

    This function is automatically invoked by SQLite and is not normally called directly

    Throws

    An error if SQLite initialization fails

    Declaration

    Swift

    public static func initialize() throws
  • Deallocates any resources allocated by initialize()

    All open database connections must be closed and all other SQLite resources must be deallocated prior to invoking this function.

    Note

    This function is automatically invoked by SQLite and is not normally called directly

    Throws

    An error if SQLite shutdown fails

    Declaration

    Swift

    public static func shutdown() throws
  • The number of bytes of memory malloced but not yet freed by SQLite

    Declaration

    Swift

    public static var memoryUsed: Int64 { get }
  • Returns the maximum amount of memory used by SQLite since the memory highwater mark was last reset.

    Declaration

    Swift

    public static func memoryHighwater(reset: Bool = false) -> Int64

    Parameters

    reset

    If true the memory highwater mark is reset to the value of memoryUsed

  • The keywords understood by SQLite.

    Note

    Keywords in SQLite are not case sensitive.

    Declaration

    Swift

    public static let keywords: Set<String>
  • Tests whether identifier is an SQLite keyword.

    Declaration

    Swift

    public static func isKeyword(_ identifier: String) -> Bool

    Parameters

    identifier

    The string to check

    Return Value

    True if identifier is an SQLite keyword, False otherwise

  • Generates count bytes of randomness.

    Declaration

    Swift

    public static func randomness(_ count: Int) -> Data

    Parameters

    count

    The number of random bytes to generate

    Return Value

    A Data object containing count bytes of randomness