|
Rabbit Remote Control 0.1.0-bate8
|
File database. More...
#include <Database.h>


Public Member Functions | |
| CDatabaseFile (const QString &szSuffix=QString(), QObject *parent=nullptr) | |
| bool | IsExist (const QString &szFile) |
| QByteArray | Load (const QString &szFile) |
| Load. | |
| bool | Save (const QString &szFile) |
| Save. | |
| bool | ImportFileToDatabaseFromJson (const QJsonObject &obj, QString &szFile) |
| Import file to database from JSON. | |
Public Member Functions inherited from CDatabase | |
| CDatabase (QObject *parent=nullptr) | |
| QSqlDatabase | GetDatabase () const |
| virtual bool | IsOpen () const |
| void | CloseDatabase () |
| Close database. | |
| const CParameterDatabase * | GetParameter () const |
| const QString | GetError () const |
| bool | SetDatabase (const CDatabase *db) |
| Share an existing database. | |
| bool | SetDatabase (const QSqlDatabase db, const CParameterDatabase *pPara) |
| Share an existing database. | |
| bool | OpenDatabase (const CParameterDatabase *pPara=nullptr, const QString &szConnectName=QString()) |
| Open a new database. | |
| bool | OpenMySqlDatabase (const CParameterDatabase *pPara, const QString &szConnectName=QString()) |
| bool | OpenODBCDatabase (const CParameterDatabase *pPara, const QString &szConnectName=QString()) |
| bool | OpenSQLiteDatabase (const CParameterDatabase *pPara, const QString &szConnectionName=QString()) |
| bool | OpenSQLiteDatabase (const QString &szFile, const QString &szConnectionName=QString()) |
| virtual bool | ExportToJsonFile (const QString &szFile) |
| virtual bool | ImportFromJsonFile (const QString &szFile) |
Static Public Member Functions | |
| static bool | ExportFileToJson (const QString &szFile, QJsonObject &obj) |
| ExportFileToJson. | |
| static bool | ImportFileFromJson (const QJsonObject &obj, QString &szFile) |
| Import file from JSON. | |
| static QString | GetFile (const QString &szFile) |
| Get the file with file system from the file in database. | |
| static QString | SetFile (const QString &szFile) |
| Set the file with file system to the file in database. | |
Protected Member Functions | |
| virtual bool | OnInitializeSqliteDatabase () override |
| virtual bool | OnInitializeMySqlDatabase () override |
Protected Member Functions inherited from CDatabase | |
| void | SetError (const QString &szErr=QString()) |
| virtual bool | ExportToJson (QJsonObject &obj) |
| virtual bool | ImportFromJson (const QJsonObject &obj) |
| virtual bool | OnInitializeDatabase () |
| Initialize database. | |
Private Attributes | |
| QString | m_szTableName |
Additional Inherited Members | |
Signals inherited from CDatabase | |
| void | sigChanged () |
Protected Attributes inherited from CDatabase | |
| QString | m_szConnectName |
| QString | m_MinVersion |
| const CParameterDatabase * | m_pPara |
File database.
Definition at line 163 of file Database.h.
|
explicit |
Definition at line 723 of file Database.cpp.
|
static |
ExportFileToJson.
| szFile | file path(with file system) |
| obj |
Definition at line 657 of file Database.cpp.
|
static |
Get the file with file system from the file in database.
| szFile | the file in database |
Definition at line 881 of file Database.cpp.
|
static |
Import file from JSON.
| obj | |
| szFile | file path(with file system) |
Definition at line 686 of file Database.cpp.
| bool CDatabaseFile::ImportFileToDatabaseFromJson | ( | const QJsonObject & | obj, |
| QString & | szFile | ||
| ) |
Import file to database from JSON.
| obj | |
| szFile | file path(with file system) |
Definition at line 715 of file Database.cpp.
| bool CDatabaseFile::IsExist | ( | const QString & | szFile | ) |
Definition at line 859 of file Database.cpp.
| QByteArray CDatabaseFile::Load | ( | const QString & | szFile | ) |
|
overrideprotectedvirtual |
Reimplemented from CDatabase.
Definition at line 839 of file Database.cpp.
|
overrideprotectedvirtual |
Reimplemented from CDatabase.
Definition at line 816 of file Database.cpp.
| bool CDatabaseFile::Save | ( | const QString & | szFile | ) |
|
static |
Set the file with file system to the file in database.
| szFile | the file with system system |
Definition at line 892 of file Database.cpp.
|
private |
Definition at line 224 of file Database.h.