#ifndef DATABASE_POSTGRESQL_POSTGRESQL_BMX_RELEASE_WIN32_X64_H
#define DATABASE_POSTGRESQL_POSTGRESQL_BMX_RELEASE_WIN32_X64_H

#include <brl.mod/blitz.mod/.bmx/blitz.bmx.release.win32.x64.h>
#include <database.mod/core.mod/.bmx/core.bmx.release.win32.x64.h>
#include "common.bmx.release.win32.x64.h"
int __bb_database_postgresql_postgresql();
struct database_postgresql_TPostgreSQLDatabaseLoader_obj;
struct database_postgresql_TDBPostgreSQL_obj;
struct database_postgresql_TPostgreSQLResultSet_obj;
void _database_postgresql_TPostgreSQLDatabaseLoader_New(struct database_postgresql_TPostgreSQLDatabaseLoader_obj* o);
typedef struct database_core_TDBConnection_obj* (*database_postgresql_TPostgreSQLDatabaseLoader_LoadDatabase_SSiSSSS_m)(struct database_postgresql_TPostgreSQLDatabaseLoader_obj*,BBSTRING,BBSTRING,BBINT,BBSTRING,BBSTRING,BBSTRING,BBSTRING);
struct database_core_TDBConnection_obj* _database_postgresql_TPostgreSQLDatabaseLoader_LoadDatabase_SSiSSSS(struct database_postgresql_TPostgreSQLDatabaseLoader_obj*,BBSTRING,BBSTRING,BBINT,BBSTRING,BBSTRING,BBSTRING,BBSTRING);
struct BBClass_database_postgresql_TPostgreSQLDatabaseLoader {
	struct BBClass_database_core_TDatabaseLoader*  super;
	void      (*free)( BBObject *o );
	BBDebugScope* debug_scope;
	unsigned int instance_size;
	void      (*ctor)( BBOBJECT o );
	void      (*dtor)( BBOBJECT o );
	BBSTRING  (*ToString)( BBOBJECT x );
	int       (*Compare)( BBOBJECT x,BBOBJECT y );
	BBOBJECT  (*SendMessage)( BBOBJECT o,BBOBJECT m,BBOBJECT s );
	BBINTERFACETABLE itable;
	void*     extra;
	unsigned int obj_size;
	unsigned int instance_count;
	unsigned int fields_offset;
	database_postgresql_TPostgreSQLDatabaseLoader_LoadDatabase_SSiSSSS_m m_LoadDatabase_SSiSSSS;
};

struct database_postgresql_TPostgreSQLDatabaseLoader_obj {
	struct BBClass_database_postgresql_TPostgreSQLDatabaseLoader* clas;
	BBSTRING _database_core_tdatabaseloader__type;
	struct database_core_TDatabaseLoader_obj* _database_core_tdatabaseloader__succ;
};
extern struct BBClass_database_postgresql_TPostgreSQLDatabaseLoader database_postgresql_TPostgreSQLDatabaseLoader;
void _database_postgresql_TDBPostgreSQL_New(struct database_postgresql_TDBPostgreSQL_obj* o);
void _database_postgresql_TDBPostgreSQL_Delete(struct database_postgresql_TDBPostgreSQL_obj* o);
typedef struct database_core_TDBConnection_obj* (*database_postgresql_TDBPostgreSQL_Create_TTDBConnection_SSiSSSS_f)(BBSTRING,BBSTRING,BBINT,BBSTRING,BBSTRING,BBSTRING,BBSTRING);
struct database_core_TDBConnection_obj* database_postgresql_TDBPostgreSQL_Create_TTDBConnection_SSiSSSS(BBSTRING,BBSTRING,BBINT,BBSTRING,BBSTRING,BBSTRING,BBSTRING);
typedef void (*database_postgresql_TDBPostgreSQL_close_m)(struct database_postgresql_TDBPostgreSQL_obj*);
void _database_postgresql_TDBPostgreSQL_close(struct database_postgresql_TDBPostgreSQL_obj*);
typedef BBINT (*database_postgresql_TDBPostgreSQL_isOpen_m)(struct database_postgresql_TDBPostgreSQL_obj*);
BBINT _database_postgresql_TDBPostgreSQL_isOpen(struct database_postgresql_TDBPostgreSQL_obj*);
typedef BBINT (*database_postgresql_TDBPostgreSQL_commit_m)(struct database_postgresql_TDBPostgreSQL_obj*);
BBINT _database_postgresql_TDBPostgreSQL_commit(struct database_postgresql_TDBPostgreSQL_obj*);
typedef BBARRAY (*database_postgresql_TDBPostgreSQL_getTables_m)(struct database_postgresql_TDBPostgreSQL_obj*);
BBARRAY _database_postgresql_TDBPostgreSQL_getTables(struct database_postgresql_TDBPostgreSQL_obj*);
typedef struct database_core_TDBTable_obj* (*database_postgresql_TDBPostgreSQL_getTableInfo_Si_m)(struct database_postgresql_TDBPostgreSQL_obj*,BBSTRING,BBINT);
struct database_core_TDBTable_obj* _database_postgresql_TDBPostgreSQL_getTableInfo_Si(struct database_postgresql_TDBPostgreSQL_obj*,BBSTRING,BBINT);
typedef BBINT (*database_postgresql_TDBPostgreSQL_open_SS_m)(struct database_postgresql_TDBPostgreSQL_obj*,BBSTRING,BBSTRING);
BBINT _database_postgresql_TDBPostgreSQL_open_SS(struct database_postgresql_TDBPostgreSQL_obj*,BBSTRING,BBSTRING);
typedef BBINT (*database_postgresql_TDBPostgreSQL_rollback_m)(struct database_postgresql_TDBPostgreSQL_obj*);
BBINT _database_postgresql_TDBPostgreSQL_rollback(struct database_postgresql_TDBPostgreSQL_obj*);
typedef BBINT (*database_postgresql_TDBPostgreSQL_startTransaction_m)(struct database_postgresql_TDBPostgreSQL_obj*);
BBINT _database_postgresql_TDBPostgreSQL_startTransaction(struct database_postgresql_TDBPostgreSQL_obj*);
typedef BBBYTE* (*database_postgresql_TDBPostgreSQL_databaseHandle_m)(struct database_postgresql_TDBPostgreSQL_obj*);
BBBYTE* _database_postgresql_TDBPostgreSQL_databaseHandle(struct database_postgresql_TDBPostgreSQL_obj*);
typedef struct database_core_TQueryResultSet_obj* (*database_postgresql_TDBPostgreSQL_createResultSet_m)(struct database_postgresql_TDBPostgreSQL_obj*);
struct database_core_TQueryResultSet_obj* _database_postgresql_TDBPostgreSQL_createResultSet(struct database_postgresql_TDBPostgreSQL_obj*);
typedef BBSTRING (*database_postgresql_TDBPostgreSQL_nativeErrorMessage_i_m)(struct database_postgresql_TDBPostgreSQL_obj*,BBINT);
BBSTRING _database_postgresql_TDBPostgreSQL_nativeErrorMessage_i(struct database_postgresql_TDBPostgreSQL_obj*,BBINT);
typedef BBINT (*database_postgresql_TDBPostgreSQL_hasPrepareSupport_m)(struct database_postgresql_TDBPostgreSQL_obj*);
BBINT _database_postgresql_TDBPostgreSQL_hasPrepareSupport(struct database_postgresql_TDBPostgreSQL_obj*);
typedef BBINT (*database_postgresql_TDBPostgreSQL_hasTransactionSupport_m)(struct database_postgresql_TDBPostgreSQL_obj*);
BBINT _database_postgresql_TDBPostgreSQL_hasTransactionSupport(struct database_postgresql_TDBPostgreSQL_obj*);
struct BBClass_database_postgresql_TDBPostgreSQL {
	struct BBClass_database_core_TDBConnection*  super;
	void      (*free)( BBObject *o );
	BBDebugScope* debug_scope;
	unsigned int instance_size;
	void      (*ctor)( BBOBJECT o );
	void      (*dtor)( BBOBJECT o );
	BBSTRING  (*ToString)( BBOBJECT x );
	int       (*Compare)( BBOBJECT x,BBOBJECT y );
	BBOBJECT  (*SendMessage)( BBOBJECT o,BBOBJECT m,BBOBJECT s );
	BBINTERFACETABLE itable;
	void*     extra;
	unsigned int obj_size;
	unsigned int instance_count;
	unsigned int fields_offset;
	database_postgresql_TDBPostgreSQL_Create_TTDBConnection_SSiSSSS_f f_Create_TTDBConnection_SSiSSSS;
	database_core_TDBConnection_Init_SSiSSSS_m m_Init_SSiSSSS;
	database_postgresql_TDBPostgreSQL_close_m m_close;
	database_postgresql_TDBPostgreSQL_commit_m m_commit;
	database_postgresql_TDBPostgreSQL_getTables_m m_getTables;
	database_postgresql_TDBPostgreSQL_getTableInfo_Si_m m_getTableInfo_Si;
	database_postgresql_TDBPostgreSQL_open_SS_m m_open_SS;
	database_postgresql_TDBPostgreSQL_rollback_m m_rollback;
	database_postgresql_TDBPostgreSQL_startTransaction_m m_startTransaction;
	database_core_TDBConnection_executeQuery_S_m m_executeQuery_S;
	database_postgresql_TDBPostgreSQL_isOpen_m m_isOpen;
	database_core_TDBConnection_getDatabaseName_m m_getDatabaseName;
	database_core_TDBConnection_getHost_m m_getHost;
	database_core_TDBConnection_getPortNumber_m m_getPortNumber;
	database_core_TDBConnection_error_m m_error;
	database_core_TDBConnection_resetError_m m_resetError;
	database_core_TDBConnection_hasError_m m_hasError;
	database_core_TDBConnection_setError_SSii_m m_setError_SSii;
	database_postgresql_TDBPostgreSQL_databaseHandle_m m_databaseHandle;
	database_postgresql_TDBPostgreSQL_createResultSet_m m_createResultSet;
	database_postgresql_TDBPostgreSQL_nativeErrorMessage_i_m m_nativeErrorMessage_i;
	database_postgresql_TDBPostgreSQL_hasPrepareSupport_m m_hasPrepareSupport;
	database_postgresql_TDBPostgreSQL_hasTransactionSupport_m m_hasTransactionSupport;
	database_core_TDBConnection_free_m m_free;
};

struct database_postgresql_TDBPostgreSQL_obj {
	struct BBClass_database_postgresql_TDBPostgreSQL* clas;
	BBBYTE* _database_core_tdbconnection_handle;
	BBSTRING _database_core_tdbconnection__dbname;
	BBSTRING _database_core_tdbconnection__host;
	BBINT _database_core_tdbconnection__port;
	BBSTRING _database_core_tdbconnection__user;
	BBSTRING _database_core_tdbconnection__password;
	BBSTRING _database_core_tdbconnection__options;
	BBSTRING _database_core_tdbconnection__server;
	BBINT _database_core_tdbconnection__isopen;
	struct database_core_TDatabaseError_obj* _database_core_tdbconnection__lasterror;
};
extern struct BBClass_database_postgresql_TDBPostgreSQL database_postgresql_TDBPostgreSQL;
void _database_postgresql_TPostgreSQLResultSet_New(struct database_postgresql_TPostgreSQLResultSet_obj* o);
void _database_postgresql_TPostgreSQLResultSet_Delete(struct database_postgresql_TPostgreSQLResultSet_obj* o);
typedef struct database_core_TQueryResultSet_obj* (*database_postgresql_TPostgreSQLResultSet_Create_TTQueryResultSet_TTDBConnectionS_f)(struct database_core_TDBConnection_obj*,BBSTRING);
struct database_core_TQueryResultSet_obj* database_postgresql_TPostgreSQLResultSet_Create_TTQueryResultSet_TTDBConnectionS(struct database_core_TDBConnection_obj*,BBSTRING);
typedef void (*database_postgresql_TPostgreSQLResultSet_clearResultSet_m)(struct database_postgresql_TPostgreSQLResultSet_obj*);
void _database_postgresql_TPostgreSQLResultSet_clearResultSet(struct database_postgresql_TPostgreSQLResultSet_obj*);
typedef void (*database_postgresql_TPostgreSQLResultSet_cleanup_m)(struct database_postgresql_TPostgreSQLResultSet_obj*);
void _database_postgresql_TPostgreSQLResultSet_cleanup(struct database_postgresql_TPostgreSQLResultSet_obj*);
typedef BBINT (*database_postgresql_TPostgreSQLResultSet_executeQuery_S_m)(struct database_postgresql_TPostgreSQLResultSet_obj*,BBSTRING);
BBINT _database_postgresql_TPostgreSQLResultSet_executeQuery_S(struct database_postgresql_TPostgreSQLResultSet_obj*,BBSTRING);
typedef void (*database_postgresql_TPostgreSQLResultSet_initRecord_i_m)(struct database_postgresql_TPostgreSQLResultSet_obj*,BBINT);
void _database_postgresql_TPostgreSQLResultSet_initRecord_i(struct database_postgresql_TPostgreSQLResultSet_obj*,BBINT);
typedef BBINT (*database_postgresql_TPostgreSQLResultSet_prepare_S_m)(struct database_postgresql_TPostgreSQLResultSet_obj*,BBSTRING);
BBINT _database_postgresql_TPostgreSQLResultSet_prepare_S(struct database_postgresql_TPostgreSQLResultSet_obj*,BBSTRING);
typedef BBINT (*database_postgresql_TPostgreSQLResultSet_execute_m)(struct database_postgresql_TPostgreSQLResultSet_obj*);
BBINT _database_postgresql_TPostgreSQLResultSet_execute(struct database_postgresql_TPostgreSQLResultSet_obj*);
typedef BBINT (*database_postgresql_TPostgreSQLResultSet_firstRow_m)(struct database_postgresql_TPostgreSQLResultSet_obj*);
BBINT _database_postgresql_TPostgreSQLResultSet_firstRow(struct database_postgresql_TPostgreSQLResultSet_obj*);
typedef BBINT (*database_postgresql_TPostgreSQLResultSet_nextRow_m)(struct database_postgresql_TPostgreSQLResultSet_obj*);
BBINT _database_postgresql_TPostgreSQLResultSet_nextRow(struct database_postgresql_TPostgreSQLResultSet_obj*);
typedef BBLONG (*database_postgresql_TPostgreSQLResultSet_lastInsertedId_m)(struct database_postgresql_TPostgreSQLResultSet_obj*);
BBLONG _database_postgresql_TPostgreSQLResultSet_lastInsertedId(struct database_postgresql_TPostgreSQLResultSet_obj*);
typedef BBINT (*database_postgresql_TPostgreSQLResultSet_rowsAffected_m)(struct database_postgresql_TPostgreSQLResultSet_obj*);
BBINT _database_postgresql_TPostgreSQLResultSet_rowsAffected(struct database_postgresql_TPostgreSQLResultSet_obj*);
typedef BBINT (*database_postgresql_TPostgreSQLResultSet_dbTypeFromNative_i_Sii_f)(BBSTRING,BBINT,BBINT);
BBINT database_postgresql_TPostgreSQLResultSet_dbTypeFromNative_i_Sii(BBSTRING,BBINT,BBINT);
struct BBClass_database_postgresql_TPostgreSQLResultSet {
	struct BBClass_database_core_TQueryResultSet*  super;
	void      (*free)( BBObject *o );
	BBDebugScope* debug_scope;
	unsigned int instance_size;
	void      (*ctor)( BBOBJECT o );
	void      (*dtor)( BBOBJECT o );
	BBSTRING  (*ToString)( BBOBJECT x );
	int       (*Compare)( BBOBJECT x,BBOBJECT y );
	BBOBJECT  (*SendMessage)( BBOBJECT o,BBOBJECT m,BBOBJECT s );
	BBINTERFACETABLE itable;
	void*     extra;
	unsigned int obj_size;
	unsigned int instance_count;
	unsigned int fields_offset;
	database_postgresql_TPostgreSQLResultSet_Create_TTQueryResultSet_TTDBConnectionS_f f_Create_TTQueryResultSet_TTDBConnectionS;
	database_core_TQueryResultSet_Init_TTDBConnectionS_m m_Init_TTDBConnectionS;
	database_core_TQueryResultSet_clearBindValues_m m_clearBindValues;
	database_core_TQueryResultSet_clear_m m_clear;
	database_postgresql_TPostgreSQLResultSet_executeQuery_S_m m_executeQuery_S;
	database_postgresql_TPostgreSQLResultSet_prepare_S_m m_prepare_S;
	database_postgresql_TPostgreSQLResultSet_execute_m m_execute;
	database_postgresql_TPostgreSQLResultSet_firstRow_m m_firstRow;
	database_postgresql_TPostgreSQLResultSet_nextRow_m m_nextRow;
	database_postgresql_TPostgreSQLResultSet_lastInsertedId_m m_lastInsertedId;
	database_postgresql_TPostgreSQLResultSet_rowsAffected_m m_rowsAffected;
	database_postgresql_TPostgreSQLResultSet_dbTypeFromNative_i_Sii_f f_dbTypeFromNative_i_Sii;
	database_core_TQueryResultSet_rowRecord_m m_rowRecord;
	database_core_TQueryResultSet_dataValue_i_m m_dataValue_i;
	database_core_TQueryResultSet_rowIndex_m m_rowIndex;
	database_core_TQueryResultSet_setRowIndex_i_m m_setRowIndex_i;
	database_core_TQueryResultSet_isActive_m m_isActive;
	database_core_TQueryResultSet_isValid_m m_isValid;
	database_core_TQueryResultSet_resetValues_i_m m_resetValues_i;
	database_core_TQueryResultSet_resetBindCount_m m_resetBindCount;
	database_core_TQueryResultSet_addBindValue_TTDBType_m m_addBindValue_TTDBType;
	database_core_TQueryResultSet_bindValue_iTTDBType_m m_bindValue_iTTDBType;
	database_core_TQueryResultSet_reset_m m_reset;
	database_core_TQueryResultSet_free_m m_free;
	database_postgresql_TPostgreSQLResultSet_clearResultSet_m m_clearResultSet;
	database_postgresql_TPostgreSQLResultSet_cleanup_m m_cleanup;
	database_postgresql_TPostgreSQLResultSet_initRecord_i_m m_initRecord_i;
};

struct database_postgresql_TPostgreSQLResultSet_obj {
	struct BBClass_database_postgresql_TPostgreSQLResultSet* clas;
	struct database_core_TDBConnection_obj* _database_core_tqueryresultset_conn;
	BBBYTE* _database_core_tqueryresultset_stmthandle;
	BBSTRING _database_core_tqueryresultset_query;
	BBINT _database_core_tqueryresultset__isactive;
	BBINT _database_core_tqueryresultset_index;
	BBARRAY _database_core_tqueryresultset_values;
	BBINT _database_core_tqueryresultset_bindcount;
	BBARRAY _database_core_tqueryresultset_boundvalues;
	struct database_core_TQueryRecord_obj* _database_core_tqueryresultset_rec;
	BBBYTE* _database_postgresql_tpostgresqlresultset_pgresult;
	BBINT _database_postgresql_tpostgresqlresultset__queryrows;
	BBINT _database_postgresql_tpostgresqlresultset__rowsaffected;
	BBSTRING _database_postgresql_tpostgresqlresultset__preparedstatementname;
};
extern struct BBClass_database_postgresql_TPostgreSQLResultSet database_postgresql_TPostgreSQLResultSet;

#endif
