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

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

#import "CEResultSetPostgreSQL.h"

@interface CEDatabasePostgreSQL : CEDatabase 
{
	PGconn		*_sqlHandler;
}

+ (id)connectionWithURL:(NSString *)url database:(NSString *)database user:(NSString *)user password:(NSString *)password;

- (id)initWithDatabase:(NSString *)database atPath:(NSString *)url user:(NSString *)user password:(NSString *)password;
- (void)dealloc;

- (CEResultSet *)executeQuery:(NSString *)sqlString;

- (NSArray *)listDatabases;
- (NSArray *)listTablesForDatabase:(NSString *)databaseName;
- (NSArray *)indexArrayForDatabase:(NSString *)databaseName;
- (NSArray *)fieldStructureArrayForDatabase:(NSString *)databaseName table:(NSString *)tableName;
- (void)createDatabase:(NSString *)databaseName;

@end
