WL#1099: ObjC API (for OSX)

Affects: Benchmarks-3.0   —   Status: Un-Assigned

Relevant part of the header files from the not completed version I wrote:

@interface MySQLInstance : NSObject
{
        MYSQL *dbh;
        NSString *currentUsername;
        NSString *currentHostname;
        NSString *currentPassword;
        NSString *currentPort;
        unsigned int *errorno;
}
 
- (id)init;
- (BOOL)connectWithUser:(NSString *)username password:(NSString *)password
hostname:(NSString *)hostname port:(NSString  *)port;
- (BOOL)connectWithUser:(NSString *)username password:(NSString *)password;
- (BOOL)executeUpdate:(NSString *)query;
- (MySQLResult *)executeQuery:(NSString *)query;
- (BOOL)isClosed;
- (void)close;
- (MySQLInstance *)clone;
- (NSString *)getError;
- (unsigned int)getErrorNumber;
- (void)dealloc;
@end

@interface MySQLResult : NSObject
{
        MYSQL_RES *cursor;
        NSMutableArray *names;
}
 
- (id)initWithRES:(MYSQL_RES *)res;
- (NSArray *)fetchRowArray;
- (NSDictionary *)fetchRowDictionary;
- (NSArray *)fetchAllArray;
- (NSArray *)fetchAllDictionary;
- (unsigned int)rows;
- (unsigned int)fields;
- (NSArray *)fieldNames;
- (void)dealloc;
 
@end