Enumerations
The following enumerations are available globally.
-
Declaration
Swift
@objc public enum CSErrorCode : Int
-
All errors thrown from CoreStore are expressed in
See moreCoreStoreErrorenum values.Declaration
Swift
public enum CoreStoreError : Error, CustomNSError, Hashable
-
The
MigrationResultindicates the result of a migration. TheMigrationResultcan be treated as a boolean:
See moreCoreStore.upgradeStorageIfNeeded(SQLiteStorage(fileName: "data.sqlite")) { (result) in switch result { case .success(let migrationSteps): // ... case .failure(let error): // ... } }Declaration
Swift
public enum MigrationResult : Hashable
-
The
See moreMigrationTypespecifies the type of migration required for a store.Declaration
Swift
public enum MigrationType : Hashable
-
The
CSLocalStorageOptionsprovides settings that tells theCSDataStackhow to setup the persistent store forCSLocalStorageimplementers.See moreSee also
LocalStorageOptionsDeclaration
Swift
@objc public enum CSLocalStorageOptions : Int
-
The
See moreSelectTermis passed to theSelectclause to indicate the attributes/aggregate keys to be queried.Declaration
Swift
public enum SelectTerm<D> : ExpressibleByStringLiteral, Hashable where D : DynamicObject
-
The
SetupResultindicates the result of an asynchronous initialization of a persistent store. TheSetupResultcan be treated as a boolean:try! CoreStore.addStorage( SQLiteStore(), completion: { (result: SetupResult) -> Void in if result { // succeeded } else { // failed } } )or as an
enum, where the resulting associated object can also be inspected:
See moretry! CoreStore.addStorage( SQLiteStore(), completion: { (result: SetupResult) -> Void in switch result { case .success(let storage): // storage is the related StorageInterface instance case .failure(let error): // error is the CoreStoreError enum value for the failure } } )Declaration
Swift
public enum SetupResult<T> : Hashable where T : StorageInterface
-
See moreCoreStoreis the main entry point for all other APIs.Declaration
Swift
public enum CoreStore
-
The
See moreNSErrorerror codes forCoreStoreErrorDomain.Declaration
Swift
public enum CoreStoreErrorCode : Int
-
The
LogLevelindicates the severity of a log message.Declaration
Swift
public enum LogLevel
-
The containing type for value properties. Use the
DynamicObject.Valuetypealias instead for shorter syntax.
See moreclass Animal: CoreStoreObject { let species = Value.Required<String>("species", initial: "") let nickname = Value.Optional<String>("nickname") let color = Transformable.Optional<UIColor>("color") }Declaration
Swift
public enum ValueContainer<O> where O : CoreStoreObject
-
The containing type for transformable properties. Use the
DynamicObject.Transformabletypealias instead for shorter syntax.
See moreclass Animal: CoreStoreObject { let species = Value.Required<String>("species", initial: "") let nickname = Value.Optional<String>("nickname") let color = Transformable.Optional<UIColor>("color") }Declaration
Swift
public enum TransformableContainer<O> where O : CoreStoreObject
-
The containing type for relationships. Use the
DynamicObject.Relationshiptypealias instead for shorter syntax.
See moreclass Dog: CoreStoreObject { let master = Relationship.ToOne<Person>("master") } class Person: CoreStoreObject { let pets = Relationship.ToManyUnordered<Dog>("pets", inverse: { $0.master }) }Declaration
Swift
public enum RelationshipContainer<O> where O : CoreStoreObject
View on GitHub
Enumerations Reference