NTCartoSQLService
@interface NTCartoSQLService : NSObject {
void *swigCPtr;
BOOL swigCMemOwn;
}
A high-level interface for Carto SQL Service. The service can be used to query data from Carto databases using explicit SQL queries.
-
Checks if this object is equal to the specified object.
Declaration
Objective-C
- (BOOL)isEqual:(id)object;
Parameters
object
The reference object.
Return Value
True when objects are equal, false otherwise.
-
Returns the hash value of this object.
Declaration
Objective-C
- (NSUInteger)hash;
Return Value
The hash value of this object.
-
Constructs a new CartoSQLService service instance with default settings.
Declaration
Objective-C
- (id)init;
-
Returns the user account name used when accessing the online service.
Declaration
Objective-C
- (NSString *)getUsername;
Return Value
The user account name used when accessing the online service.
-
Sets the user account name used when accessing the online service.
Declaration
Objective-C
- (void)setUsername:(NSString *)username;
Parameters
username
The user account name used when accessing the online service.
-
Returns the API key used when accessing the online service.
Declaration
Objective-C
- (NSString *)getAPIKey;
Return Value
The API key used when accessing the online service.
-
Sets the optional API key used when accessing the online service. Usually this is not needed and can be left blank.
Declaration
Objective-C
- (void)setAPIKey:(NSString *)apiKey;
Parameters
apiKey
The optional API key used when accessing the online service.
-
Returns the API endpoint template of the online service.
Declaration
Objective-C
- (NSString *)getAPITemplate;
Return Value
The API endpoint template of the online service.
-
Sets the API endpoint template of the online service. By default cartodb.com endpoint is used. This needs to be redefined only for on-premise services.
Declaration
Objective-C
- (void)setAPITemplate:(NSString *)apiTemplate;
Parameters
apiTemplate
The API endpoint template of the online service. For example, “https://{user}.cartodb.com”
-
Connects to the online service and performs the specified query, The resulting JSON is deserialized into a Variant that is returned.
Warning
Throws NSException If IO error occured during the operation.Declaration
Objective-C
- (NTVariant *)queryData:(NSString *)sql;
Parameters
sql
The SQL query to use.
Return Value
The query result. If query fails, null variant is returned.
-
Connects to the online service and performs the specified query. The resulting JSON is deserialized into a FeatureCollection that is returned.
Warning
Throws NSException If IO error occured during the operation.Declaration
Objective-C
- (NTFeatureCollection *)queryFeatures:(NSString *)sql proj:(NTProjection *)proj;
Parameters
sql
The SQL query to use.
proj
The projection to use for transforming feature coordinates. Can be null for WGS84 coordinates.
Return Value
The query result as feature collection. If query fails, null feature collection is returned.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;