From 4a8fc2c8b3e7316068fd64fe8deb834b8c18342f Mon Sep 17 00:00:00 2001 From: George Tasker Date: Thu, 16 Mar 2000 19:00:07 +0000 Subject: [PATCH] Cleaned up the API for class/structure/function names to follow the wxWindows conventions (mostly prefixing wx to all of them). Backward compatability is maintained by keeping the old names calling the new functions, or typedef-ing the old names to the new names. The old names can be totally disabled at the end of the file by changing the #if 1 block that surrounds the old names Added a param to GetWhereClause() so that now the LIKE operator can be applied to strings rather than EQUAL git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dbtable.h | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/include/wx/dbtable.h b/include/wx/dbtable.h index 710b4d1650..5a5e5c9a85 100644 --- a/include/wx/dbtable.h +++ b/include/wx/dbtable.h @@ -82,20 +82,13 @@ public: }; // wxColDataPtr -// Backward compability for Remstar classes. These -// will eventually go away, so the wxColXxxx classes -// should be used -typedef wxColDef CcolDef; -typedef wxColDataPtr CcolDataPtr; - - // This structure is used when creating secondary indexes. -class WXDLLEXPORT CidxDef +class WXDLLEXPORT wxIdxDef { public: char ColName[DB_MAX_COLUMN_NAME_LEN+1]; bool Ascending; -}; // CidxDef +}; // wxIdxDef class WXDLLEXPORT wxTable @@ -156,7 +149,7 @@ public: bool Open(void); bool CreateTable(bool attemptDrop=TRUE); bool DropTable(void); - bool CreateIndex(const char * idxName, bool unique, int noIdxCols, CidxDef *pIdxDefs, bool attemptDrop=TRUE); + bool CreateIndex(const char * idxName, bool unique, int noIdxCols, wxIdxDef *pIdxDefs, bool attemptDrop=TRUE); bool DropIndex(const char * idxName); bool CloseCursor(HSTMT cursor); int Insert(void); @@ -186,7 +179,7 @@ public: void GetSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct); void GetDeleteStmt(char *pSqlStmt, int typeOfDel, const char *pWhereClause = 0); void GetUpdateStmt(char *pSqlStmt, int typeOfUpd, const char *pWhereClause = 0); - void GetWhereClause(char *pWhereClause, int typeOfWhere, const char *qualTableName = 0); + void GetWhereClause(char *pWhereClause, int typeOfWhere, const char *qualTableName = 0, bool useLikeComparison=FALSE); bool CanSelectForUpdate(void); bool CanUpdByROWID(void); void ClearMemberVars(void); @@ -212,4 +205,18 @@ public: }; // wxTable + +// Change this to 0 to remove use of all deprecated functions +#if 1 +//################################################################################# +//############### DEPRECATED functions for backward compatability ################# +//################################################################################# + +// Backward compability. These will eventually go away +typedef wxColDef CcolDef; +typedef wxColDataPtr CcolDataPtr; +typedef wxIdxDef CidxDef; + +#endif + #endif -- 2.47.2