-
Notifications
You must be signed in to change notification settings - Fork 0
/
databaserepo.h
48 lines (37 loc) · 965 Bytes
/
databaserepo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef DATABASEREPO_H
#define DATABASEREPO_H
#include <QString>
#include <QStringList>
class DatabaseRepo
{
public:
enum ObjectType {
Unknown = 0,
Table = 1,
View = 2,
Procedure = 3,
Function = 4,
Package = 5,
MView = 6,
MViewLog = 7,
Sequence = 8,
Java = 9,
DBLink = 10,
Type = 11,
Job = 12
};
DatabaseRepo(const QString &path);
bool saveObject(ObjectType type, const QString &name, const QString &ddl);
bool saveData(const QString &name, const QString &ddl);
QStringList allObjects();
bool clear();
bool initChangelog();
static QString typeDirrectoryById(ObjectType objType);
static ObjectType typeIdByName(const QString &type);
inline QString path() {return _path;}
inline QString lastError() {return _errorString;}
private:
QString _path;
QString _errorString;
};
#endif // DATABASEREPO_H