EntityReader

public protocol EntityReader

Used by generated Swift code to hydrate an entity from the store. Is used by the code generator; the actual implementation is in FlatBufferReader.

  • Declaration

    Swift

    func read(at index: UInt16) -> Bool

    Return Value

    false if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Declaration

    Swift

    func read(at index: UInt16) -> Int8

    Return Value

    0 if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Declaration

    Swift

    func read(at index: UInt16) -> Int16

    Return Value

    0 if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Declaration

    Swift

    func read(at index: UInt16) -> Int32

    Return Value

    0 if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Declaration

    Swift

    func read(at index: UInt16) -> Int64

    Return Value

    0 if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Declaration

    Swift

    func read(at index: UInt16) -> UInt8

    Return Value

    0 if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Declaration

    Swift

    func read(at index: UInt16) -> UInt16

    Return Value

    0 if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Declaration

    Swift

    func read(at index: UInt16) -> UInt32

    Return Value

    0 if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Declaration

    Swift

    func read(at index: UInt16) -> UInt64

    Return Value

    0 if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Reads the given Int64 from the database as an Int.

    Declaration

    Swift

    func read(at index: UInt16) -> Int

    Return Value

    0 if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Reads the given UInt64 from the database as an UInt.

    Declaration

    Swift

    func read(at index: UInt16) -> UInt

    Return Value

    0 if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Declaration

    Swift

    func read(at index: UInt16) -> Float

    Return Value

    0.0 if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Declaration

    Swift

    func read(at index: UInt16) -> Double

    Return Value

    0.0 if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Undocumented

    Declaration

    Swift

    func read(at index: UInt16) -> Date
  • Declaration

    Swift

    func read(at index: UInt16) -> String

    Return Value

    empty string if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Declaration

    Swift

    func read(at index: UInt16) -> Data

    Return Value

    zero-length Data if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Declaration

    Swift

    func read(at index: UInt16) -> [UInt8]

    Return Value

    zero-length array if a value is not present in the buffer (e.g. because it got added to the schema after this entity was written)

  • Declaration

    Swift

    func read<E>(at index: UInt16) -> EntityId<E> where E : EntityInspectable, E : __EntityRelatable, E == E.EntityBindingType.EntityType

    Return Value

    The ID read, if present, or the invalid ID of 0 if no ID was present.

  • Declaration

    Swift

    func read<T>(at index: UInt16, store: Store) -> ToOne<T> where T : EntityInspectable, T : __EntityRelatable, T == T.EntityBindingType.EntityType

    Return Value

    A to-one relation, ID will == 0 if the relation hasn’t been connected yet.