#include <DataAnalysis/DataStructures/sqldatatable.h>
|
| SqlDataTable () |
|
| ~SqlDataTable () override |
|
template<typename T > |
void | addRowToSqlDb (SqlDataModel &sqlModel, int row) |
|
template<typename T > |
void | bindField (const QString &fieldName, const QString &name, const QString &longName, const QStringList &units=QStringList()) |
|
template<typename T > |
void | populateTable (SqlDataModel &sqlModel, SqlDataModel::RelationOptions relOpts=SqlDataModel::NoRelations, const QStringList &relationNames=QStringList(), QString sqlQuery=QString()) |
|
template<typename T > |
void | saveToSqlDb (SqlDataModel &sqlModel, int row) |
|
| DataTable () |
|
| DataTable (const DataTable &other) |
|
| ~DataTable () override |
|
template<typename T > |
void | addColumn (const QString &name, const QString &longName, const QStringList &units=QStringList()) |
|
template<typename T > |
void | addColumn (const QString &name, const QStringList &units=QStringList()) |
|
int | appendRecord () |
|
bool | canSerialize () const override |
|
void | clear () |
|
void | clearData () |
|
DataTableColumn | column (const QString &name) const |
|
template<typename T > |
T & | data (int index, const QString &name) |
|
template<typename T > |
const T & | data (int index, const QString &name) const |
|
template<typename T > |
T & | defaultData (const QString &name) |
|
template<typename T > |
const T & | defaultData (const QString &name) const |
|
QStringList | getColumnsName () const |
|
DataObject & | getDataObject (int index, const QString &name) |
|
const DataObject & | getDataObject (int index, const QString &name) const |
|
void | insertRecord (int index) |
|
bool | load (const SerializedItem &item) override |
|
int | numRecords () const |
|
DataTable & | operator= (const DataTable &other) |
|
void | removeColumn (const QString &name) |
|
void | removeRecord (int index) |
|
bool | save (SerializedItem &item) const override |
|
void | swapRecords (int index1, int index2) |
|
virtual | ~Serialize ()=default |
|
virtual bool | canSerialize () const =0 |
|
virtual bool | load (const SerializedItem &item)=0 |
|
virtual bool | save (SerializedItem &item) const =0 |
|
◆ SqlDataTable()
◆ ~SqlDataTable()
◆ addRowToSqlDb()
- Parameters
-
sqlModel | The Sql Data Model representing the Sql database connection. |
row | The row in the Data Table at which the primary key value column is updated with the newly created primary key value from the Sql database. |
Insert a new record in the Sql database and update the primary key column in the Data Table if neccessary.
◆ bindField()
void bindField |
( |
const QString & |
fieldName, |
|
|
const QString & |
name, |
|
|
const QString & |
longName, |
|
|
const QStringList & |
units = QStringList() |
|
) |
| |
|
inline |
- Parameters
-
fieldName | The name of the field in the Sql database. |
name | The short name for that field in the table. |
longName | The long name for that field in the table. |
units | The list of all supported units for this column, by default it is an empty list. |
Create a column with name, longName and units in the table. This column is bound to the field fieldName of the Sql database.
◆ populateTable()
- Parameters
-
sqlModel | The Sql Data Model representing the Sql database connection. |
relOpts | The relation options with other tables, if any. |
relationNames | The relation names with other tables, if any. |
sqlQuery | The Sql Query to filter fetched data, if any. |
Populate the Data Table with data from the Sql Data Model database.
◆ saveToSqlDb()
- Parameters
-
sqlModel | The Sql Data Model representing the Sql database connection. |
row | The row at which data from the Data Table is saved to the Sql database. |
Save row row of the Data Table to the Sql database.