source: trunk/MagicSoft/Mars/msql/MSQLMagic.h@ 8076

Last change on this file since 8076 was 8061, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 1.7 KB
Line 
1#ifndef MARS_MSQLMagic
2#define MARS_MSQLMagic
3
4#ifndef MARS_MSQLServer
5#include "MSQLServer.h"
6#endif
7
8class MSQLMagic : public MSQLServer
9{
10 Bool_t fIsDummy;
11
12public:
13 MSQLMagic(TSQLServer *serv, const char *dbname=0, const char *tname=0, const char *col=0) :
14 MSQLServer(serv, dbname, tname, col), fIsDummy(kFALSE)
15 {
16 }
17
18 MSQLMagic(const char *connection, const char *user, const char *password) :
19 MSQLServer(connection, user, password), fIsDummy(kFALSE)
20 {
21 }
22
23 MSQLMagic(const char *link) : MSQLServer(link), fIsDummy(kFALSE)
24 {
25 }
26
27 MSQLMagic(TEnv &env, const char *prefix=0) :
28 MSQLServer(env, prefix), fIsDummy(kFALSE)
29 {
30 }
31
32 MSQLMagic() : MSQLServer(), fIsDummy(kFALSE)
33 {
34 }
35
36
37 void SetIsDummy(Bool_t dummy=kTRUE) { fIsDummy=dummy; }
38 Bool_t IsDummy() const { return fIsDummy; }
39
40 TString QueryValOf(TString col, const char *ext, const char *key);
41 TString QueryValOfKey(TString col, const char *key);
42 TString QueryNameOfKey(TString col, const char *key);
43 Int_t QueryKeyOfName(const char *col, const char *name, Bool_t insert=kTRUE);
44 Int_t QueryKeyOfVal(const char *col, const char *val);
45 Int_t QueryKeyOf(const char *col, const char *ext, const char *val);
46 Bool_t ExistStr(const char *column, const char *table, const char *test);
47
48 Int_t Insert(const char *table, const char *vars);
49 Int_t Update(const char *table, const char *vars, const char *where);
50 Int_t Delete(const char *table, const char *where);
51
52 void Delete(const Option_t *o) { TObject::Delete(o); }
53
54 ClassDef(MSQLMagic, 0) // An enhancement of MSQLServer featuring our database
55};
56
57#endif
Note: See TracBrowser for help on using the repository browser.