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
CSOrderBy
clause with a single sort descriptorMyPersonEntity *people = [transaction fetchAllFrom:CSFromClass([MyPersonEntity class]) fetchClauses:@[CSOrderByKey(CSSortAscending(@"fullname"))]]];
Declaration
Swift
@objc public convenience init(sortDescriptor: NSSortDescriptor)
Parameters
sortDescriptor
a
NSSortDescriptor
-
Initializes a
CSOrderBy
clause 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
sortDescriptors
an array of
NSSortDescriptor
s