SectionMonitorChainBuilder
public struct SectionMonitorChainBuilder<O> : SectionMonitorBuilderType where O : DynamicObject
The fetch builder type used for a sectioned ListMonitor
. A SectionMonitorChainBuilder
is created from a From
clause and then a sectionBy(...)
chain.
let monitor = transaction.monitorSectionedList(
From<MyPersonEntity>()
.sectionBy(\.age, { "\($0!) years old" })
.where(\.age > 18)
.orderBy(.ascending(\.age))
)
-
Declaration
Swift
public var from: From<O>
-
Declaration
Swift
public var sectionBy: SectionBy<O>
-
Declaration
Swift
public var fetchClauses: [FetchClause]
-
Creates a
FetchChainBuilder
thatAND
s the specifiedWhere
clauses. Use this overload if the compiler cannot infer the types when chaining multiple&&
operators.Declaration
Swift
public func `where`(combineByAnd clauses: Where<O>...) -> SectionMonitorChainBuilder<O>
Parameters
clauses
the
Where
clauses to create aFetchChainBuilder
withReturn Value
a
FetchChainBuilder
thatAND
s the specifiedWhere
clauses -
Creates a
FetchChainBuilder
thatOR
s the specifiedWhere
clauses. Use this overload if the compiler cannot infer the types when chaining multiple||
operators.Declaration
Swift
public func `where`(combineByOr clauses: Where<O>...) -> SectionMonitorChainBuilder<O>
Parameters
clauses
the
Where
clauses to create aFetchChainBuilder
withReturn Value
a
FetchChainBuilder
thatOR
s the specifiedWhere
clauses -
Adds a
Where
clause to theSectionMonitorChainBuilder
Declaration
Swift
public func `where`(format: String, _ args: Any...) -> SectionMonitorChainBuilder<O>
Parameters
format
the format string for the predicate
args
the arguments for
format
Return Value
a new
SectionMonitorChainBuilder
containing theWhere
clause -
Adds a
Where
clause to theSectionMonitorChainBuilder
Declaration
Swift
public func `where`(format: String, argumentArray: [Any]?) -> SectionMonitorChainBuilder<O>
Parameters
format
the format string for the predicate
argumentArray
the arguments for
format
Return Value
a new
SectionMonitorChainBuilder
containing theWhere
clause -
Adds a
Tweak
clause to theSectionMonitorChainBuilder
with a closure where theNSFetchRequest
may be configuredDeclaration
Swift
public func tweak(_ fetchRequest: @escaping (NSFetchRequest<NSFetchRequestResult>) -> Void) -> SectionMonitorChainBuilder<O>
Parameters
fetchRequest
the block to customize the
NSFetchRequest
Return Value
a new
SectionMonitorChainBuilder
containing theTweak
clause -
Appends a
QueryClause
to theSectionMonitorChainBuilder
Declaration
Swift
public func appending(_ clause: FetchClause) -> SectionMonitorChainBuilder<O>
Parameters
clause
the
QueryClause
to add to theSectionMonitorChainBuilder
Return Value
a new
SectionMonitorChainBuilder
containing theQueryClause
-
Appends a series of
QueryClause
s to theSectionMonitorChainBuilder
Declaration
Swift
public func appending<S>(contentsOf clauses: S) -> SectionMonitorChainBuilder<O> where S : Sequence, S.Element == FetchClause
Parameters
clauses
the
QueryClause
s to add to theSectionMonitorChainBuilder
Return Value
a new
SectionMonitorChainBuilder
containing theQueryClause
s
-
Adds a
Where
clause to theSectionMonitorChainBuilder
Declaration
Swift
public func `where`<T>(_ clause: (O) -> T) -> SectionMonitorChainBuilder<O> where T : AnyWhereClause
Parameters
clause
a
Where
clause to add to the fetch builderReturn Value
a new
SectionMonitorChainBuilder
containing theWhere
clause