]> git.saurik.com Git - wxWidgets.git/commitdiff
Added From(), OrderBy() and Where() functions that correspons to the Set/GetWhereClau...
authorGeorge Tasker <gtasker@allenbrook.com>
Mon, 20 Nov 2000 17:31:24 +0000 (17:31 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Mon, 20 Nov 2000 17:31:24 +0000 (17:31 +0000)
Changed signature of wxDbTable constructor to have the default value of tblPath be "" instead of NULL which prevents crashes in the logging code if the constructor initialization fails for some reason.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dbtable.h

index 203f453ad42869c6d823b066f4a511fe7b886867..95f976eb2a1d128ff6f24dfc17154ca4c3251c9e 100644 (file)
@@ -181,7 +181,7 @@ public:
 #endif
     // Public member functions
     wxDbTable(wxDb *pwxDb, const char *tblName, const int nCols,
-              const char *qryTblName = 0, bool qryOnly = !wxDB_QUERY_ONLY, const char *tblPath=NULL);
+              const char *qryTblName = 0, bool qryOnly = !wxDB_QUERY_ONLY, const char *tblPath="");
     virtual ~wxDbTable();
 
     bool            Open(void);
@@ -216,6 +216,12 @@ public:
     void            SetFromClause(const wxString& From) { from = From; }
     void            SetOrderByClause(const wxString& OrderBy) { orderBy = OrderBy; }
     void            SetWhereClause(const wxString& Where) { where = Where; }
+    void            From(const wxString& From) { from = From; }
+    void            OrderBy(const wxString& OrderBy) { orderBy = OrderBy; }
+    void            Where(const wxString& Where) { where = Where; }
+    const char *    Where()   { return (const char *)where.c_str(); }
+    const char *    OrderBy() { return (const char *)orderBy.c_str(); }
+    const char *    From()    { return (const char *)from.c_str(); }
 #endif
     int             Insert(void);
     bool            Update(void);