NativeType

public enum NativeType : String, CaseIterable

Swift types a database value can be returned as

  • int

    returned as Int

    Declaration

    Swift

    case int
  • returned as Bool

    Declaration

    Swift

    case bool
  • returned as Double

    Declaration

    Swift

    case float
  • returned as Double

    Declaration

    Swift

    case double
  • returned as String

    Declaration

    Swift

    case string
  • returned as Date

    Declaration

    Swift

    case date
  • returned as Data

    Declaration

    Swift

    case data
  • Test if the native type’s class is the same as the type parameter

    Declaration

    Swift

    public func matches(_ type: Any.Type) -> Bool

    Parameters

    type

    the type to test this MativeType to

    Return Value

    true if this NativeType is type

  • returns the metatype for this native type. For instance, .string returns String.self

    Declaration

    Swift

    public func metaType() -> Any.Type

    Return Value

    the metatype for this NativeType (type.self)