# Enumerations

The following enumerations are available globally.

### CoreStoreError

- `CoreStoreError`

  All errors thrown from CoreStore are expressed in `CoreStoreError` enum values.

  See more

  #### Declaration

  Swift

      public enum CoreStoreError : Error, CustomNSError, Hashable

      extension CoreStoreError: CustomDebugStringConvertible, CoreStoreDebugStringConvertible

### MigrationType

- `MigrationType`

  The `MigrationType` specifies the type of migration required for a store.

  See more

  #### Declaration

  Swift

      public enum MigrationType : Hashable

      extension MigrationType: CoreStoreDebugStringConvertible

### SelectTerm

- `SelectTerm`

  The `SelectTerm` is passed to the `Select` clause to indicate the attributes/aggregate keys to be queried.

  See more

  #### Declaration

  Swift

      public enum SelectTerm<O> : ExpressibleByStringLiteral, Hashable where O : DynamicObject

      extension SelectTerm: CustomDebugStringConvertible, CoreStoreDebugStringConvertible

### CoreStoreDefaults

- `CoreStoreDefaults`

  Global utilities

  See more

  #### Declaration

  Swift

      public enum CoreStoreDefaults

### CoreStoreErrorCode

- `CoreStoreErrorCode`

  The `NSError` error codes for `CoreStoreErrorDomain`.

  See more

  #### Declaration

  Swift

      public enum CoreStoreErrorCode : Int

### LogLevel

- `LogLevel`

  The `LogLevel` indicates the severity of a log message.

  #### Declaration

  Swift

      public enum LogLevel

### ValueContainer

- `ValueContainer`

  The containing type for value properties. Use the `DynamicObject.Value` typealias instead for shorter syntax.

      class Animal: CoreStoreObject {
          let species = Value.Required<String>("species", initial: "")
          let nickname = Value.Optional<String>("nickname")
          let color = Transformable.Optional<UIColor>("color")
      }

  See more

  #### Declaration

  Swift

      public enum ValueContainer<O> where O : CoreStoreObject

### TransformableContainer

- `TransformableContainer`

  The containing type for transformable properties. Use the `DynamicObject.Transformable` typealias instead for shorter syntax.

      class Animal: CoreStoreObject {
          let species = Value.Required<String>("species", initial: "")
          let nickname = Value.Optional<String>("nickname")
          let color = Transformable.Optional<UIColor>("color")
      }

  See more

  #### Declaration

  Swift

      public enum TransformableContainer<O> where O : CoreStoreObject

### RelationshipContainer

- `RelationshipContainer`

  The containing type for relationships. Use the `DynamicObject.Relationship` typealias instead for shorter syntax.

      class Dog: CoreStoreObject {
          let master = Relationship.ToOne<Person>("master")
      }
      class Person: CoreStoreObject {
          let pets = Relationship.ToManyUnordered<Dog>("pets", inverse: { $0.master })
      }

  See more

  #### Declaration

  Swift

      public enum RelationshipContainer<O> where O : CoreStoreObject

### FieldContainer

- `FieldContainer`

  The containing type for value properties. Use the `Field` typealias instead for shorter syntax.

      class Pet: CoreStoreObject {

          @Field.Stored("species")
          var species = ""

          @Field.Stored("nickname")
          var nickname: String?

          @Field.Coded("color", coder: FieldCoders.Plist.self)
          var eyeColor: UIColor?

          @Field.Relationship("owner", inverse: \.$pets)
          var owner: Person?

          @Field.Relationship("children")
          var children: Array<Pet>

          @Field.Relationship("parents", inverse: \.$children)
          var parents: Set<Pet>
      }

  See more

  #### Declaration

  Swift

      public enum FieldContainer<O> where O : CoreStoreObject

### DiffableDataSource

- `DiffableDataSource`

  Namespace for diffable data source types. See `DiffableDataSource.TableViewAdapter` and `DiffableDataSource.CollectionViewAdapter` for actual implementations

  See more

  #### Declaration

  Swift

      public enum DiffableDataSource

- `FieldCoders`

  Namespace for Built-in Field Coders

  See more

  #### Declaration

  Swift

      public enum FieldCoders

### MigrationProgress

- `MigrationProgress`

  A `MigrationProgress` contains info on a `LocalStorage`‘s setup progress.

  See also

  DataStack.reactive.addStorage(_:)

  See also

  DataStack.async.addStorage(_:)
  See more

  #### Declaration

  Swift

      public enum MigrationProgress<T> where T : LocalStorage