# SelectTerm

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

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

- `attribute(_:)`

  Provides a `SelectTerm` to a `Select` clause for querying an entity attribute. A shorter way to do the same is to assign from the string keypath directly:

      let fullName = CoreStore.queryValue(
          From<MyPersonEntity>(),
          Select<String>(.attribute("fullName")),
          Where("employeeID", isEqualTo: 1111)
      )

  is equivalent to:

      let fullName = CoreStore.queryValue(
          From<MyPersonEntity>(),
          Select<String>("fullName"),
          Where("employeeID", isEqualTo: 1111)
      )

  #### Declaration

  Swift

      public static func attribute(_ keyPath: KeyPathString) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying an entity attribute

- `average(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the average value of an attribute.

      let averageAge = CoreStore.queryValue(
          From<MyPersonEntity>(),
          Select<Int>(.average("age"))
      )

  #### Declaration

  Swift

      public static func average(_ keyPath: KeyPathString, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key average() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the average value of an attribute

- `count(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for a count query.

      let numberOfEmployees = CoreStore.queryValue(
          From<MyPersonEntity>(),
          Select<Int>(.count("employeeID"))
      )

  #### Declaration

  Swift

      public static func count(_ keyPath: KeyPathString, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key count() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for a count query

- `maximum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the maximum value for an attribute.

      let maximumAge = CoreStore.queryValue(
          From<MyPersonEntity>(),
          Select<Int>(.maximum("age"))
      )

  #### Declaration

  Swift

      public static func maximum(_ keyPath: KeyPathString, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key max() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the maximum value for an attribute

- `minimum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the minimum value for an attribute.

      let minimumAge = CoreStore.queryValue(
          From<MyPersonEntity>(),
          Select<Int>(.minimum("age"))
      )

  #### Declaration

  Swift

      public static func minimum(_ keyPath: KeyPathString, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key min() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the minimum value for an attribute

- `sum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the sum value for an attribute.

      let totalAge = CoreStore.queryValue(
          From<MyPersonEntity>(),
          Select<Int>(.sum("age"))
      )

  #### Declaration

  Swift

      public static func sum(_ keyPath: KeyPathString, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key sum() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the sum value for an attribute

- `objectID(as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the `NSManagedObjectID`.

      let objectID = CoreStore.queryValue(
          From<MyPersonEntity>(),
          Select<NSManagedObjectID>(),
          Where("employeeID", isEqualTo: 1111)
      )

  #### Declaration

  Swift

      public static func objectID(as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key objecID is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the sum value for an attribute

### ExpressibleByStringLiteral

- `init(stringLiteral:)`

  #### Declaration

  Swift

      public init(stringLiteral value: KeyPathString)

- `init(unicodeScalarLiteral:)`

  #### Declaration

  Swift

      public init(unicodeScalarLiteral value: KeyPathString)

- `init(extendedGraphemeClusterLiteral:)`

  #### Declaration

  Swift

      public init(extendedGraphemeClusterLiteral value: KeyPathString)

### Equatable

- `==(_:_:)`

  #### Declaration

  Swift

      public static func == (lhs: SelectTerm<D>, rhs: SelectTerm<D>) -> Bool

### Hashable

- `hash(into:)`

  #### Declaration

  Swift

      public func hash(into hasher: inout Hasher)

### CustomDebugStringConvertible

- `debugDescription`

  #### Declaration

  Swift

      public var debugDescription: String { get }

### SelectTerm

- `attribute(_:)`

  Provides a `SelectTerm` to a `Select` clause for querying an entity attribute.

  #### Declaration

  Swift

      public static func attribute<V>(_ keyPath: KeyPath<D, V>) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying an entity attribute

- `average(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the average value of an attribute.

  #### Declaration

  Swift

      public static func average<V>(_ keyPath: KeyPath<D, V>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key average() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the average value of an attribute

- `count(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for a count query.

  #### Declaration

  Swift

      public static func count<V>(_ keyPath: KeyPath<D, V>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key count() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for a count query

- `maximum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the maximum value for an attribute.

  #### Declaration

  Swift

      public static func maximum<V>(_ keyPath: KeyPath<D, V>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key max() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the maximum value for an attribute

- `minimum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the minimum value for an attribute.

  #### Declaration

  Swift

      public static func minimum<V>(_ keyPath: KeyPath<D, V>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key min() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the minimum value for an attribute

- `sum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the sum value for an attribute.

  #### Declaration

  Swift

      public static func sum<V>(_ keyPath: KeyPath<D, V>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key sum() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the sum value for an attribute

### SelectTerm

- `attribute(_:)`

  Provides a `SelectTerm` to a `Select` clause for querying an entity attribute.

  #### Declaration

  Swift

      public static func attribute<V>(_ keyPath: KeyPath<D, ValueContainer<D>.Required<V>>) -> SelectTerm<D> where V : ImportableAttributeType

  #### Parameters

  `keyPath` | the attribute name

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying an entity attribute

- `attribute(_:)`

  Provides a `SelectTerm` to a `Select` clause for querying an entity attribute.

  #### Declaration

  Swift

      public static func attribute<V>(_ keyPath: KeyPath<D, ValueContainer<D>.Optional<V>>) -> SelectTerm<D> where V : ImportableAttributeType

  #### Parameters

  `keyPath` | the attribute name

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying an entity attribute

- `attribute(_:)`

  Provides a `SelectTerm` to a `Select` clause for querying an entity attribute.

  #### Declaration

  Swift

      public static func attribute<V>(_ keyPath: KeyPath<D, TransformableContainer<D>.Required<V>>) -> SelectTerm<D> where V : NSCoding, V : NSCopying

  #### Parameters

  `keyPath` | the attribute name

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying an entity attribute

- `attribute(_:)`

  Provides a `SelectTerm` to a `Select` clause for querying an entity attribute.

  #### Declaration

  Swift

      public static func attribute<V>(_ keyPath: KeyPath<D, TransformableContainer<D>.Optional<V>>) -> SelectTerm<D> where V : NSCoding, V : NSCopying

  #### Parameters

  `keyPath` | the attribute name

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying an entity attribute

- `average(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the average value of an attribute.

  #### Declaration

  Swift

      public static func average<V>(_ keyPath: KeyPath<D, ValueContainer<D>.Required<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key average() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the average value of an attribute

- `average(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the average value of an attribute.

  #### Declaration

  Swift

      public static func average<V>(_ keyPath: KeyPath<D, ValueContainer<D>.Optional<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key average() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the average value of an attribute

- `average(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the average value of an attribute.

  #### Declaration

  Swift

      public static func average<V>(_ keyPath: KeyPath<D, TransformableContainer<D>.Required<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key average() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the average value of an attribute

- `average(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the average value of an attribute.

  #### Declaration

  Swift

      public static func average<V>(_ keyPath: KeyPath<D, TransformableContainer<D>.Optional<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key average() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the average value of an attribute

- `count(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for a count query.

  #### Declaration

  Swift

      public static func count<V>(_ keyPath: KeyPath<D,
          ValueContainer<D>.Required<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key count() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for a count query

- `count(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for a count query.

  #### Declaration

  Swift

      public static func count<V>(_ keyPath: KeyPath<D,
          ValueContainer<D>.Optional<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key count() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for a count query

- `count(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for a count query.

  #### Declaration

  Swift

      public static func count<V>(_ keyPath: KeyPath<D,
          TransformableContainer<D>.Required<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key count() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for a count query

- `count(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for a count query.

  #### Declaration

  Swift

      public static func count<V>(_ keyPath: KeyPath<D,
          TransformableContainer<D>.Optional<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key count() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for a count query

- `maximum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the maximum value for an attribute.

  #### Declaration

  Swift

      public static func maximum<V>(_ keyPath: KeyPath<D,
          ValueContainer<D>.Required<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key max() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the maximum value for an attribute

- `maximum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the maximum value for an attribute.

  #### Declaration

  Swift

      public static func maximum<V>(_ keyPath: KeyPath<D,
          ValueContainer<D>.Optional<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key max() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the maximum value for an attribute

- `maximum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the maximum value for an attribute.

  #### Declaration

  Swift

      public static func maximum<V>(_ keyPath: KeyPath<D,
          TransformableContainer<D>.Required<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key max() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the maximum value for an attribute

- `maximum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the maximum value for an attribute.

  #### Declaration

  Swift

      public static func maximum<V>(_ keyPath: KeyPath<D,
          TransformableContainer<D>.Optional<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key max() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the maximum value for an attribute

- `minimum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the minimum value for an attribute.

  #### Declaration

  Swift

      public static func minimum<V>(_ keyPath: KeyPath<D, ValueContainer<D>.Required<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key min() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the minimum value for an attribute

- `minimum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the minimum value for an attribute.

  #### Declaration

  Swift

      public static func minimum<V>(_ keyPath: KeyPath<D, ValueContainer<D>.Optional<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key min() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the minimum value for an attribute

- `minimum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the minimum value for an attribute.

  #### Declaration

  Swift

      public static func minimum<V>(_ keyPath: KeyPath<D, TransformableContainer<D>.Required<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key min() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the minimum value for an attribute

- `minimum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the minimum value for an attribute.

  #### Declaration

  Swift

      public static func minimum<V>(_ keyPath: KeyPath<D, TransformableContainer<D>.Optional<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key min() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the minimum value for an attribute

- `sum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the sum value for an attribute.

  #### Declaration

  Swift

      public static func sum<V>(_ keyPath: KeyPath<D, ValueContainer<D>.Required<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key sum() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the sum value for an attribute

- `sum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the sum value for an attribute.

  #### Declaration

  Swift

      public static func sum<V>(_ keyPath: KeyPath<D, ValueContainer<D>.Optional<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key sum() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the sum value for an attribute

- `sum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the sum value for an attribute.

  #### Declaration

  Swift

      public static func sum<V>(_ keyPath: KeyPath<D, TransformableContainer<D>.Required<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key sum() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the sum value for an attribute

- `sum(_:as:)`

  Provides a `SelectTerm` to a `Select` clause for querying the sum value for an attribute.

  #### Declaration

  Swift

      public static func sum<V>(_ keyPath: KeyPath<D, TransformableContainer<D>.Optional<V>>, as alias: KeyPathString? = nil) -> SelectTerm<D>

  #### Parameters

  `keyPath` | the attribute name
  `alias` | the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key sum() is used

  #### Return Value

  a `SelectTerm` to a `Select` clause for querying the sum value for an attribute