CoreDataOption

public enum CoreDataOption

Launch option to enable debug options for CoreData.

  • sqlDebug: Enables SQLDebug logging with given verbosity level.
  • syntaxColoredLogging: Turns on SQL syntax coloring.
  • migrationDebug: Logs exceptions during data migrations.
  • concurrencyDebug: Enables extra assertions related to concurrency.
  • sqLiteDebugSynchronous: Controls behaviour of SQLite disk syncing.
  • sqLiteIntegrityCheck: Enables extra integrity checking.
  • threadingDebug: Enables assertions for Core Data’s multi-threading policy.

Example:

CoreDataOption.sqlDebug(verbosityLevel: .high)
  • Enables SQLDebug logging with given verbosity level.

    Argument:

    com.apple.CoreData.SQLDebug

    Declaration

    Swift

    case sqlDebug(verbosityLevel: VerbosityLevel)
  • Turns on SQL syntax coloring.

    Argument:

    com.apple.CoreData.SyntaxColoredLogging

    Declaration

    Swift

    case syntaxColoredLogging
  • Logs exceptions during data migrations.

    Argument:

    com.apple.CoreData.MigrationDebug

    Declaration

    Swift

    case migrationDebug
  • Enables extra assertions related to concurrency.

    Argument:

    com.apple.CoreData.ConcurrencyDebug

    Declaration

    Swift

    case concurrencyDebug
  • Controls behaviour of SQLite disk syncing.

    Argument:

    com.apple.CoreData.SQLiteDebugSynchronous

    Declaration

    Swift

    case sqLiteDebugSynchronous(syncing: DiskSyncing)
  • Enables extra integrity checking.

    Argument:

    com.apple.CoreData.SQLiteIntegrityCheck

    Declaration

    Swift

    case sqLiteIntegrityCheck
  • Enables assertions for Core Data’s multi-threading policy.

    Argument:

    com.apple.CoreData.ThreadingDebug

    Declaration

    Swift

    case threadingDebug(verbosityLevel: VerbosityLevel)
  • Describes verbosity level of log output.

    • low: Low level of logging verbosity.
    • medium: Medium level of logging verbosity.
    • high: Maximum level of logging verbosity.
    See more

    Declaration

    Swift

    public enum VerbosityLevel : Int
  • Describes how database updates should be performed.

    • disabled: Completely disables disk syncing. Fast, but increases chance of data corruption.
    • normal: Disk syncing is performed without fctl FULL_FSYNC command.
    • full: Enforces that data is physically written to disk during save operation.
    See more

    Declaration

    Swift

    public enum DiskSyncing : Int
  • key

    String representation of the launch argument key.

    Declaration

    Swift

    public var key: String { get }
  • Launch argument value to use during serialization.

    Declaration

    Swift

    public var value: LaunchArgumentValue { get }