You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
493 B
C++

#pragma once
#include <QtCore>
#include "db_config.h"
#include "db_con_pri.h"
class LP_QT_UTILS_EXPORT lp_db_con {
public:
lp_db_con();
lp_db_con(const LP_DB_CONFIG_NODE &config);
lp_db_con(const lp_db_con &other);
~lp_db_con();
lp_db_con& operator=(const lp_db_con &other);
bool operator==(const lp_db_con &other);
QSqlDatabase database();
void use();
bool is_inusing() const;
qint64 creation_time() const;
void refresh();
private:
lp_db_con_pri *db_con_pri_{ nullptr };
};