134 bool init(
aCfgRc *rc,
const QString &dbname = QString::null );
135 bool init(
const QString &rcname,
const QString &dbname = QString::null );
136 bool prepareDatabaseConnect(
aCfgRc *rc );
138 QSqlDatabase* db(
const QString &dbname = QString::null );
139 bool checkStructure();
141 bool drop(
const QString &);
143 Q_ULLONG uid(
int otype );
144 int uidType ( Q_ULLONG uid );
145 aDataTable* table(
const QString & name = QString::null );
146 bool tableExists(
const QString & name );
147 void markDeleted(Q_ULLONG uid);
149 QString driverName();
151 bool isAccessRights(
int md_type, Q_ULLONG obj_id, DBPermission req_operation );
153 static QStringList supportedDriverList();
154 static QStringList getUniqueIndices(
const QString & flddef);
155 static QString tableDbName(
aCfg &md, aCfgItem context,
long * tid);
156 static QString tableDbName(
aCfg &md, aCfgItem context);
158 bool exchangeDataSystables ( QDomDocument &xml,
bool import );
159 bool exchangeDataCatalogues ( QDomDocument &xml,
bool import );
160 bool exchangeDataDocuments ( QDomDocument &xml,
bool import );
161 bool exchangeDataJournals ( QDomDocument &xml,
bool import );
162 bool exchangeDataInfoRegisters ( QDomDocument &xml,
bool import );
163 bool exchangeDataAccumulationRegisters ( QDomDocument &xml,
bool import );
164 bool exchangeDataUniques ( QDomDocument &xml,
bool import );
171 int loginUsersCount();
172 bool login(
const QString &username,
const QString &password,
int applicationId = 0 );
176 bool isObjectLocked( Q_ULLONG
id );
177 bool objectLock( Q_ULLONG
id );
178 void objectUnlock( Q_ULLONG
id=0 );
181 int rolePermission(
int role_id,
int md_id );
182 void setRolePermission(
int role_id,
int md_id,
int new_permission );
188 void timerEvent ( QTimerEvent * );
197 QSqlDatabase *dataBase;
198 int v_user_id, v_app_id;
203 bool exportTableData(QDomDocument& xml,
const QString &tableName);
204 bool importTableData(QDomDocument& xml,
const QString &tableName);
205 void reportError(QSqlError er,
const QString &query);
207 bool isExists(
const QString fname, QStringList *f_lst, QString &match);
208 bool createdb(
bool update );
209 bool dumpTable( QDomDocument& xml,
const QString &tableName);
211 QString feature(
const QString& fetureName);
213 QMap<QString, QString> featuresMySQL, featuresSQLite, featuresPostgreSQL;
214 QMap<int, int> accessRights;