Relation

public protocol Relation : PlaygroundMonospace

A protocol defining a relation, which is conceptually a set of Rows, all of which have the same scheme.

  • The relation’s scheme.

    Declaration

    Swift

    var scheme: Scheme { get }
  • The debug name for the Relation, which can be handy for identifying them in debug dumps.

    Declaration

    Swift

    var debugName: String? { get set }
  • Return true if the given row is contained in the Relation, and false if not.

    Declaration

    Swift

    func contains(_ row: Row) -> Result<Bool, RelationError>
  • project(_:) Default implementation

    Undocumented

    Default Implementation

    Undocumented

    Undocumented

    Declaration

    Swift

    func project(_ scheme: Scheme) -> Relation
  • project(dropping:) Default implementation

    Undocumented

    Default Implementation

    Returns a projection of this Relation that includes only those attributes that appear in this Relation’s scheme but not in the given scheme.

    Declaration

    Swift

    func project(dropping scheme: Scheme) -> Relation
  • Undocumented

    Declaration

    Swift

    func project(_ attribute: Attribute) -> Relation
  • select(_:) Default implementation

    Perform a select operation with a query defined by the contents of a Row. The resulting query is equivalent to ANDing together an equality expression for each attribute in the row, requiring it to be equal to that value in the row.

    Default Implementation

    Undocumented

    Undocumented

    Declaration

    Swift

    func select(_ rowToFind: Row) -> Relation
  • Perform a select operation with the given query.

    Declaration

    Swift

    func select(_ query: SelectExpression) -> Relation
  • renameAttributes(_:) Default implementation

    Return a new Relation that renames the Attributes in the keys of renames to the corresponding values.

    Default Implementation

    Declaration

    Swift

    func renameAttributes(_ renames: [Attribute : Attribute]) -> Relation
  • renamePrime() Default implementation

    Undocumented

    Default Implementation

    Undocumented

    Declaration

    Swift

    func renamePrime() -> Relation
  • projectRenamed(_:) Default implementation

    Return a new Relation that projects and renames the Attributes in the keys of renames to the corresponding values. This is a shorthand for project followed by renameAttributes.

    Default Implementation

    Declaration

    Swift

    func projectRenamed(_ renames: [Attribute : Attribute]) -> Relation
  • union(_:) Default implementation

    Return a new Relation which represents the union of this Relation and another one.

    Default Implementation

    Declaration

    Swift

    func union(_ other: Relation) -> Relation
  • intersection(_:) Default implementation

    Return a new Relation which represents the intersection of this Relation and another one.

    Default Implementation

    Declaration

    Swift

    func intersection(_ other: Relation) -> Relation
  • difference(_:) Default implementation

    Return a new Relation which represents the difference of this Relation and another one.

    Default Implementation

    Declaration

    Swift

    func difference(_ other: Relation) -> Relation
  • join(_:) Default implementation

    Return a new Relation which represents the join of this Relation and another one. This is equivalent to an equijoin where the matches are equal to the intersection of the two schemes.

    Default Implementation

    Declaration

    Swift

    func join(_ other: Relation) -> Relation
  • equijoin(_:matching:) Default implementation

    Return a new Relation which represents the join of this Relation and another one, matching the values for the attributes given in the matching parameter.

    Default Implementation

    Declaration

    Swift

    func equijoin(_ other: Relation, matching: [Attribute : Attribute]) -> Relation

    Parameters

    other

    The Relation to join with.

    matching

    A dictionary which describes the matches to perform for the join. The value for the key Attribute in this Relation will be matched with the value for the value Attribute in other.

  • thetajoin(_:query:) Default implementation

    Undocumented

    Default Implementation

    Undocumented

    Declaration

    Swift

    func thetajoin(_ other: Relation, query: SelectExpression) -> Relation
  • split(_:) Default implementation

    Undocumented

    Default Implementation

    Undocumented

    Declaration

    Swift

    func split(_ query: SelectExpression) -> (Relation, Relation)
  • divide(_:) Default implementation

    Undocumented

    Default Implementation

    Undocumented

    Declaration

    Swift

    func divide(_ other: Relation) -> Relation
  • leftOuterJoin(_:) Default implementation

    Undocumented

    Default Implementation

    Undocumented

    Declaration

    Swift

    func leftOuterJoin(_ other: Relation) -> Relation
  • min(_:) Default implementation

    Undocumented

    Default Implementation

    Undocumented

    Declaration

    Swift

    func min(_ attribute: Attribute) -> Relation
  • max(_:) Default implementation

    Undocumented

    Default Implementation

    Undocumented

    Declaration

    Swift

    func max(_ attribute: Attribute) -> Relation
  • count() Default implementation

    Undocumented

    Default Implementation

    Undocumented

    Declaration

    Swift

    func count() -> Relation
  • otherwise(_:) Default implementation

    Return a new Relation that resolves to this Relation when it is non-empty, otherwise resolves to the other Relation.

    Default Implementation

    Declaration

    Swift

    func otherwise(_ other: Relation) -> Relation
  • unique(_:matching:) Default implementation

    Return a new Relation that resolves to this Relation when there is a unique value for the given attribute that is the same as matching, otherwise resolves to an empty Relation.

    Default Implementation

    Declaration

    Swift

    func unique(_ attribute: Attribute, matching: RelationValue) -> Relation
  • withUpdate(_:newValues:) Default implementation

    Return a new Relation which represents this Relation with the given updates applied to all rows that match the query.

    Default Implementation

    Declaration

    Swift

    func withUpdate(_ query: SelectExpression, newValues: Row) -> Relation
  • withUpdate(_:) Default implementation

    Return a new Relation which represents this Relation with the given updates applied to all rows.

    Default Implementation

    Declaration

    Swift

    func withUpdate(_ newValues: Row) -> Relation
  • addAsyncObserver(_:) Extension method

    Undocumented

    Declaration

    Swift

    func addAsyncObserver(_ observer: AsyncRelationContentObserver) -> AsyncManager.ObservationRemover
  • If desired, this method can be used to supply a postprocessor function which runs in the background after the rows are accumulated but before results are sent to the observer. This postprocessor can, for example, sort the rows and produce an array which is then passed to the observer.

    Declaration

    Swift

    func addAsyncObserver<T: AsyncRelationContentCoalescedObserver>(_ observer: T, postprocessor: @escaping (Set<Row>) -> T.PostprocessingOutput) -> AsyncManager.ObservationRemover
  • addAsyncObserver(_:) Extension method

    This method may be used when the observer just wants a raw set of rows to be delivered, without any postprocessing.

    Declaration

    Swift

    func addAsyncObserver<T>(_ observer: T) -> AsyncManager.ObservationRemover where T : AsyncRelationContentCoalescedObserver, T.PostprocessingOutput == Set<Row>
  • cache(upTo:) Extension method

    Return a new CachingRelation that caches self up to the specified limit

    Declaration

    Swift

    public func cache(upTo: Int) -> CachingRelation
  • setDebugName(_:) Extension method

    Set the debug name and return self, for convenient chaining. Value-type relations return a new one rather than mutating in place.

    Declaration

    Swift

    public func setDebugName(_ name: String) -> Self
  • asyncBulkRows(_:) Extension method

    Fetch rows and invoke a callback as they come in. Each call is passed one or more rows, or an error. If no error occurs, the sequence of calls is terminated by a final call which passes zero rows.

    Declaration

    Swift

    public func asyncBulkRows(_ callback: DispatchContextWrapped<(Result<Set<Row>, RelationError>) -> Void>)
  • asyncBulkRows(_:) Extension method

    Fetch rows and invoke a callback as they come in. Each call is passed one or more rows, or an error. If no error occurs, the sequence of calls is terminated by a final call which passes zero rows.

    Declaration

    Swift

    public func asyncBulkRows(_ callback: @escaping (Result<Set<Row>, RelationError>) -> Void)
  • asyncAllRows(_:) Extension method

    Fetch all rows and invoke a callback when complete.

    Declaration

    Swift

    public func asyncAllRows(_ callback: DispatchContextWrapped<(Result<Set<Row>, RelationError>) -> Void>)
  • asyncAllRows(_:) Extension method

    Fetch all rows and invoke a callback on the current runloop when complete.

    Declaration

    Swift

    public func asyncAllRows(_ callback: @escaping (Result<Set<Row>, RelationError>) -> Void)
  • Fetch all rows and invoke a callback on the current runloop when complete. The postprocessor is run on the background first.

    Declaration

    Swift

    public func asyncAllRows<T>(postprocessor: @escaping (Set<Row>) -> T, completion: @escaping (Result<T, RelationError>) -> Void)
  • description Extension method

    Declaration

    Swift

    public var description: String { get }
  • empty Extension method

    Returns a Signal that delivers true when the set of rows is empty.

    Declaration

    Swift

    public var empty: Signal<Bool> { get }
  • nonEmpty Extension method

    Returns a Signal that delivers true when the set of rows is non-empty.

    Declaration

    Swift

    public var nonEmpty: Signal<Bool> { get }
  • Returns a Signal, sourced from this relation, that delivers all values for the single attribute.

    Declaration

    Swift

    public func allValuesForSingleAttribute<V: Hashable>(_ transform: @escaping (RelationValue) -> V?) -> Signal<Set<V>>
  • allRelationValues() Extension method

    Returns a Signal, sourced from this relation, that delivers a set of all RelationValues for the single attribute.

    Declaration

    Swift

    public func allRelationValues() -> Signal<Set<RelationValue>>
  • allValues(_:) Extension method

    Returns a Signal, sourced from this relation, that delivers a set of all transformed values.

    Declaration

    Swift

    public func allValues<V: Hashable>(_ transform: @escaping (Row) -> V?) -> Signal<Set<V>>
  • allStrings() Extension method

    Returns a Signal, sourced from this relation, that delivers a set of all strings for the single attribute.

    Declaration

    Swift

    public func allStrings() -> Signal<Set<String>>
  • oneRow() Extension method

    Returns a Signal, sourced from this relation, that delivers a single row if there is exactly one, otherwise delivers nil.

    Declaration

    Swift

    public func oneRow() -> Signal<Row?>
  • valueFromOneRow(_:) Extension method

    Returns a Signal, sourced from this relation, that delivers a single transformed value if there is exactly one row, otherwise delivers nil.

    Declaration

    Swift

    public func valueFromOneRow<V>(_ transform: @escaping (Row) -> V?) -> Signal<V?>
  • valueFromOneRow(_:) Extension method

    Returns a Signal, sourced from this relation, that delivers a single transformed value if there is exactly one row, otherwise delivers nil.

    Declaration

    Swift

    public func valueFromOneRow<V: Equatable>(_ transform: @escaping (Row) -> V?) -> Signal<V?>
  • Returns a Signal, sourced from this relation, that delivers a single transformed value if there is exactly one row, otherwise delivers the given default value.

    Declaration

    Swift

    public func valueFromOneRow<V>(_ transform: @escaping (Row) -> V?, orDefault defaultValue: V) -> Signal<V>
  • Returns a Signal, sourced from this relation, that delivers a single transformed value if there is exactly one row, otherwise delivers the given default value.

    Declaration

    Swift

    public func valueFromOneRow<V: Equatable>(_ transform: @escaping (Row) -> V?, orDefault defaultValue: V) -> Signal<V>
  • oneValueOrNil(_:) Extension method

    Returns a Signal, sourced from this relation, that delivers a single transformed value if there is exactly one row, otherwise delivers nil.

    Declaration

    Swift

    public func oneValueOrNil<V>(_ transform: @escaping (RelationValue) -> V?) -> Signal<V?>
  • oneValueOrNil(_:) Extension method

    Returns a Signal, sourced from this relation, that delivers a single transformed value if there is exactly one row, otherwise delivers nil.

    Declaration

    Swift

    public func oneValueOrNil<V: Equatable>(_ transform: @escaping (RelationValue) -> V?) -> Signal<V?>
  • Returns a Signal, sourced from this relation, that delivers a single transformed value if there is exactly one row, otherwise delivers the given default value.

    Declaration

    Swift

    public func oneValue<V>(_ transform: @escaping (RelationValue) -> V?, orDefault defaultValue: V, initialValue: V? = nil) -> Signal<V>
  • Returns a Signal, sourced from this relation, that delivers a single transformed value if there is exactly one row, otherwise delivers the given default value.

    Declaration

    Swift

    public func oneValue<V: Equatable>(_ transform: @escaping (RelationValue) -> V?, orDefault defaultValue: V, initialValue: V? = nil) -> Signal<V>
  • oneRelationValueOrNil() Extension method

    Returns a Signal, sourced from this relation, that delivers a single RelationValue if there is exactly one row, otherwise delivers nil.

    Declaration

    Swift

    public func oneRelationValueOrNil() -> Signal<RelationValue?>
  • Returns a Signal, sourced from this relation, that delivers a single string value if there is exactly one row, otherwise delivers nil.

    Declaration

    Swift

    public func oneStringOrNil(initialValue: String?? = nil) -> Signal<String?>
  • oneString(initialValue:) Extension method

    Returns a Signal, sourced from this relation, that delivers a single string value if there is exactly one row, otherwise delivers an empty string.

    Declaration

    Swift

    public func oneString(initialValue: String? = nil) -> Signal<String>
  • Returns a Signal, sourced from this relation, that delivers a single integer value if there is exactly one row, otherwise delivers nil.

    Declaration

    Swift

    public func oneIntegerOrNil(initialValue: Int64?? = nil) -> Signal<Int64?>
  • oneInteger(initialValue:) Extension method

    Returns a Signal, sourced from this relation, that delivers a single integer value if there is exactly one row, otherwise delivers zero.

    Declaration

    Swift

    public func oneInteger(initialValue: Int64? = nil) -> Signal<Int64>
  • Returns a Signal, sourced from this relation, that delivers a single double value if there is exactly one row, otherwise delivers nil.

    Declaration

    Swift

    public func oneDoubleOrNil(initialValue: Double?? = nil) -> Signal<Double?>
  • oneDouble(initialValue:) Extension method

    Returns a Signal, sourced from this relation, that delivers a single double value if there is exactly one row, otherwise delivers zero.

    Declaration

    Swift

    public func oneDouble(initialValue: Double? = nil) -> Signal<Double>
  • oneBoolOrNil(initialValue:) Extension method

    Returns a Signal, sourced from this relation, that delivers a single boolean value if there is exactly one row, otherwise delivers nil.

    Declaration

    Swift

    public func oneBoolOrNil(initialValue: Bool?? = nil) -> Signal<Bool?>
  • oneBool(initialValue:) Extension method

    Returns a Signal, sourced from this relation, that delivers a single boolean value if there is exactly one row, otherwise delivers false.

    Declaration

    Swift

    public func oneBool(initialValue: Bool? = nil) -> Signal<Bool>
  • oneBlobOrNil(initialValue:) Extension method

    Returns a Signal, sourced from this relation, that delivers a single blob value if there is exactly one row, otherwise delivers nil.

    Declaration

    Swift

    public func oneBlobOrNil(initialValue: [UInt8]?? = nil) -> Signal<[UInt8]?>
  • oneBlob(initialValue:) Extension method

    Returns a Signal, sourced from this relation, that delivers a single blob value if there is exactly one row, otherwise delivers an empty array.

    Declaration

    Swift

    public func oneBlob(initialValue: [UInt8]? = nil) -> Signal<[UInt8]>
  • commonValue(_:) Extension method

    Returns a Signal, sourced from this relation, that delivers a CommonValue that indicates whether there are zero, one, or multiple rows.

    Declaration

    Swift

    public func commonValue<V>(_ transform: @escaping (RelationValue) -> V?) -> Signal<CommonValue<V>>
  • Returns a set of all values for the single attribute, built from one transformed value for each non-error row in the given set.

    Declaration

    Swift

    public func extractAllValuesForSingleAttribute<V: Hashable>(from rows: AnyIterator<Row>, _ transform: @escaping (RelationValue) -> V?) -> Set<V>
  • Returns a set of all values for the single attribute, built from one transformed value for each non-error row in the relation.

    Declaration

    Swift

    public func extractAllValuesForSingleAttribute<V: Hashable>(_ transform: @escaping (RelationValue) -> V?) -> Set<V>
  • Returns a set of all RelationValues for the single attribute, built from one RelationValue for each non-error row in the given set.

    Declaration

    Swift

    public func extractAllRelationValues(from rows: AnyIterator<Row>) -> Set<RelationValue>
  • extractAllRelationValues() Extension method

    Returns a set of all RelationValues for the single attribute in the relation.

    Declaration

    Swift

    public func extractAllRelationValues() -> Set<RelationValue>
  • extractAllValues(from:_:) Extension method

    Returns a set of all values, built from one transformed value for each row in the given set.

    Declaration

    Swift

    public func extractAllValues<V: Hashable>(from rows: AnyIterator<Row>, _ transform: @escaping (Row) -> V?) -> Set<V>
  • extractAllValues(_:) Extension method

    Returns a set of all values, built from one transformed value for each non-error row in the relation.

    Declaration

    Swift

    public func extractAllValues<V: Hashable>(_ transform: @escaping (Row) -> V?) -> Set<V>
  • extractOneRow(_:) Extension method

    Returns a single row if there is exactly one row in the given set, otherwise returns nil.

    Declaration

    Swift

    public func extractOneRow(_ rows: AnyIterator<Row>) -> Row?
  • extractOneRow() Extension method

    Returns a single row if there is exactly one row in the relation, otherwise returns nil.

    Declaration

    Swift

    public func extractOneRow() -> Row?
  • extractValueFromOneRow(_:_:) Extension method

    Returns a single transformed value if there is exactly one row in the given set, otherwise returns nil.

    Declaration

    Swift

    public func extractValueFromOneRow<V>(_ rows: AnyIterator<Row>, _ transform: @escaping (Row) -> V?) -> V?
  • extractValueFromOneRow(_:) Extension method

    Returns a single transformed value if there is exactly one row in the relation, otherwise returns nil.

    Declaration

    Swift

    public func extractValueFromOneRow<V>(_ transform: @escaping (Row) -> V?) -> V?
  • Returns a single transformed value if there is exactly one row in the given set, otherwise returns nil.

    Declaration

    Swift

    public func extractValueFromOneRow<V>(_ rows: AnyIterator<Row>, _ transform: @escaping (Row) -> V?, orDefault defaultValue: V) -> V
  • Returns a single transformed value if there is exactly one row in the relation, otherwise returns the given default value.

    Declaration

    Swift

    public func extractValueFromOneRow<V>(_ transform: @escaping (Row) -> V?, orDefault defaultValue: V) -> V
  • Returns a single transformed value if there is exactly one row in the given set, otherwise returns nil.

    Declaration

    Swift

    public func extractOneValueOrNil<V>(from rows: AnyIterator<Row>, _ transform: @escaping (RelationValue) -> V?) -> V?
  • extractOneValueOrNil(_:) Extension method

    Returns a single transformed value if there is exactly one row in the relation, otherwise returns nil.

    Declaration

    Swift

    public func extractOneValueOrNil<V>(_ transform: @escaping (RelationValue) -> V?) -> V?
  • Returns a single transformed value if there is exactly one row in the given set, otherwise returns the given default value.

    Declaration

    Swift

    public func extractOneValue<V>(from rows: AnyIterator<Row>, _ transform: @escaping (RelationValue) -> V?, orDefault defaultValue: V) -> V
  • Returns a single transformed value if there is exactly one row in the relation, otherwise returns the given default value.

    Declaration

    Swift

    public func extractOneValue<V>(_ transform: @escaping (RelationValue) -> V?, orDefault defaultValue: V) -> V
  • Returns a single RelationValue if there is exactly one row in the given set, otherwise returns nil.

    Declaration

    Swift

    public func extractOneRelationValueOrNil(from rows: AnyIterator<Row>) -> RelationValue?
  • Returns a single RelationValue if there is exactly one row in the relation, otherwise returns nil.

    Declaration

    Swift

    public func extractOneRelationValueOrNil() -> RelationValue?
  • extractOneStringOrNil(from:) Extension method

    Returns a a single string value if there is exactly one row in the given set, otherwise returns nil.

    Declaration

    Swift

    public func extractOneStringOrNil(from rows: AnyIterator<Row>) -> String?
  • extractOneStringOrNil() Extension method

    Returns a single string value if there is exactly one row in the relation, otherwise returns nil.

    Declaration

    Swift

    public func extractOneStringOrNil() -> String?
  • extractOneString(from:) Extension method

    Returns a single string value if there is exactly one row in the given set, otherwise returns an empty string.

    Declaration

    Swift

    public func extractOneString(from rows: AnyIterator<Row>) -> String
  • extractOneString() Extension method

    Returns a single string value if there is exactly one row in the relation, otherwise returns an empty string.

    Declaration

    Swift

    public func extractOneString() -> String
  • Returns a single integer value if there is exactly one row in the given set, otherwise returns nil.

    Declaration

    Swift

    public func extractOneIntegerOrNil(from rows: AnyIterator<Row>) -> Int64?
  • extractOneIntegerOrNil() Extension method

    Returns a single integer value if there is exactly one row in the relation, otherwise returns nil.

    Declaration

    Swift

    public func extractOneIntegerOrNil() -> Int64?
  • extractOneInteger(from:) Extension method

    Returns a single integer value if there is exactly one row in the given set, otherwise returns zero.

    Declaration

    Swift

    public func extractOneInteger(from rows: AnyIterator<Row>) -> Int64
  • extractOneInteger() Extension method

    Returns a single integer value if there is exactly one row in the relation, otherwise returns zero.

    Declaration

    Swift

    public func extractOneInteger() -> Int64
  • extractOneDoubleOrNil(from:) Extension method

    Returns a single double value if there is exactly one row in the given set, otherwise returns nil.

    Declaration

    Swift

    public func extractOneDoubleOrNil(from rows: AnyIterator<Row>) -> Double?
  • extractOneDoubleOrNil() Extension method

    Returns a single double value if there is exactly one row in the relation, otherwise returns nil.

    Declaration

    Swift

    public func extractOneDoubleOrNil() -> Double?
  • extractOneDouble(from:) Extension method

    Returns a single double value if there is exactly one row in the given set, otherwise returns zero.

    Declaration

    Swift

    public func extractOneDouble(from rows: AnyIterator<Row>) -> Double
  • extractOneDouble() Extension method

    Returns a single double value if there is exactly one row in the relation, otherwise returns zero.

    Declaration

    Swift

    public func extractOneDouble() -> Double
  • extractOneBoolOrNil(from:) Extension method

    Returns a single boolean value if there is exactly one row in the given set, otherwise returns nil.

    Declaration

    Swift

    public func extractOneBoolOrNil(from rows: AnyIterator<Row>) -> Bool?
  • extractOneBoolOrNil() Extension method

    Returns a single boolean value if there is exactly one row in the relation, otherwise returns nil.

    Declaration

    Swift

    public func extractOneBoolOrNil() -> Bool?
  • extractOneBool(from:) Extension method

    Returns a single boolean value if there is exactly one row in the given set, otherwise returns false.

    Declaration

    Swift

    public func extractOneBool(from rows: AnyIterator<Row>) -> Bool
  • extractOneBool() Extension method

    Returns a single boolean value if there is exactly one row in the relation, otherwise returns false.

    Declaration

    Swift

    public func extractOneBool() -> Bool
  • extractOneBlobOrNil(from:) Extension method

    Returns a single blob value if there is exactly one row in the given set, otherwise returns nil.

    Declaration

    Swift

    public func extractOneBlobOrNil(from rows: AnyIterator<Row>) -> [UInt8]?
  • extractOneBlobOrNil() Extension method

    Returns a single blob value if there is exactly one row in the relation, otherwise returns nil.

    Declaration

    Swift

    public func extractOneBlobOrNil() -> [UInt8]?
  • extractOneBlob(from:) Extension method

    Returns a single blob value if there is exactly one row in the given set, otherwise returns an empty array.

    Declaration

    Swift

    public func extractOneBlob(from rows: AnyIterator<Row>) -> [UInt8]
  • extractOneBlob() Extension method

    Returns a single blob value if there is exactly one row in the relation, otherwise returns an empty array.

    Declaration

    Swift

    public func extractOneBlob() -> [UInt8]
  • extractCommonValue(from:_:) Extension method

    Returns a CommonValue that indicates whether there are zero, one, or multiple rows in the given set.

    Declaration

    Swift

    public func extractCommonValue<V>(from rows: AnyIterator<Row>, _ transform: (RelationValue) -> V?) -> CommonValue<V> where V : Equatable
  • extractCommonValue(_:) Extension method

    Returns a CommonValue that indicates whether there are zero, one, or multiple rows in the given set.

    Declaration

    Swift

    public func extractCommonValue<V>(_ transform: (RelationValue) -> V?) -> CommonValue<V> where V : Equatable
  • okRows() Extension method

    MARK: Row iterators Generates all non-error rows in the relation.

    Declaration

    Swift

    public func okRows() -> AnyIterator<Row>
  • asyncUpdateValue(_:) Extension method

    Performs an asynchronous update using a single RelationValue.

    Declaration

    Swift

    public func asyncUpdateValue(_ value: RelationValue)
  • asyncUpdateString(_:) Extension method

    Performs an asynchronous update using a single string value.

    Declaration

    Swift

    public func asyncUpdateString(_ value: String)
  • Performs an asynchronous update using a single optional string value.

    Declaration

    Swift

    public func asyncUpdateNullableString(_ value: String?)
  • asyncUpdateInteger(_:) Extension method

    Performs an asynchronous update using a single integer value.

    Declaration

    Swift

    public func asyncUpdateInteger(_ value: Int64)
  • asyncUpdateBoolean(_:) Extension method

    Performs an asynchronous update using a single boolean value (converted to 0 for false and 1 for true).

    Declaration

    Swift

    public func asyncUpdateBoolean(_ value: Bool)
  • signal(initialValue:_:) Extension method

    Returns a Signal whose values are derived from this relation.

    Declaration

    Swift

    public func signal<T>(initialValue: T?, _ rowsToValue: @escaping (Relation, AnyIterator<Row>) -> T) -> Signal<T>
  • signal(initialValue:_:) Extension method

    Returns a Signal whose values are derived from this relation.

    Declaration

    Swift

    public func signal<T: Equatable>(initialValue: T?, _ rowsToValue: @escaping (Relation, AnyIterator<Row>) -> T) -> Signal<T>
  • signal(initialValue:_:) Extension method

    Returns a Signal whose values are derived from this relation.

    Declaration

    Swift

    public func signal<T>(initialValue: T??, _ rowsToValue: @escaping (Relation, AnyIterator<Row>) -> T?) -> Signal<T?>
  • signal(initialValue:_:) Extension method

    Returns a Signal whose values are derived from this relation.

    Declaration

    Swift

    public func signal<T: Equatable>(initialValue: T??, _ rowsToValue: @escaping (Relation, AnyIterator<Row>) -> T?) -> Signal<T?>
  • Returns an AsyncReadWriteProperty that delivers a single string value if there is exactly one row in the relation (otherwise an empty string), and updates the relation when a new string value is provided to the property.

    Declaration

    Swift

    public func undoableOneString(_ db: UndoableDatabase, _ action: String, initialValue: String? = nil) -> AsyncReadWriteProperty<String>
  • Returns an AsyncReadWriteProperty that delivers a single value (transformed from a string) and updates the relation with a new string (transformed from a value of type T) when one is provided to the property.

    Declaration

    Swift

    public func undoableTransformedString<T>(_ db: UndoableDatabase,
                                             _ action: String, initialValue: String? = nil,
                                             fromString: @escaping (String) -> T,
                                             toString: @escaping (T) -> String) -> AsyncReadWriteProperty<T>