添加OpenCv
This commit is contained in:
46
DataCenter/MySQL.h
Normal file
46
DataCenter/MySQL.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#ifndef MYSQL_H
|
||||
#define MYSQL_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include <QMap>
|
||||
#include <QStringList>
|
||||
#include <QVariantList>
|
||||
|
||||
class MySQL : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MySQL(QObject *parent = nullptr);
|
||||
|
||||
bool open(const QString &host,
|
||||
int port,
|
||||
const QString &user,
|
||||
const QString &pwd,
|
||||
const QString &dbName);
|
||||
|
||||
void close();
|
||||
|
||||
bool createTable(const QString &tableName,
|
||||
const QMap<QString, QString> &otherFields);
|
||||
bool insertPartialV(const QString &tableName,
|
||||
const QStringList &fieldNames,
|
||||
const QVariantList &values);
|
||||
|
||||
bool insertPartial(const QString &tableName,
|
||||
const QStringList &fieldNames,
|
||||
const QStringList &values);
|
||||
|
||||
bool insertFull(const QString &tableName,
|
||||
const QVariantList &values);
|
||||
QList<QVariantList> selectLatest(const QString &tableName,
|
||||
int maxRows);
|
||||
/* 读取最新 maxRows 条,只拿指定字段 */
|
||||
QList<QVariantList> selectLatest(const QString &tableName,
|
||||
const QStringList &fieldNames,
|
||||
int maxRows);
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif // MYSQL_H
|
||||
Reference in New Issue
Block a user