Qxorm
Author: m | 2025-04-24
GitHub mirror of vanilla QxOrm framework source code - QxOrm/QxOrm.cmake at master eraxillan/QxOrm
QxOrm/readme.md at master QxOrm/QxOrm - GitHub
Network using client/server communication) T template parameter is a persistent class registered into QxOrm context S template parameter is a service class generated by QxEntityEditor (or your own service class providing all methods) Definition at line 58 of file QxModelService.h.Member Typedef Documentationtemplate template template template template Constructor & Destructor DocumentationMember Function Documentationtemplate virtual QVariant qx::QxModelService::getRelationshipValues_Helper ( int row, const QString & relation, bool bLoadFromDatabase, const QString & sAppendRelations ) [inline, protected, virtual] Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm context) and filtered by a user SQL query. Parameters: queryDefine a user SQL query added to default SQL query builded by QxOrm library (optional parameter) pDatabaseConnection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by qx::QxSqlDatabase singleton class (optional parameter) Reimplemented from qx::QxModel.Definition at line 75 of file QxModelService.h.Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm context) and filtered by a user SQL query. Parameters: lCountOutput parameter with the number of lines in the table associated to the SQL query queryDefine a user SQL query added to default SQL query builded by QxOrm library (optional parameter) pDatabaseConnection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by qx::QxSqlDatabase singleton class (optional parameter) Reimplemented from qx::QxModel.Definition at line 82 of file QxModelService.h.template virtual QSqlError qx::QxModelService::qxDeleteAll ( QSqlDatabase * pDatabase = NULL) [inline, virtual] Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context), if no error occurred then you should clear the model. Parameters: pDatabaseConnection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by qx::QxSqlDatabase singleton class (optional parameter) Returns:Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query Reimplemented from qx::QxModel.Definition at line 262 of file QxModelService.h.template virtual QSqlError qx::QxModelService::qxDeleteById ( const QVariant & id, QSqlDatabase * pDatabase = NULL ) [inline, virtual] Delete a line of a table (database) mapped to a C++ object of type T (registered into. GitHub mirror of vanilla QxOrm framework source code - QxOrm/QxOrm.cmake at master eraxillan/QxOrm How to install QxOrm - QxOrm osdn How to use QxOrm - QxOrm osdn QxOrm library - C Qt ORM (Object Relational Mapping) and ODM (Object Document Mapper) library - Official repository - QxOrm/readme.md at master QxOrm/QxOrm QxOrm library - C Qt ORM (Object Relational Mapping) and ODM (Object Document Mapper) library - Official repository - QxOrm/QxOrm.cmake at master QxOrm/QxOrm QxOrm library - C Qt ORM (Object Relational Mapping) and ODM (Object Document Mapper) library - Official repository - QxOrm/QxOrm.cmake at master QxOrm/QxOrm QxOrm library - C Qt ORM (Object Relational Mapping) and ODM (Object Document Mapper) library - Official repository - QxOrm/QxOrm.pro at master QxOrm/QxOrm QxOrm library - C Qt ORM (Object Relational Mapping) and ODM (Object Document Mapper) library - Official repository - QxOrm/readme.md at master QxOrm/QxOrm (insert or update) in the model into database. virtual QSqlError qxSaveRow (int row, const QStringList &relation=QStringList(), QSqlDatabase *pDatabase=NULL) Save an item of the model at line row into database. virtual QSqlError qxDeleteById (const QVariant &id, QSqlDatabase *pDatabase=NULL) Delete a line of a table (database) mapped to a C++ object of type T (registered into QxOrm context), if no error occurred then you should remove row from the model. virtual QSqlError qxDeleteAll (QSqlDatabase *pDatabase=NULL) Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context), if no error occurred then you should clear the model. virtual QSqlError qxDeleteByQuery (const qx::QxSqlQuery &query, QSqlDatabase *pDatabase=NULL) Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context) and filtered by a user SQL query, if no error occurred then you should refresh the model. virtual QSqlError qxDeleteRow (int row, QSqlDatabase *pDatabase=NULL) Delete in database the item at line row in the model, if no error occurred then you should remove row from the model. virtual QSqlError qxDestroyById (const QVariant &id, QSqlDatabase *pDatabase=NULL) Delete a line of a table (even if a logical delete is defined) mapped to a C++ object of type T (registered into QxOrm context), if no error occurred then you should remove row from the model. virtual QSqlError qxDestroyAll (QSqlDatabase *pDatabase=NULL) Delete all lines of a table (even if a logical delete is defined) mapped to a C++ class T (registered into QxOrm context), if no error occurred then you should clear the model. virtual QSqlError qxDestroyByQuery (const qx::QxSqlQuery &query, QSqlDatabase *pDatabase=NULL) Delete all lines of a table (even if a logical delete is defined) mapped to a C++ class T (registered into QxOrm context) and filtered by a user SQL query, if no error occurred then you should refresh the model. virtual QSqlError qxDestroyRow (int row, QSqlDatabase *pDatabase=NULL) Delete in database (even if a logical delete is defined) the item at line row in the model, if no error occurred then you should remove row from the model. virtual QSqlError qxExecuteQuery (qx::QxSqlQuery &query, QSqlDatabase *pDatabase=NULL)virtual qx_bool qxExist (const QVariant &id, QSqlDatabase *pDatabase=NULL)virtual qx::QxInvalidValueX qxValidate (const QStringList &groups=QStringList())virtual qx::QxInvalidValueX qxValidateRow (int row, const QStringList &groups=QStringList())Protected Member Functionsvirtual QVariant getRelationshipValues_Helper (int row, const QString &relation, bool bLoadFromDatabase, const QString &sAppendRelations)Detailed Descriptiontemplateclass qx::QxModelServiceqx::QxModelService : provides an easy way to connect your model to the QxService module (all queries are executed overComments
Network using client/server communication) T template parameter is a persistent class registered into QxOrm context S template parameter is a service class generated by QxEntityEditor (or your own service class providing all methods) Definition at line 58 of file QxModelService.h.Member Typedef Documentationtemplate template template template template Constructor & Destructor DocumentationMember Function Documentationtemplate virtual QVariant qx::QxModelService::getRelationshipValues_Helper ( int row, const QString & relation, bool bLoadFromDatabase, const QString & sAppendRelations ) [inline, protected, virtual] Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm context) and filtered by a user SQL query. Parameters: queryDefine a user SQL query added to default SQL query builded by QxOrm library (optional parameter) pDatabaseConnection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by qx::QxSqlDatabase singleton class (optional parameter) Reimplemented from qx::QxModel.Definition at line 75 of file QxModelService.h.Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm context) and filtered by a user SQL query. Parameters: lCountOutput parameter with the number of lines in the table associated to the SQL query queryDefine a user SQL query added to default SQL query builded by QxOrm library (optional parameter) pDatabaseConnection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by qx::QxSqlDatabase singleton class (optional parameter) Reimplemented from qx::QxModel.Definition at line 82 of file QxModelService.h.template virtual QSqlError qx::QxModelService::qxDeleteAll ( QSqlDatabase * pDatabase = NULL) [inline, virtual] Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context), if no error occurred then you should clear the model. Parameters: pDatabaseConnection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by qx::QxSqlDatabase singleton class (optional parameter) Returns:Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query Reimplemented from qx::QxModel.Definition at line 262 of file QxModelService.h.template virtual QSqlError qx::QxModelService::qxDeleteById ( const QVariant & id, QSqlDatabase * pDatabase = NULL ) [inline, virtual] Delete a line of a table (database) mapped to a C++ object of type T (registered into
2025-04-11(insert or update) in the model into database. virtual QSqlError qxSaveRow (int row, const QStringList &relation=QStringList(), QSqlDatabase *pDatabase=NULL) Save an item of the model at line row into database. virtual QSqlError qxDeleteById (const QVariant &id, QSqlDatabase *pDatabase=NULL) Delete a line of a table (database) mapped to a C++ object of type T (registered into QxOrm context), if no error occurred then you should remove row from the model. virtual QSqlError qxDeleteAll (QSqlDatabase *pDatabase=NULL) Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context), if no error occurred then you should clear the model. virtual QSqlError qxDeleteByQuery (const qx::QxSqlQuery &query, QSqlDatabase *pDatabase=NULL) Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context) and filtered by a user SQL query, if no error occurred then you should refresh the model. virtual QSqlError qxDeleteRow (int row, QSqlDatabase *pDatabase=NULL) Delete in database the item at line row in the model, if no error occurred then you should remove row from the model. virtual QSqlError qxDestroyById (const QVariant &id, QSqlDatabase *pDatabase=NULL) Delete a line of a table (even if a logical delete is defined) mapped to a C++ object of type T (registered into QxOrm context), if no error occurred then you should remove row from the model. virtual QSqlError qxDestroyAll (QSqlDatabase *pDatabase=NULL) Delete all lines of a table (even if a logical delete is defined) mapped to a C++ class T (registered into QxOrm context), if no error occurred then you should clear the model. virtual QSqlError qxDestroyByQuery (const qx::QxSqlQuery &query, QSqlDatabase *pDatabase=NULL) Delete all lines of a table (even if a logical delete is defined) mapped to a C++ class T (registered into QxOrm context) and filtered by a user SQL query, if no error occurred then you should refresh the model. virtual QSqlError qxDestroyRow (int row, QSqlDatabase *pDatabase=NULL) Delete in database (even if a logical delete is defined) the item at line row in the model, if no error occurred then you should remove row from the model. virtual QSqlError qxExecuteQuery (qx::QxSqlQuery &query, QSqlDatabase *pDatabase=NULL)virtual qx_bool qxExist (const QVariant &id, QSqlDatabase *pDatabase=NULL)virtual qx::QxInvalidValueX qxValidate (const QStringList &groups=QStringList())virtual qx::QxInvalidValueX qxValidateRow (int row, const QStringList &groups=QStringList())Protected Member Functionsvirtual QVariant getRelationshipValues_Helper (int row, const QString &relation, bool bLoadFromDatabase, const QString &sAppendRelations)Detailed Descriptiontemplateclass qx::QxModelServiceqx::QxModelService : provides an easy way to connect your model to the QxService module (all queries are executed over
2025-04-17Qx::QxModelService : provides an easy way to connect your model to the QxService module (all queries are executed over network using client/server communication) More...#include QxModelService.h> _map" alt="">_map" name="qx::QxModelService_map"> : all classes registered into QxOrm context can be used with Qt model/view architec..." alt="qx::QxModel" shape="rect" coords="0,0,190,24"> List of all members.Public Typestypedef qx::QxModel::type_ptr type_ptrtypedef qx::QxModel::type_primary_key type_primary_keytypedef qx::QxModel::type_collection type_collectiontypedef std::shared_ptrtype_collection > type_collection_ptrtypedef B type_base_classPublic Member Functions QxModelService (QObject *parent=0) QxModelService (qx::IxModel *other, QObject *parent)virtual ~QxModelService ()virtual long qxCount (const qx::QxSqlQuery &query=qx::QxSqlQuery(), QSqlDatabase *pDatabase=NULL) Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm context) and filtered by a user SQL query. virtual QSqlError qxCount (long &lCount, const qx::QxSqlQuery &query=qx::QxSqlQuery(), QSqlDatabase *pDatabase=NULL) Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm context) and filtered by a user SQL query. virtual QSqlError qxFetchById (const QVariant &id, const QStringList &relation=QStringList(), QSqlDatabase *pDatabase=NULL) Clear the model and fetch an object (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database. virtual QSqlError qxFetchAll (const QStringList &relation=QStringList(), QSqlDatabase *pDatabase=NULL) Clear the model and fetch a list of objects (retrieve all elements and properties associated) of type T (container registered into QxOrm context) mapped to a table in the database. virtual QSqlError qxFetchByQuery (const qx::QxSqlQuery &query, const QStringList &relation=QStringList(), QSqlDatabase *pDatabase=NULL) Clear the model and fetch a list of objects (retrieve all elements and properties associated) of type T (container registered into QxOrm context) mapped to a table in the database and filtered by a user SQL query. virtual QSqlError qxFetchRow (int row, const QStringList &relation=QStringList(), QSqlDatabase *pDatabase=NULL) Get an item in the model at line row and fetch all its properties mapped to a table in the database, then all views attached to this model are automatically updated. virtual QSqlError qxInsert (const QStringList &relation=QStringList(), QSqlDatabase *pDatabase=NULL, bool bUseExecBatch=false) Insert all items in the model into database. virtual QSqlError qxInsertRow (int row, const QStringList &relation=QStringList(), QSqlDatabase *pDatabase=NULL) Insert an item of the model at line row into database. virtual QSqlError qxUpdate (const qx::QxSqlQuery &query=qx::QxSqlQuery(), const QStringList &relation=QStringList(), QSqlDatabase *pDatabase=NULL, bool bUseExecBatch=false) Update all items in the model into database. virtual QSqlError qxUpdateRow (int row, const qx::QxSqlQuery &query=qx::QxSqlQuery(), const QStringList &relation=QStringList(), QSqlDatabase *pDatabase=NULL) Update an item of the model at line row into database. virtual QSqlError qxSave (const QStringList &relation=QStringList(), QSqlDatabase *pDatabase=NULL) Save all items
2025-04-05QxOrm context), if no error occurred then you should remove row from the model. Parameters: idRow id to be deleted from database pDatabaseConnection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by qx::QxSqlDatabase singleton class (optional parameter) Returns:Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query Reimplemented from qx::QxModel.Definition at line 249 of file QxModelService.h.template virtual QSqlError qx::QxModelService::qxDeleteByQuery ( const qx::QxSqlQuery & query, QSqlDatabase * pDatabase = NULL ) [inline, virtual] Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context) and filtered by a user SQL query, if no error occurred then you should refresh the model. Parameters: queryDefine a user SQL query added to default SQL query builded by QxOrm library pDatabaseConnection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by qx::QxSqlDatabase singleton class (optional parameter) Returns:Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query Reimplemented from qx::QxModel.Definition at line 270 of file QxModelService.h.template virtual QSqlError qx::QxModelService::qxDeleteRow ( int row, QSqlDatabase * pDatabase = NULL ) [inline, virtual] Delete in database the item at line row in the model, if no error occurred then you should remove row from the model. Parameters: rowDelete in database the item in the model at line row pDatabaseConnection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by qx::QxSqlDatabase singleton class (optional parameter) Returns:Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query Reimplemented from qx::QxModel.Definition at line 278 of file QxModelService.h.template virtual QSqlError qx::QxModelService::qxDestroyAll ( QSqlDatabase * pDatabase = NULL) [inline, virtual] Delete all lines of a table (even if a logical delete is defined) mapped to a C++ class T (registered into QxOrm context), if no error occurred then you should clear the model. Parameters: pDatabaseConnection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL,
2025-04-09