GPKGPaginatedResults
Objective-C
@interface GPKGPaginatedResults : NSObject <NSFastEnumeration>
Swift
class GPKGPaginatedResults : NSObject, NSFastEnumeration
Paginated Results for iterating and querying through chunks
-
Determine if the result set is paginated
Declaration
Objective-C
+ (BOOL)isPaginated:(GPKGResultSet *)resultSet;Swift
class func isPaginated(_ resultSet: GPKGResultSet!) -> BoolParameters
resultSetfeature result set
Return Value
true if paginated
-
Get the pagination offset and limit
Declaration
Objective-C
+ (GPKGPagination *)pagination:(GPKGResultSet *)resultSet;Swift
class func pagination(_ resultSet: GPKGResultSet!) -> GPKGPagination!Parameters
resultSetfeature result set
Return Value
pagination or nil if not paginated
-
Create
Declaration
Objective-C
+ (GPKGPaginatedResults *)create:(GPKGResultSet *)resultSet;Swift
class func create(_ resultSet: GPKGResultSet!) -> GPKGPaginatedResults!Parameters
resultSetresult set
Return Value
new paginated results
-
Paginated query settings
Declaration
Objective-C
@property (nonatomic, strong) GPKGPagination *pagination;Swift
var pagination: GPKGPagination! { get set } -
Flag for iterating over result ids
Declaration
Objective-C
@property (nonatomic) BOOL ids;Swift
var ids: Bool { get set } -
Initialize
Declaration
Objective-C
- (instancetype)initWithResultSet:(GPKGResultSet *)resultSet;Swift
init!(resultSet: GPKGResultSet!)Parameters
resultSetresult set
Return Value
new paginated results
-
Get the DB Connection
Declaration
Objective-C
- (GPKGDbConnection *)connection;Swift
func connection() -> GPKGDbConnection!Return Value
SQL arguments
-
Get the current paginated Result Set
Return Value
current Result Set
-
Get the result count
Declaration
Objective-C
- (int)count;Swift
func count() -> Int32Return Value
count
-
Get the initial SQL statement
Declaration
Objective-C
- (NSString *)sql;Swift
func sql() -> String!Return Value
SQL statement
-
Get the SQL arguments
Declaration
Objective-C
- (NSArray *)args;Swift
func args() -> [Any]!Return Value
SQL arguments
-
Move to the next result if one exists
Declaration
Objective-C
- (BOOL)moveToNext;Swift
func moveToNext() -> BoolReturn Value
true if a result found, false if no more results
-
Get the row values
Declaration
Objective-C
- (NSArray<NSObject *> *)rowValues;Swift
func rowValues() -> [NSObject]!Return Value
row value array
-
Get the row value
Return Value
row value
-
Get the id value
Declaration
Objective-C
- (NSNumber *)id;Swift
func id() -> NSNumber!Return Value
id value
-
Close the current results
Declaration
Objective-C
- (void)close;Swift
func close()
View on GitHub
GPKGPaginatedResults Class Reference