VisualIB  1.0
IBExpress library for making use of Borland IBExpress outside of C++Builder
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
classVIBDatabase.h
Go to the documentation of this file.
1 
7 #ifndef CLASSVIBDATABASE_H__
8 #define CLASSVIBDATABASE_H__
9 
10 #include "../vibtypes.h"
11 #include "VIBProperties.h"
12 
13 struct VIBDatabase;
14 
15 namespace VIB
16 {
21  class Database
22  {
23  protected:
25 
26  public:
32  Database(VIBDatabase *pvdb = NULL);
38  virtual ~Database();
39 
45  VIBDatabase *getVIBDatabase() const { return vdb; }
46 
56  int Call(int ErrCode, bool RaiseError);
62  void CheckActive();
68  void CheckDatabaseName();
74  void CheckInactive();
85  void Close();
91  void CloseDataSets();
97  void CreateDatabase();
104  void DropDatabase();
110  void ForceClose();
115  void FlushSchema();
123  bool Has_COMPUTED_BLR(const std::string &Relation, const std::string &Field);
131  bool Has_DEFAULT_VALUE(const std::string &Relation, const std::string &Field);
138  int IndexOfDBConst(const char *st);
144  void Open();
151  bool TestConnected();
157  void RemoveTransaction(int Idx);
162  void RemoveTransactions();
163 
164  /* TODO:
165  int AddTransaction(Transaction *vtr);
166  int FindTransaction(Transaction *vtr);
167  Transaction *FindDefaultTransaction();
168  */
169 
170  // Property classes
171 
177  {
178  protected:
180  public:
185  ParamClass(Database *pParent) : parent(pParent) {}
186 
193  void Add(const std::string &str);
194  };
195  friend class ParamClass;
196 
202  {
203  protected:
205  public:
206  DBParamClass(Database *pParent) : parent(pParent) {}
207 
212  std::string operator [] (int i);
213  };
214 
215  protected:
216  // Property implementor objects
219 
220  public:
221  // Properties
223 
319 
325 
326  /* TODO:
327  VIBDLLFUNC VIBTransaction *VIBCALL VIBDatabase_Transactions(VIBDatabase *vdb, int Index);
328  VIBDLLFUNC VIBTransaction *VIBCALL VIBDatabase_InternalTransaction(VIBDatabase *vdb);
329  VIBDLLFUNC VIBTransaction *VIBCALL VIBDatabase_GetDefaultTransaction(VIBDatabase *vdb);
330  VIBDLLFUNC VIBBOOL VIBCALL VIBDatabase_SetDefaultTransaction(VIBDatabase *vdb, VIBTransaction *vtr);
331  VIBDLLFUNC VIBDataSet * VIBCALL VIBDatabase_DataSets(VIBDatabase *vdb, int Index);
332  */
333  };
334 }
335 
336 #endif
337 
338 // EOF
339