3 #ifndef __hds_db_seismic_qsql_hpp
4 #define __hds_db_seismic_qsql_hpp
6 #include <QSqlDatabase>
10 #include <hds_db/base/seismic.hpp>
11 #include <hds_db/qsql/qsql_impl.hpp>
12 #include <hds_db/qsql/tr_hdrs_cache_qsql.hpp>
13 #include <hds_db/qsql/tr_bodies_cache_qsql.hpp>
38 const std::string &project_str,
39 const size_t hdrs_cache_size = 8192,
40 const size_t bodies_cache_size = 4096);
175 size_t m_cur_traces_num;
178 std::vector<DbIndex> m_trace_id_vec;
181 size_t m_hdrs_cache_size;
184 size_t m_bodies_cache_size;
187 bool m_buffer_all_hdrs_flag;
197 DbIndex db_get_trace_id(
const size_t id)
const;
201 const bool is_temporary,
202 std::vector<DbIndex> &ids);
205 void matching_condition_rule(QString &match_str,
206 const QString &rule_str,
212 const bool is_temporary,
218 const bool is_temporary);
224 const bool is_temporary,
232 bool db_tmp_seismic_exists(
const DbIndex &seis_id)
const;
235 ErrCode db_get_hdrs_bodies_tbl_names(
const std::string &
name,
242 static ErrCode db_create_seismic_table(QSqlDatabase &
m_db,
243 const bool is_temporary);
248 const bool is_temporary,
251 const bool is_temporary,
253 QString qs_match_rule(
const TrSelBaseRule *prule,
const QString &op)
const;
259 static ErrCode name2id(QSqlDatabase &db,
260 const std::string &
name,
266 static ErrCode tmp_name2id(QSqlDatabase &db,
267 const std::string &
name,
272 static ErrCode clear(QSqlDatabase &db,
const DbIndex &project_id);
SeismicQSql(const ContextQSql &dbc, const std::string &project_str, const size_t hdrs_cache_size=8192, const size_t bodies_cache_size=4096)
Definition: tr_hdrs_cache_qsql.hpp:20
virtual DbIndex rawDbIndex(size_t id, ErrCode *prc=NULL) const
void setBufferAllHeadersFlag(bool flag=true)
virtual ErrCode rawSetTrHeader(const DbIndex &id, const TrHeader &hdr)
virtual ErrCode getVolumeHeader(VolumeHeader &vol_header) const
OpenMode
Definition: defines.hpp:32
virtual const TrHeader & rawTrHeader(const DbIndex &id, ErrCode *rc=NULL) const
Definition: dbcontext_qsql.hpp:15
Definition: seismic.hpp:19
Definition: tr_selector.hpp:52
uint64_t DbIndex
Definition: defines.hpp:26
virtual ErrCode setName(const std::string &name_str)
virtual ErrCode getList(Names &list) const
const DbIndex & getCurrentSeismicId() const
Definition: seismic_qsql.hpp:152
Definition: project_qsql.hpp:20
virtual ErrCode appendTr(const TrHeader &header, const TrBody &body)
ErrCode
Definition: defines.hpp:46
Definition: tr_selector.hpp:183
std::vector< AmplT > TrBody
Definition: defines.hpp:23
virtual const TrBody & rawTrBody(const DbIndex &id, ErrCode *rc=NULL) const
Definition: seismic_qsql.hpp:24
virtual size_t tracesNum(ErrCode *rc=NULL) const
virtual size_t dataSize(const std::string &name, ErrCode *prc=NULL) const
QSqlDatabase m_db
Definition: qsql_impl.hpp:81
virtual ErrCode open(const std::string &name, OpenMode mode)
virtual time_t creationTime(const std::string &name, ErrCode *prc=NULL) const
TrSelector m_tr_selector
Definition: seismic_qsql.hpp:167
bool getBufferAllHeadersFlag()
Definition: tr_bodies_cache_qsql.hpp:19
virtual time_t modificationTime(const std::string &name, ErrCode *prc=NULL) const
Definition: qsql_impl.hpp:19
virtual ErrCode select(const TrSelector &selector=TrSelector())
virtual std::string name(ErrCode *rc=NULL) const
virtual ErrCode rawSetTrBody(const DbIndex &id, const TrBody &body)
virtual ErrCode setVolumeHeader(const VolumeHeader &vol_header)
virtual ErrCode eraseTr(size_t id)
DbIndex m_cur_seismic_id
Definition: seismic_qsql.hpp:164
virtual const TrSelector & getSelector() const
std::vector< std::string > Names
Definition: object.hpp:23