#include <project_qsql.hpp>
|
size_t | get_seis_data_size (const std::string &name, ErrCode *rc) const |
|
ErrCode | clear_seismics (const ContextQSql &dbc, const std::string &project_name) |
|
ErrCode | db_init (const hds::db::ContextQSql &context) |
|
ErrCode | db_close (const hds::db::ContextQSql &context) |
|
ErrCode | db_lock_tables (const TLDVec &tld_vec) |
|
ErrCode | db_release_tables_locks () |
|
ErrCode | db_get_lock (const std::string &lock_name, const size_t timeout=3) const |
|
ErrCode | db_release_lock (const std::string &lock_name) const |
|
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) |
|
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_creation_time (const std::string &table_name, ErrCode *prc=NULL) const |
|
time_t | db_table_modification_time (const std::string &table_name, ErrCode *prc=NULL) const |
|
quint64 | db_table_size (const std::string &table_name, ErrCode *prc=NULL) const |
|
size_t | db_table_rows_num (const std::string &table_name, ErrCode *prc=NULL) const |
|
ErrCode | db_transaction_begin () const |
|
ErrCode | db_transaction_commit () |
|
ErrCode | db_transaction_rollback () |
|
QString | get_db_name_hash (const hds::db::ContextQSql &context) const |
|
Project data access using qt sql technology.
hds::db::ProjectQSql::ProjectQSql |
( |
const ContextQSql & |
dbc | ) |
|
Constructor with data base context provided.
virtual hds::db::ProjectQSql::~ProjectQSql |
( |
| ) |
|
|
virtual |
Close opened data and destruct object.
ErrCode hds::db::ProjectQSql::clear_seismics |
( |
const ContextQSql & |
dbc, |
|
|
const std::string & |
project_name |
|
) |
| |
|
protected |
Clear all seismic in the project with provided name.
- Parameters
-
dbc | Database context. |
project_name | Name of the project. |
- Returns
- EC_NO_ERROR on success, correspondent error code otherwise.
virtual ErrCode hds::db::ProjectQSql::close |
( |
| ) |
|
|
virtual |
Try to close opened or created data. Return EC_NO_ERROR if all correct,
otherwise return correspondent error code.
Implements hds::db::Object.
virtual time_t hds::db::ProjectQSql::creationTime |
( |
const std::string & |
name, |
|
|
ErrCode * |
rc = NULL |
|
) |
| const |
|
virtual |
Get creation time of the object with provided name.
Return EC_NO_ERROR if all correct, otherwise return correspondent error code.
Implements hds::db::Object.
virtual std::string hds::db::ProjectQSql::creator |
( |
ErrCode * |
rc = NULL | ) |
const |
|
virtual |
Get creator of the project.
rc will be EC_NO_ERROR if all correct, otherwise correspondent error code.
Implements hds::db::Project.
virtual size_t hds::db::ProjectQSql::dataSize |
( |
const std::string & |
name, |
|
|
ErrCode * |
rc = NULL |
|
) |
| const |
|
virtual |
Get size of the object data in bytes.
- Parameters
-
name | Name of the project. |
prc | Resulted error code if provided. |
- Returns
- Data size in bytes.
Implements hds::db::Object.
static ErrCode hds::db::ProjectQSql::db_update_time_stamp |
( |
QSqlDatabase & |
db, |
|
|
const DbIndex & |
id |
|
) |
| |
|
staticprotected |
Update modification time for current time for project with provided id.
Return EC_NO_ERROR if all good.
virtual std::string hds::db::ProjectQSql::description |
( |
ErrCode * |
rc = NULL | ) |
const |
|
virtual |
Get description of the project.
rc will be EC_NO_ERROR if all correct, otherwise correspondent error code.
Implements hds::db::Project.
virtual ErrCode hds::db::ProjectQSql::flush |
( |
| ) |
|
|
virtual |
Synchronizes modified data with database.
- Returns
- EC_NO_ERROR if all done, otherwise return error code.
Implements hds::db::Object.
size_t hds::db::ProjectQSql::get_seis_data_size |
( |
const std::string & |
name, |
|
|
ErrCode * |
rc |
|
) |
| const |
|
protected |
Get size of seismics inside current project in bytes.
- Parameters
-
prc | Resulted error code if provided. |
- Returns
- Data size in bytes.
virtual ErrCode hds::db::ProjectQSql::getList |
( |
Names & |
list | ) |
const |
|
virtual |
Get list of data base objects names for current context.
Return EC_NO_ERROR if all correct, otherwise return correspondent error code.
Implements hds::db::Object.
virtual time_t hds::db::ProjectQSql::modificationTime |
( |
const std::string & |
name, |
|
|
ErrCode * |
rc = NULL |
|
) |
| const |
|
virtual |
Get modification time of the object with provided name.
Return EC_NO_ERROR if all correct, otherwise return correspondent error code.
Implements hds::db::Object.
virtual std::string hds::db::ProjectQSql::name |
( |
ErrCode * |
rc = NULL | ) |
const |
|
virtual |
Get name of the project.
rc will be EC_NO_ERROR if all correct, otherwise correspondent error code.
Implements hds::db::Object.
static ErrCode hds::db::ProjectQSql::name2id |
( |
QSqlDatabase & |
db, |
|
|
const std::string & |
name, |
|
|
DbIndex & |
id |
|
) |
| |
|
staticprotected |
Get id of project with provided name. Return EC_NO_ERROR if all good.
virtual ErrCode hds::db::ProjectQSql::open |
( |
const std::string & |
name, |
|
|
OpenMode |
mode |
|
) |
| |
|
virtual |
Try to open data with provided name. Return EC_NO_ERROR if all correct,
otherwise return correspondent error code. Temporary projects (mode = OM_TMP) not supported now.
Implements hds::db::Object.
virtual ErrCode hds::db::ProjectQSql::remove |
( |
const std::string & |
name | ) |
|
|
virtual |
Try to remove data with provided name. Return EC_NO_ERROR if all correct,
otherwise return correspondent error code.
Implements hds::db::Object.
virtual ErrCode hds::db::ProjectQSql::setCreator |
( |
const std::string & |
creator_str | ) |
|
|
virtual |
Set creator of the project.
Return EC_NO_ERROR if all correct, otherwise return correspondent error code.
Implements hds::db::Project.
virtual ErrCode hds::db::ProjectQSql::setDescription |
( |
const std::string & |
descr_str | ) |
|
|
virtual |
Set description of the project.
Return EC_NO_ERROR if all correct, otherwise return correspondent error code.
Implements hds::db::Project.
virtual ErrCode hds::db::ProjectQSql::setName |
( |
const std::string & |
name_str | ) |
|
|
virtual |
Set name of the project (rename).
Return EC_NO_ERROR if all correct, otherwise return correspondent error code.
Implements hds::db::Object.
DbIndex hds::db::ProjectQSql::m_cur_project_id |
|
protected |
< Current id of the project if opened.
The documentation for this class was generated from the following file:
- /net/opt/univers/ubp-i-15.3-centos7-x64.urij/include/hds_db/qsql/project_qsql.hpp