CSOrderBy
@objc
public final class CSOrderBy : NSObject, CSFetchClause, CSQueryClause, CSDeleteClause
The CSOrderBy serves as the Objective-C bridging type for OrderBy.
See also
OrderBy
-
The list of sort descriptors
Declaration
Swift
@objc public var sortDescriptors: [NSSortDescriptor] { get } -
Initializes a
CSOrderByclause with a single sort descriptorMyPersonEntity *people = [transaction fetchAllFrom:CSFromClass([MyPersonEntity class]) fetchClauses:@[CSOrderByKey(CSSortAscending(@"fullname"))]]];Declaration
Swift
@objc public convenience init(sortDescriptor: NSSortDescriptor)Parameters
sortDescriptora
NSSortDescriptor -
Initializes a
CSOrderByclause with a list of sort descriptorsMyPersonEntity *people = [transaction fetchAllFrom:CSFromClass([MyPersonEntity class]) fetchClauses:@[CSOrderByKeys(CSSortAscending(@"fullname"), CSSortDescending(@"age"), nil))]]];Declaration
Swift
@objc public convenience init(sortDescriptors: [NSSortDescriptor])Parameters
sortDescriptorsan array of
NSSortDescriptors
View on GitHub
CSOrderBy Class Reference