GPKGUserDao
Objective-C
@interface GPKGUserDao : GPKGBaseDao
Swift
class GPKGUserDao : GPKGBaseDao
Abstract User DAO for reading user tables
-
User table
Declaration
Objective-C
@property (nonatomic, strong) GPKGUserTable *table;
Swift
var table: GPKGUserTable! { get set }
-
Projection
Declaration
Objective-C
@property (nonatomic, strong) PROJProjection *projection;
Swift
var projection: PROJProjection! { get set }
-
Initialize
Declaration
Objective-C
- (instancetype)initWithDatabase:(GPKGConnection *)database andTable:(GPKGUserTable *)table;
Swift
init!(database: GPKGConnection!, andTable table: GPKGUserTable!)
Parameters
database
database connection
table
user table
Return Value
new user dao
-
Check if the table has a primary key column
Declaration
Objective-C
- (BOOL)hasPkColumn;
Swift
func hasPkColumn() -> Bool
Return Value
true if has a primary key
-
Get the primary key column index
Declaration
Objective-C
- (int)pkIndex;
Swift
func pkIndex() -> Int32
Return Value
primary key column index
-
Get the primary key column
Return Value
primary key column
-
Get the primary key column name
Declaration
Objective-C
- (NSString *)pkColumnName;
Swift
func pkColumnName() -> String!
Return Value
primary key column name
-
Get the table columns
Declaration
Objective-C
- (NSArray<GPKGUserColumn *> *)columns;
Swift
func columns() -> [GPKGUserColumn]!
Return Value
columns
-
Get a user row from the current result
Declaration
Objective-C
- (GPKGUserRow *)row:(GPKGResultSet *)results;
Swift
func row(_ results: GPKGResultSet!) -> GPKGUserRow!
Parameters
results
result set
Return Value
user row
-
Get a user row from the row
Declaration
Objective-C
- (GPKGUserRow *)rowWithRow:(GPKGRow *)row;
Swift
func row(with row: GPKGRow!) -> GPKGUserRow!
Parameters
row
result row
Return Value
user row
-
Wrap the result set
Declaration
Objective-C
- (GPKGRowResultSet *)results:(GPKGResultSet *)results;
Swift
func results(_ results: GPKGResultSet!) -> GPKGRowResultSet!
Parameters
results
result set
Return Value
row result set
-
Create a user row
Declaration
Objective-C
- (GPKGUserRow *)newRowWithColumns:(GPKGUserColumns *)columns andValues:(NSMutableArray *)values;
Swift
func newRow(with columns: GPKGUserColumns!, andValues values: NSMutableArray!) -> GPKGUserRow!
Parameters
columns
columns
values
values
Return Value
user row
-
Get the bounding box of the user table data
Declaration
Objective-C
- (GPKGBoundingBox *)boundingBox;
Swift
func boundingBox() -> GPKGBoundingBox!
Return Value
bounding box
-
Get the bounding box of the user table data
Declaration
Objective-C
- (GPKGBoundingBox *)boundingBoxInProjection:(PROJProjection *)projection;
Swift
func boundingBox(in projection: PROJProjection!) -> GPKGBoundingBox!
Parameters
projection
desired projection
Return Value
bounding box of user table data
-
Project the provided bounding box in the declared projection to the user DAO projection
Declaration
Objective-C
- (GPKGBoundingBox *)boundingBox:(GPKGBoundingBox *)boundingBox inProjection:(PROJProjection *)projection;
Swift
func boundingBox(_ boundingBox: GPKGBoundingBox!, in projection: PROJProjection!) -> GPKGBoundingBox!
Parameters
boundingBox
bounding box
projection
projection
Return Value
projected bounding box
-
Get the contents
Return Value
contents
-
Get the approximate zoom level of where the bounding box of the user data fits into the world
Declaration
Objective-C
- (int)zoomLevel;
Swift
func zoomLevel() -> Int32
Return Value
zoom level
-
Query for the row with the provided id
Declaration
Objective-C
- (GPKGUserRow *)queryForIdRow:(int)id;
Swift
func query(forIdRow id: Int32) -> GPKGUserRow!
Parameters
id
id
Return Value
row
-
Query for the row with the provided id
Declaration
Objective-C
- (GPKGUserRow *)queryWithColumns:(NSArray<NSString *> *)columns forIdRow:(int)id;
Swift
func query(withColumns columns: [String]!, forIdRow id: Int32) -> GPKGUserRow!
Parameters
columns
columns
id
id
Return Value
row
-
Paginate the results
Declaration
Objective-C
- (GPKGRowPaginatedResults *)paginate:(GPKGResultSet *)results;
Swift
func paginate(_ results: GPKGResultSet!) -> GPKGRowPaginatedResults!
Parameters
results
result set
Return Value
row paginated results
-
Paginate the results
Declaration
Objective-C
+ (GPKGRowPaginatedResults *)paginate:(GPKGResultSet *)results withDao:(GPKGUserDao *)dao;
Swift
class func paginate(_ results: GPKGResultSet!, with dao: GPKGUserDao!) -> GPKGRowPaginatedResults!
Parameters
results
result set
dao
base DAO
Return Value
row paginated results
-
Is the primary key modifiable
Declaration
Objective-C
- (BOOL)isPkModifiable;
Swift
func isPkModifiable() -> Bool
Return Value
true if the primary key is modifiable
-
Set if the primary key can be modified
Declaration
Objective-C
- (void)setPkModifiable:(BOOL)pkModifiable;
Swift
func setPkModifiable(_ pkModifiable: Bool)
Parameters
pkModifiable
primary key modifiable flag
-
Is value validation against column types enabled
Declaration
Objective-C
- (BOOL)isValueValidation;
Swift
func isValueValidation() -> Bool
Return Value
true if values are validated against column types
-
Set if values should validated against column types
Declaration
Objective-C
- (void)setValueValidation:(BOOL)valueValidation;
Swift
func setValueValidation(_ valueValidation: Bool)
Parameters
valueValidation
value validation flag
-
Add a new column
Declaration
Objective-C
- (void)addColumn:(GPKGUserColumn *)column;
Swift
func addColumn(_ column: GPKGUserColumn!)
Parameters
column
new column
-
Rename column
Declaration
Objective-C
- (void)renameColumn:(GPKGUserColumn *)column toColumn:(NSString *)newColumnName;
Swift
func renameColumn(_ column: GPKGUserColumn!, toColumn newColumnName: String!)
Parameters
column
column
newColumnName
new column name
-
Drop a column
Declaration
Objective-C
- (void)dropColumn:(GPKGUserColumn *)column;
Swift
func dropColumn(_ column: GPKGUserColumn!)
Parameters
column
column
-
Drop columns
Declaration
Objective-C
- (void)dropColumns:(NSArray<GPKGUserColumn *> *)columns;
Swift
func dropColumns(_ columns: [GPKGUserColumn]!)
Parameters
columns
column names
-
Alter a column
Declaration
Objective-C
- (void)alterColumn:(GPKGUserColumn *)column;
Swift
func alterColumn(_ column: GPKGUserColumn!)
Parameters
column
column
-
Alter columns
Declaration
Objective-C
- (void)alterColumns:(NSArray<GPKGUserColumn *> *)columns;
Swift
func alterColumns(_ columns: [GPKGUserColumn]!)
Parameters
columns
columns