3 #ifndef __hds_db_qsql_impl_hpp
4 #define __hds_db_qsql_impl_hpp
6 #include <hds_db/base/seismic.hpp>
7 #include <hds_db/qsql/dbcontext_qsql.hpp>
8 #include <QSqlDatabase>
39 const std::string &i_table_name):
48 typedef std::vector<TableLockDescr>
TLDVec;
87 mutable bool m_is_transaction_started;
111 const size_t timeout = 3)
const;
121 const std::string &field_name,
122 const std::string &key_name,
124 const std::string &value);
129 const std::string &field_name,
130 const std::string &key_name,
132 std::string &value)
const;
ErrCode db_get_item_value(const std::string &table_name, const std::string &field_name, const std::string &key_name, const DbIndex &key_id, std::string &value) const
time_t db_table_modification_time(const std::string &table_name, ErrCode *prc=NULL) const
time_t db_table_creation_time(const std::string &table_name, ErrCode *prc=NULL) const
Definition: qsql_impl.hpp:26
ErrCode db_transaction_rollback()
size_t db_table_rows_num(const std::string &table_name, ErrCode *prc=NULL) const
Definition: dbcontext_qsql.hpp:15
uint64_t DbIndex
Definition: defines.hpp:26
ErrCode db_transaction_commit()
TableLockType
Definition: qsql_impl.hpp:24
ErrCode db_lock_tables(const TLDVec &tld_vec)
ErrCode db_set_item_value(const std::string &table_name, const std::string &field_name, const std::string &key_name, const DbIndex &key_id, const std::string &value)
ContextQSql m_dbc
Definition: qsql_impl.hpp:84
Definition: qsql_impl.hpp:32
ErrCode
Definition: defines.hpp:46
quint64 db_table_size(const std::string &table_name, ErrCode *prc=NULL) const
ErrCode db_release_lock(const std::string &lock_name) const
ErrCode db_close(const hds::db::ContextQSql &context)
std::string table_name
Definition: qsql_impl.hpp:44
const ContextQSql & getDbContext() const
Definition: qsql_impl.hpp:62
std::vector< TableLockDescr > TLDVec
Definition: qsql_impl.hpp:48
QSqlDatabase m_db
Definition: qsql_impl.hpp:81
TableLockType type
Definition: qsql_impl.hpp:43
ErrCode db_init(const hds::db::ContextQSql &context)
QSqlDatabase & getDb()
Definition: qsql_impl.hpp:65
QMutex & getDefaultMutex() const
Definition: qsql_impl.hpp:19
ErrCode db_transaction_begin() const
QString get_db_name_hash(const hds::db::ContextQSql &context) const
bool supportTransactionsFlag() const
ErrCode db_get_lock(const std::string &lock_name, const size_t timeout=3) const
ErrCode dbConnect() const
Definition: qsql_impl.hpp:27
ErrCode db_release_tables_locks()