//
//  CEResultSetMySQL.h
//  CEResultSetMySQL
//
//  Copyright 2006 Cutedge. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <CEDatabase/CEResultSet.h>

#import "mysql.h"

@interface CEResultSetMySQL : CEResultSet 
{
	MYSQL_RES		*_result;
	
	MYSQL_ROW		_resultRow;
	MYSQL_FIELD		*_resultFields;
	unsigned long	*_fieldLengths;
}

+ (id)resultSet:(MYSQL_RES *)result withColumnCount:(int)noOfColumns;

- (void)dealloc;
- (BOOL)next;

- (NSString *)fieldTypeAtIndex:(int)index;
- (NSString *)fieldNameAtIndex:(int)index;
- (id)fieldAtIndex:(int)index;
- (id)convertObject:(MYSQL_ROW)row atIndex:(int)index;

- (void)setResult:(MYSQL_RES *)result;

- (MYSQL_FIELD *)resultFields;
- (void)setResultFields:(MYSQL_FIELD *)resultFields;


- (MYSQL_ROW)resultRow;
- (void)setResultRow:(MYSQL_ROW)resultRow;


- (unsigned long *)fieldLengths;
- (void)setFieldLengths:(unsigned long *)fieldLengths;

@end
