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
FetchChainBuilderthatANDs the specifiedWhereclauses. 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
clausesthe
Whereclauses to create aFetchChainBuilderwithReturn Value
a
FetchChainBuilderthatANDs the specifiedWhereclauses -
Creates a
FetchChainBuilderthatORs the specifiedWhereclauses. 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
clausesthe
Whereclauses to create aFetchChainBuilderwithReturn Value
a
FetchChainBuilderthatORs the specifiedWhereclauses -
Adds a
Whereclause to theSectionMonitorChainBuilderDeclaration
Swift
public func `where`(format: String, _ args: Any...) -> SectionMonitorChainBuilder<O>Parameters
formatthe format string for the predicate
argsthe arguments for
formatReturn Value
a new
SectionMonitorChainBuildercontaining theWhereclause -
Adds a
Whereclause to theSectionMonitorChainBuilderDeclaration
Swift
public func `where`(format: String, argumentArray: [Any]?) -> SectionMonitorChainBuilder<O>Parameters
formatthe format string for the predicate
argumentArraythe arguments for
formatReturn Value
a new
SectionMonitorChainBuildercontaining theWhereclause -
Adds a
Tweakclause to theSectionMonitorChainBuilderwith a closure where theNSFetchRequestmay be configuredDeclaration
Swift
public func tweak(_ fetchRequest: @escaping (NSFetchRequest<NSFetchRequestResult>) -> Void) -> SectionMonitorChainBuilder<O>Parameters
fetchRequestthe block to customize the
NSFetchRequestReturn Value
a new
SectionMonitorChainBuildercontaining theTweakclause -
Appends a
QueryClauseto theSectionMonitorChainBuilderDeclaration
Swift
public func appending(_ clause: FetchClause) -> SectionMonitorChainBuilder<O>Parameters
clausethe
QueryClauseto add to theSectionMonitorChainBuilderReturn Value
a new
SectionMonitorChainBuildercontaining theQueryClause -
Appends a series of
QueryClauses to theSectionMonitorChainBuilderDeclaration
Swift
public func appending<S>(contentsOf clauses: S) -> SectionMonitorChainBuilder<O> where S : Sequence, S.Element == FetchClauseParameters
clausesthe
QueryClauses to add to theSectionMonitorChainBuilderReturn Value
a new
SectionMonitorChainBuildercontaining theQueryClauses
-
Adds a
Whereclause to theSectionMonitorChainBuilderDeclaration
Swift
public func `where`<T>(_ clause: (O) -> T) -> SectionMonitorChainBuilder<O> where T : AnyWhereClauseParameters
clausea
Whereclause to add to the fetch builderReturn Value
a new
SectionMonitorChainBuildercontaining theWhereclause
View on GitHub
SectionMonitorChainBuilder Structure Reference