1 #ifndef POSTGRESINTERFACE_H
2 #define POSTGRESINTERFACE_H
12 #include <QSqlDatabase>
16 #include <QSqlTableModel>
17 #include <QSqlTableModel>
20 #include <QVariantList>
22 #include "platformu_global.h"
23 #include <publication.h>
24 #include <subscription.h>
39 virtual void ReloadTables(
void) ;
58 PostgresInterface(QString DatabaseIP, QString DatabasePort, QString DatabaseName, QString DatabaseUser,
59 QString DatabasePasswd,
QObject *parent = 0);
73 virtual QString OpenDatabase(
void) ;
79 virtual void ScratchSubscriber(QString subscriber);
82 virtual QString
TrendThis(QString subscription);
89 virtual QString getSubFromTable( QString table);
96 virtual QString getTableFromSub( QString sub);
105 virtual QDataLoggerRecord GetDataRecordsFromTrendTable(QString table, QDateTime fromLocalTime, QDateTime toLocalTime);
115 virtual VremMYSqlRecord GetLastDataRecordsFromTrendTable(QString table, QDateTime fromLocalTime, QDateTime toLocalTime);
123 virtual VremMYSqlRecord GetLastDataRecordsFromTrendTable(QString table, QDateTime toLocalTime);
131 virtual VremMYSqlRecord GetLastDataRecordsFromTrendTable(QString table);
142 virtual bool DeleteDataRecordsFromTrendTable(QString table, QDateTime beforeLocalTime);
152 virtual bool AddData( QString dataTable,
const VremVArray &instance1);
162 virtual bool ChangeProperties(QString subscriber, VremVArray propertys);
171 virtual VremVArray GetProperties( QString subscription);
The PostgresInterface class Database engine for Postgres.
Definition: postgresinterface.h:35
virtual DBType getDBType()
getDBType
Definition: postgresinterface.h:180
The SQLBase class.
Definition: sqlbase.h:38
virtual void ScratchSql(void)=0
starts a new database
virtual bool ClearAllData(QString dataTable)=0
virtual QString TrendThis(QString subscription)=0
returns the table name for this trend, creates the trend if not there