This repository has been archived by the owner on Dec 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Database API
RadWolfie edited this page Oct 23, 2013
·
1 revision
This is all functions are recommended to be integrated into the plugin that is being used to handle the database. This is not part of requirement.
NOTICE #1: Only ONE plugin may perform as database handler. Once a plugin is hooked as a handler, other plugins want to handle the database will be ignored.
NOTICE #2: Some functions listed below may or may not be in used and perform as preset in native H-Ext, other plugins may be use these functions.
extern "C" __declspec(dllexport) bool EXTHookDatabase() {
return true;
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseNew() {
return false;
}
extern "C" __declspec(dllexport) void EXTOnDatabaseDestroy() {
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseConnect(LPCWSTR MDBPath,LPCWSTR User=L"", LPCWSTR Pass=L"",bool Exclusive=0) {
return false;
}
extern "C" __declspec(dllexport) void EXTOnDatabaseDisconnect() {
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementNew(int StmtID) {
return true;
}
extern "C" __declspec(dllexport) void EXTOnDatabaseStatementDestroy(int StmtID) {
}
extern "C" __declspec(dllexport) DBSQL::USHORT EXTOnDatabaseStatementColumnCount(int StmtID) {
return 0;
}
extern "C" __declspec(dllexport) DWORD EXTOnDatabaseStatementChangedRowCount(int StmtID) {
return 0;
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementQuery(int StmtID, LPCWSTR strSQL) {
SQLRETURN nRet = NULL;
return IS_SQL_OK( nRet );
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementFetch(int StmtID) {
SQLRETURN nRet = NULL;
return IS_SQL_OK( nRet );
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementFetchRow(int StmtID, UINT nRow) {
SQLRETURN nRet = NULL;
return IS_SQL_OK(nRet);
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementFetchPrevious(int StmtID) {
SQLRETURN nRet = NULL;
return IS_SQL_OK(nRet);
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementFetchNext(int StmtID) {
SQLRETURN nRet = NULL;
return IS_SQL_OK(nRet);
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementFetchRowAR(int StmtID, UINT nRow, bool Absolute) {
SQLRETURN nRet = NULL;
return IS_SQL_OK(nRet);
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementFetchFirst(int StmtID) {
SQLRETURN nRet = NULL;
return IS_SQL_OK(nRet);
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementFetchLast(int StmtID) {
SQLRETURN nRet = NULL;
return IS_SQL_OK(nRet);
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementCancel(int StmtID) {
SQLRETURN nRet = NULL;
return IS_SQL_OK(nRet);
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementBindColumn(int StmtID, DBSQL::USHORT Column, LPVOID pBuffer, DBSQL::ULONG pBufferSize, LONG * pReturnedBufferSize, DBSQL::USHORT nType) {
SQLRETURN nRet = NULL;
return IS_SQL_OK(nRet);
}
extern "C" __declspec(dllexport) DBSQL::USHORT EXTOnDatabaseStatementColumnByName(int StmtID, LPCWSTR Column) {
return 0;
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementData(int StmtID, DBSQL::USHORT Column, LPVOID pBuffer, DBSQL::ULONG pBufLen, LONG * dataLen, int Type) {
SQLRETURN nRet = NULL;
return IS_SQL_OK(nRet);
}
extern "C" __declspec(dllexport) int EXTOnDatabaseStatementColumnType(int StmtID, DBSQL::USHORT Column) {
int nType=SQL_C_DEFAULT;
return( nType );
}
extern "C" __declspec(dllexport) DWORD EXTOnDatabaseStatementColumnSize(int StmtID, DBSQL::USHORT Column) {
return 0;
}
extern "C" __declspec(dllexport) DWORD EXTOnDatabaseStatementColumnScale(int StmtID, DBSQL::USHORT Column) {
return 0;
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementColumnName(int StmtID, DBSQL::USHORT Column, LPWSTR Name, SHORT NameLen ) {
return false;
}
extern "C" __declspec(dllexport) bool EXTOnDatabaseStatementIsValid(int StmtID) {
return false;
}