QxOrm 1.1.8
C++ Object Relational Mapping library
QxDao : QxOrm library database communication used by persistence engine (ORM - Object Relational Mapping)

Classes

class  qx::IxSqlQueryBuilder
 qx::IxSqlQueryBuilder : common interface to build SQL queries to communicate with database More...
class  qx::IxSqlRelation
 qx::IxSqlRelation : common interface for all relationships defined between 2 classes (or between 2 tables in database) More...
class  qx::dao::ptr< T >
 qx::dao::ptr<T> : provide a classic smart-pointer (like boost::shared_ptr<T> or QSharedPointer<T>) with some features associated with QxDao module of QxOrm library More...
struct  qx::dao::strategy
 Class inheritance strategy and database (Concrete Table Inheritance is the default strategy used by QxOrm library) More...
class  qx::QxDateNeutral
 qx::QxDateNeutral : helper class to store a date value into database under neutral format (YYYYMMDD) => cross database compatibility More...
class  qx::QxDateTimeNeutral
 qx::QxDateTimeNeutral : helper class to store a date-time value into database under neutral format (YYYYMMDDHHMMSS) => cross database compatibility More...
class  qx::QxSession
 qx::QxSession : define a session to manage automatically database transactions (using C++ RAII) More...
class  qx::QxSoftDelete
 qx::QxSoftDelete : soft delete (or logical delete) behavior to update a row into database (flag it as deleted) instead of delete it from database More...
class  qx::QxSqlDatabase
 qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by thread (this class is a singleton and is thread-safe) More...
class  qx::dao::sql_error
 qx::dao::sql_error : define a SQL error exception and retrieve QSqlError type of Qt library More...
class  qx::QxSqlQuery
 qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library, and used by qx::dao::xxx functions to filter elements fetched from database More...
class  qx::QxSqlQueryBuilder< T >
 qx::QxSqlQueryBuilder<T> : concrete SQL query builder for the class T with a cache mechanism to backup and restore queries already builded by the program More...
class  qx::QxSqlRelation< DataType, Owner >
 qx::QxSqlRelation<DataType, Owner> : base class for all relationships defined between 2 classes (or between 2 tables in database) More...
class  qx::QxSqlRelation_ManyToMany< DataType, Owner >
 qx::QxSqlRelation_ManyToMany<DataType, Owner> : manage a relationship many-to-many defined between 2 classes (or between 2 tables in database) More...
class  qx::QxSqlRelation_ManyToOne< DataType, Owner >
 qx::QxSqlRelation_ManyToOne<DataType, Owner> : manage a relationship many-to-one defined between 2 classes (or between 2 tables in database) More...
class  qx::QxSqlRelation_OneToMany< DataType, Owner >
 qx::QxSqlRelation_OneToMany<DataType, Owner> : manage a relationship one-to-many defined between 2 classes (or between 2 tables in database) More...
class  qx::QxSqlRelation_OneToOne< DataType, Owner >
 qx::QxSqlRelation_OneToOne<DataType, Owner> : manage a relationship one-to-one defined between 2 classes (or between 2 tables in database) More...
class  qx::QxSqlRelationParams
 qx::QxSqlRelationParams : define list of parameters to transfer to relationships to manage SQL queries builded by QxOrm library More...
class  qx::QxTimeNeutral
 qx::QxTimeNeutral : helper class to store a time value into database under neutral format (HHMMSS) => cross database compatibility More...

Namespaces

namespace  qx::dao
 

Database communication used by persistence engine (ORM - Object Relational Mapping)


namespace  qx::dao::detail
 

Internal helper tools for qx::dao namespace.


Files

file  IxSqlQueryBuilder.h
 

Common interface to build SQL queries to communicate with database.


file  IxSqlRelation.h
 

Common interface for all relationships defined between 2 classes (or between 2 tables in database)


file  QxDao.h
 

Provide template functions to map C++ class registered into QxOrm context with table database (ORM - Object Relational Mapping)


file  QxDaoPointer.h
 

qx::dao::ptr<T> : provide a classic smart-pointer (like boost::shared_ptr<T> or QSharedPointer<T>) with some features associated with QxDao module of QxOrm library


file  QxDaoStrategy.h
 

Class inheritance strategy and database (Concrete Table Inheritance is the default strategy used by QxOrm library)


file  QxDateNeutral.h
 

Helper class to store a date value into database under neutral format (YYYYMMDD) => cross database compatibility.


file  QxDateTimeNeutral.h
 

Helper class to store a date-time value into database under neutral format (YYYYMMDDHHMMSS) => cross database compatibility.


file  QxSession.h
 

Define a session to manage automatically database transactions (using C++ RAII)


file  QxSoftDelete.h
 

Soft delete (or logical delete) behavior to update a row into database (flag it as deleted) instead of delete it from database.


file  QxSqlDatabase.h
 

Define all parameters to connect to database and retrieve a valid connection by thread.


file  QxSqlError.h
 

Define a SQL error exception and retrieve QSqlError type of Qt library.


file  QxSqlQuery.h
 

Define a user SQL query added to default SQL query builded by QxOrm library, and used by qx::dao::xxx functions to filter elements fetched from database.


file  QxSqlQueryBuilder.h
 

Concrete SQL query builder by class with a cache mechanism to backup and restore queries already builded by the program.


file  QxSqlRelation.h
 

Base class for all relationships defined between 2 classes (or between 2 tables in database)


file  QxSqlRelation_ManyToMany.h
 

Manage a relationship many-to-many defined between 2 classes (or between 2 tables in database)


file  QxSqlRelation_ManyToOne.h
 

Manage a relationship many-to-one defined between 2 classes (or between 2 tables in database)


file  QxSqlRelation_OneToMany.h
 

Manage a relationship one-to-many defined between 2 classes (or between 2 tables in database)


file  QxSqlRelation_OneToOne.h
 

Manage a relationship one-to-one defined between 2 classes (or between 2 tables in database)


file  QxSqlRelationParams.h
 

Define list of parameters to transfer to relationships to manage SQL queries builded by QxOrm library.


file  QxTimeNeutral.h
 

Helper class to store a time value into database under neutral format (HHMMSS) => cross database compatibility.


Functions

template<class T >
long qx::dao::count (QSqlDatabase *pDatabase)
 Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm context)
template<class T >
long qx::dao::count (const qx::QxSqlQuery &query, QSqlDatabase *pDatabase)
 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.
template<class T >
QSqlError qx::dao::fetch_by_id (T &t, QSqlDatabase *pDatabase)
 Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)
template<class T >
QSqlError qx::dao::fetch_all (T &t, QSqlDatabase *pDatabase)
 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.
template<class T >
QSqlError qx::dao::fetch_by_query (const qx::QxSqlQuery &query, T &t, QSqlDatabase *pDatabase)
 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.
template<class T >
QSqlError qx::dao::insert (T &t, QSqlDatabase *pDatabase)
 Insert an element or a list of elements into database.
template<class T >
QSqlError qx::dao::update (T &t, QSqlDatabase *pDatabase)
 Update an element or a list of elements into database.
template<class T >
QSqlError qx::dao::update_by_query (const qx::QxSqlQuery &query, T &t, QSqlDatabase *pDatabase)
 Update an element or a list of elements into database (adding a user SQL query to the default SQL query builded by QxOrm library)
template<class T >
QSqlError qx::dao::save (T &t, QSqlDatabase *pDatabase)
 Insert (if no exist) or update (if already exist) an element or a list of elements into database.
template<class T >
QSqlError qx::dao::delete_by_id (T &t, QSqlDatabase *pDatabase)
 Delete a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered into QxOrm context)
template<class T >
QSqlError qx::dao::destroy_by_id (T &t, QSqlDatabase *pDatabase)
 Destroy a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered into QxOrm context), even if a soft delete behavior is defined for class T.
template<class T >
QSqlError qx::dao::delete_all (QSqlDatabase *pDatabase)
 Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context)
template<class T >
QSqlError qx::dao::destroy_all (QSqlDatabase *pDatabase)
 Destroy all lines of a table (database) mapped to a C++ class T (registered into QxOrm context), even if a soft delete behavior is defined for class T.
template<class T >
QSqlError qx::dao::delete_by_query (const qx::QxSqlQuery &query, QSqlDatabase *pDatabase)
 Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context) and filtered by a user SQL query.
template<class T >
QSqlError qx::dao::destroy_by_query (const qx::QxSqlQuery &query, QSqlDatabase *pDatabase)
 Destroy all lines of a table (database) mapped to a C++ class T (registered into QxOrm context) and filtered by a user SQL query, even if a soft delete behavior is defined for class T.
template<class T >
QSqlError qx::dao::create_table (QSqlDatabase *pDatabase)
 Create a table into database (with all columns) mapped to a C++ class T (registered into QxOrm context)
template<class T >
qx_bool qx::dao::exist (T &t, QSqlDatabase *pDatabase)
 Search if an element (or list of elements) already exists into database.
template<class T >
QSqlError qx::dao::fetch_by_id_with_relation (const QString &relation, T &t, QSqlDatabase *pDatabase)
 Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)
template<class T >
QSqlError qx::dao::fetch_by_id_with_relation (const QStringList &relation, T &t, QSqlDatabase *pDatabase)
 Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)
template<class T >
QSqlError qx::dao::fetch_by_id_with_all_relation (T &t, QSqlDatabase *pDatabase)
 Fetch an object t (retrieve all its properties and relationships) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)
template<class T >
QSqlError qx::dao::fetch_all_with_relation (const QString &relation, T &t, QSqlDatabase *pDatabase)
 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.
template<class T >
QSqlError qx::dao::fetch_all_with_relation (const QStringList &relation, T &t, QSqlDatabase *pDatabase)
 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.
template<class T >
QSqlError qx::dao::fetch_all_with_all_relation (T &t, QSqlDatabase *pDatabase)
 Fetch a list of objects (retrieve all elements and properties + all relationships associated) of type T (container registered into QxOrm context) mapped to a table in the database.
template<class T >
QSqlError qx::dao::fetch_by_query_with_relation (const QString &relation, const qx::QxSqlQuery &query, T &t, QSqlDatabase *pDatabase)
 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.
template<class T >
QSqlError qx::dao::fetch_by_query_with_relation (const QStringList &relation, const qx::QxSqlQuery &query, T &t, QSqlDatabase *pDatabase)
 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.
template<class T >
QSqlError qx::dao::fetch_by_query_with_all_relation (const qx::QxSqlQuery &query, T &t, QSqlDatabase *pDatabase)
 Fetch a list of objects (retrieve all elements and properties + all relationships associated) of type T (container registered into QxOrm context) mapped to a table in the database and filtered by a user SQL query.
template<class T >
QSqlError qx::dao::insert_with_relation (const QString &relation, T &t, QSqlDatabase *pDatabase)
 Insert an element and its relationships (or a list of elements + relationships) into database.
template<class T >
QSqlError qx::dao::insert_with_relation (const QStringList &relation, T &t, QSqlDatabase *pDatabase)
 Insert an element and its relationships (or a list of elements + relationships) into database.
template<class T >
QSqlError qx::dao::insert_with_all_relation (T &t, QSqlDatabase *pDatabase)
 Insert an element and all its relationships (or a list of elements + all relationships) into database.
template<class T >
QSqlError qx::dao::update_with_relation (const QString &relation, T &t, QSqlDatabase *pDatabase)
 Update an element and its relationships (or a list of elements + relationships) into database.
template<class T >
QSqlError qx::dao::update_by_query_with_relation (const QString &relation, const qx::QxSqlQuery &query, T &t, QSqlDatabase *pDatabase)
 Update an element and its relationships (or a list of elements + relationships) into database (adding a user SQL query to the default SQL query builded by QxOrm library)
template<class T >
QSqlError qx::dao::update_with_relation (const QStringList &relation, T &t, QSqlDatabase *pDatabase)
 Update an element and its relationships (or a list of elements + relationships) into database.
template<class T >
QSqlError qx::dao::update_by_query_with_relation (const QStringList &relation, const qx::QxSqlQuery &query, T &t, QSqlDatabase *pDatabase)
 Update an element and its relationships (or a list of elements + relationships) into database (adding a user SQL query to the default SQL query builded by QxOrm library)
template<class T >
QSqlError qx::dao::update_with_all_relation (T &t, QSqlDatabase *pDatabase)
 Update an element and all its relationships (or a list of elements + all relationships) into database.
template<class T >
QSqlError qx::dao::update_by_query_with_all_relation (const qx::QxSqlQuery &query, T &t, QSqlDatabase *pDatabase)
 Update an element and all its relationships (or a list of elements + all relationships) into database (adding a user SQL query to the default SQL query builded by QxOrm library)
template<class T >
QSqlError qx::dao::save_with_relation (const QString &relation, T &t, QSqlDatabase *pDatabase)
 Insert (if no exist) or update (if already exist) an element and its relationships (or a list of elements + relationships) into database.
template<class T >
QSqlError qx::dao::save_with_relation (const QStringList &relation, T &t, QSqlDatabase *pDatabase)
 Insert (if no exist) or update (if already exist) an element and its relationships (or a list of elements + relationships) into database.
template<class T >
QSqlError qx::dao::save_with_all_relation (T &t, QSqlDatabase *pDatabase)
 Insert (if no exist) or update (if already exist) an element and all its relationships (or a list of elements + all relationships) into database.
template<class T >
long qx::dao::count ()
 Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm context)
template<class T >
long qx::dao::count (const qx::QxSqlQuery &query)
 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.
template<class T >
QSqlError qx::dao::fetch_by_id (T &t)
 Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)
template<class T >
QSqlError qx::dao::fetch_all (T &t)
 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.
template<class T >
QSqlError qx::dao::fetch_by_query (const qx::QxSqlQuery &query, T &t)
 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.
template<class T >
QSqlError qx::dao::insert (T &t)
 Insert an element or a list of elements into database.
template<class T >
QSqlError qx::dao::update (T &t)
 Update an element or a list of elements into database.
template<class T >
QSqlError qx::dao::update_by_query (const qx::QxSqlQuery &query, T &t)
 Update an element or a list of elements into database (adding a user SQL query to the default SQL query builded by QxOrm library)
template<class T >
QSqlError qx::dao::save (T &t)
 Insert (if no exist) or update (if already exist) an element or a list of elements into database.
template<class T >
QSqlError qx::dao::delete_by_id (T &t)
 Delete a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered into QxOrm context)
template<class T >
QSqlError qx::dao::destroy_by_id (T &t)
 Destroy a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered into QxOrm context), even if a soft delete behavior is defined for class T.
template<class T >
QSqlError qx::dao::delete_all ()
 Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context)
template<class T >
QSqlError qx::dao::destroy_all ()
 Destroy all lines of a table (database) mapped to a C++ class T (registered into QxOrm context), even if a soft delete behavior is defined for class T.
template<class T >
QSqlError qx::dao::delete_by_query (const qx::QxSqlQuery &query)
 Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context) and filtered by a user SQL query.
template<class T >
QSqlError qx::dao::destroy_by_query (const qx::QxSqlQuery &query)
 Destroy all lines of a table (database) mapped to a C++ class T (registered into QxOrm context) and filtered by a user SQL query, even if a soft delete behavior is defined for class T.
template<class T >
QSqlError qx::dao::create_table ()
 Create a table into database (with all columns) mapped to a C++ class T (registered into QxOrm context)
template<class T >
qx_bool qx::dao::exist (T &t)
 Search if an element (or list of elements) already exists into database.
template<class T >
QSqlError qx::dao::fetch_by_id (T &t, QSqlDatabase *pDatabase, const QStringList &columns)
 Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)
template<class T >
QSqlError qx::dao::fetch_all (T &t, QSqlDatabase *pDatabase, const QStringList &columns)
 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.
template<class T >
QSqlError qx::dao::fetch_by_query (const qx::QxSqlQuery &query, T &t, QSqlDatabase *pDatabase, const QStringList &columns)
 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.
template<class T >
QSqlError qx::dao::update (T &t, QSqlDatabase *pDatabase, const QStringList &columns)
 Update an element or a list of elements into database.
template<class T >
QSqlError qx::dao::update_by_query (const qx::QxSqlQuery &query, T &t, QSqlDatabase *pDatabase, const QStringList &columns)
 Update an element or a list of elements into database (adding a user SQL query to the default SQL query builded by QxOrm library)
template<class T >
QSqlError qx::dao::update_optimized (qx::dao::ptr< T > &ptr)
 Update only modified fields/properties of an element or a list of elements into database (using is dirty pattern and qx::dao::ptr<T> smart-pointer)
template<class T >
QSqlError qx::dao::update_optimized_by_query (const qx::QxSqlQuery &query, qx::dao::ptr< T > &ptr)
 Update only modified fields/properties of an element or a list of elements into database (using is dirty pattern and qx::dao::ptr<T> smart-pointer), adding a user SQL query to the default SQL query builded by QxOrm library.
template<class T >
QSqlError qx::dao::update_optimized (qx::dao::ptr< T > &ptr, QSqlDatabase *pDatabase)
 Update only modified fields/properties of an element or a list of elements into database (using is dirty pattern and qx::dao::ptr<T> smart-pointer)
template<class T >
QSqlError qx::dao::update_optimized_by_query (const qx::QxSqlQuery &query, qx::dao::ptr< T > &ptr, QSqlDatabase *pDatabase)
 Update only modified fields/properties of an element or a list of elements into database (using is dirty pattern and qx::dao::ptr<T> smart-pointer), adding a user SQL query to the default SQL query builded by QxOrm library.
template<class T >
QSqlError qx::dao::fetch_by_id_with_relation (const QString &relation, T &t)
 Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)
template<class T >
QSqlError qx::dao::fetch_by_id_with_relation (const QStringList &relation, T &t)
 Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)
template<class T >
QSqlError qx::dao::fetch_by_id_with_all_relation (T &t)
 Fetch an object t (retrieve all its properties and relationships) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)
template<class T >
QSqlError qx::dao::fetch_all_with_relation (const QString &relation, T &t)
 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.
template<class T >
QSqlError qx::dao::fetch_all_with_relation (const QStringList &relation, T &t)
 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.
template<class T >
QSqlError qx::dao::fetch_all_with_all_relation (T &t)
 Fetch a list of objects (retrieve all elements and properties + all relationships associated) of type T (container registered into QxOrm context) mapped to a table in the database.
template<class T >
QSqlError qx::dao::fetch_by_query_with_relation (const QString &relation, const qx::QxSqlQuery &query, T &t)
 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.
template<class T >
QSqlError qx::dao::fetch_by_query_with_relation (const QStringList &relation, const qx::QxSqlQuery &query, T &t)
 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.
template<class T >
QSqlError qx::dao::fetch_by_query_with_all_relation (const qx::QxSqlQuery &query, T &t)
 Fetch a list of objects (retrieve all elements and properties + all relationships associated) of type T (container registered into QxOrm context) mapped to a table in the database and filtered by a user SQL query.
template<class T >
QSqlError qx::dao::insert_with_relation (const QString &relation, T &t)
 Insert an element and its relationships (or a list of elements + relationships) into database.
template<class T >
QSqlError qx::dao::insert_with_relation (const QStringList &relation, T &t)
 Insert an element and its relationships (or a list of elements + relationships) into database.
template<class T >
QSqlError qx::dao::insert_with_all_relation (T &t)
 Insert an element and all its relationships (or a list of elements + all relationships) into database.
template<class T >
QSqlError qx::dao::update_with_relation (const QString &relation, T &t)
 Update an element and its relationships (or a list of elements + relationships) into database.
template<class T >
QSqlError qx::dao::update_by_query_with_relation (const QString &relation, const qx::QxSqlQuery &query, T &t)
 Update an element and its relationships (or a list of elements + relationships) into database (adding a user SQL query to the default SQL query builded by QxOrm library)
template<class T >
QSqlError qx::dao::update_with_relation (const QStringList &relation, T &t)
 Update an element and its relationships (or a list of elements + relationships) into database.
template<class T >
QSqlError qx::dao::update_by_query_with_relation (const QStringList &relation, const qx::QxSqlQuery &query, T &t)
 Update an element and its relationships (or a list of elements + relationships) into database (adding a user SQL query to the default SQL query builded by QxOrm library)
template<class T >
QSqlError qx::dao::update_with_all_relation (T &t)
 Update an element and all its relationships (or a list of elements + all relationships) into database.
template<class T >
QSqlError qx::dao::update_by_query_with_all_relation (const qx::QxSqlQuery &query, T &t)
 Update an element and all its relationships (or a list of elements + all relationships) into database (adding a user SQL query to the default SQL query builded by QxOrm library)
template<class T >
QSqlError qx::dao::save_with_relation (const QString &relation, T &t)
 Insert (if no exist) or update (if already exist) an element and its relationships (or a list of elements + relationships) into database.
template<class T >
QSqlError qx::dao::save_with_relation (const QStringList &relation, T &t)
 Insert (if no exist) or update (if already exist) an element and its relationships (or a list of elements + relationships) into database.
template<class T >
QSqlError qx::dao::save_with_all_relation (T &t)
 Insert (if no exist) or update (if already exist) an element and all its relationships (or a list of elements + all relationships) into database.
template<class T >
void qx::dao::on_before_insert (T *t, qx::dao::detail::IxDao_Helper *dao)
 Callback before inserting an object into database (here is an example using QxOrm Trigger)
template<class T >
void qx::dao::on_before_update (T *t, qx::dao::detail::IxDao_Helper *dao)
 Callback before updating an object into database (here is an example using QxOrm Trigger)
template<class T >
void qx::dao::on_before_delete (T *t, qx::dao::detail::IxDao_Helper *dao)
 Callback before deleting an object into database (here is an example using QxOrm Trigger)
template<class T >
void qx::dao::on_after_insert (T *t, qx::dao::detail::IxDao_Helper *dao)
 Callback after inserting an object into database (here is an example using QxOrm Trigger)
template<class T >
void qx::dao::on_after_update (T *t, qx::dao::detail::IxDao_Helper *dao)
 Callback after updating an object into database (here is an example using QxOrm Trigger)
template<class T >
void qx::dao::on_after_delete (T *t, qx::dao::detail::IxDao_Helper *dao)
 Callback after deleting an object into database (here is an example using QxOrm trigger)

Function Documentation

template<class T >
long qx::dao::count ( QSqlDatabase *  pDatabase) [inline]

Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm context)

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

qx::dao::count<T>() execute following SQL query :
SELECT COUNT(*) FROM my_table

Definition at line 86 of file QxDao.h.

template<class T >
long qx::dao::count ( const qx::QxSqlQuery query,
QSqlDatabase *  pDatabase 
) [inline]

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
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

qx::dao::count<T>() execute following SQL query :
SELECT COUNT(*) FROM my_table + WHERE my_query...

Definition at line 99 of file QxDao.h.

template<class T >
long qx::dao::count ( ) [inline]

Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm context)

qx::dao::count<T>() execute following SQL query :
SELECT COUNT(*) FROM my_table

Definition at line 650 of file QxDao.h.

template<class T >
long qx::dao::count ( const qx::QxSqlQuery query) [inline]

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

qx::dao::count<T>() execute following SQL query :
SELECT COUNT(*) FROM my_table + WHERE my_query...

Definition at line 662 of file QxDao.h.

template<class T >
QSqlError qx::dao::create_table ( QSqlDatabase *  pDatabase) [inline]

Create a table into database (with all columns) mapped to a C++ class T (registered into QxOrm context)

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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::create_table<T>() execute following SQL query :
CREATE TABLE my_table (my_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, my_column_1 TEXT, my_column_2 TEXT, etc.)

Definition at line 305 of file QxDao.h.

template<class T >
QSqlError qx::dao::create_table ( ) [inline]

Create a table into database (with all columns) mapped to a C++ class T (registered into QxOrm context)

Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::create_table<T>() execute following SQL query :
CREATE TABLE my_table (my_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, my_column_1 TEXT, my_column_2 TEXT, etc.)

Definition at line 854 of file QxDao.h.

template<class T >
QSqlError qx::dao::delete_all ( QSqlDatabase *  pDatabase) [inline]

Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context)

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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::delete_all<T>() execute following SQL query :
DELETE FROM my_table

If a soft delete behavior is defined for class T, qx::dao::delete_all<T>() execute following SQL query :
UPDATE my_table SET is_deleted='1'

Definition at line 248 of file QxDao.h.

template<class T >
QSqlError qx::dao::delete_all ( ) [inline]

Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context)

Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::delete_all<T>() execute following SQL query :
DELETE FROM my_table

If a soft delete behavior is defined for class T, qx::dao::delete_all<T>() execute following SQL query :
UPDATE my_table SET is_deleted='1'

Definition at line 801 of file QxDao.h.

template<class T >
QSqlError qx::dao::delete_by_id ( T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Delete a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered into QxOrm context)

Parameters:
tElement (or list of elements) to be deleted into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::delete_by_id<T>() execute following SQL query :
DELETE FROM my_table WHERE my_id = ?

If a soft delete behavior is defined for class T, qx::dao::delete_by_id<T>() execute following SQL query :
UPDATE my_table SET is_deleted='1' WHERE my_id = ?

Definition at line 218 of file QxDao.h.

template<class T >
QSqlError qx::dao::delete_by_id ( T &  t) [inline]

Delete a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered into QxOrm context)

Parameters:
tElement (or list of elements) to be deleted into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::delete_by_id<T>() execute following SQL query :
DELETE FROM my_table WHERE my_id = ?

If a soft delete behavior is defined for class T, qx::dao::delete_by_id<T>() execute following SQL query :
UPDATE my_table SET is_deleted='1' WHERE my_id = ?

Definition at line 773 of file QxDao.h.

template<class T >
QSqlError qx::dao::delete_by_query ( const qx::QxSqlQuery query) [inline]

Delete all lines of a table (database) mapped to a 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::delete_by_query<T>() execute following SQL query :
DELETE FROM my_table + WHERE my_query...

If a soft delete behavior is defined for class T, qx::dao::delete_by_query<T>() execute following SQL query :
UPDATE my_table SET is_deleted='1' + WHERE my_query...

Definition at line 829 of file QxDao.h.

template<class T >
QSqlError qx::dao::delete_by_query ( const qx::QxSqlQuery query,
QSqlDatabase *  pDatabase 
) [inline]

Delete all lines of a table (database) mapped to a 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
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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::delete_by_query<T>() execute following SQL query :
DELETE FROM my_table + WHERE my_query...

If a soft delete behavior is defined for class T, qx::dao::delete_by_query<T>() execute following SQL query :
UPDATE my_table SET is_deleted='1' + WHERE my_query...

Definition at line 278 of file QxDao.h.

template<class T >
QSqlError qx::dao::destroy_all ( QSqlDatabase *  pDatabase) [inline]

Destroy all lines of a table (database) mapped to a C++ class T (registered into QxOrm context), even if a soft delete behavior is defined for class T.

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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::destroy_all<T>() execute following SQL query :
DELETE FROM my_table

Definition at line 261 of file QxDao.h.

template<class T >
QSqlError qx::dao::destroy_all ( ) [inline]

Destroy all lines of a table (database) mapped to a C++ class T (registered into QxOrm context), even if a soft delete behavior is defined for class T.

Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::destroy_all<T>() execute following SQL query :
DELETE FROM my_table

Definition at line 813 of file QxDao.h.

template<class T >
QSqlError qx::dao::destroy_by_id ( T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Destroy a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered into QxOrm context), even if a soft delete behavior is defined for class T.

Parameters:
tElement (or list of elements) to be destroyed into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::destroy_by_id<T>() execute following SQL query :
DELETE FROM my_table WHERE my_id = ?

Definition at line 232 of file QxDao.h.

template<class T >
QSqlError qx::dao::destroy_by_id ( T &  t) [inline]

Destroy a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered into QxOrm context), even if a soft delete behavior is defined for class T.

Parameters:
tElement (or list of elements) to be destroyed into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::destroy_by_id<T>() execute following SQL query :
DELETE FROM my_table WHERE my_id = ?

Definition at line 786 of file QxDao.h.

template<class T >
QSqlError qx::dao::destroy_by_query ( const qx::QxSqlQuery query) [inline]

Destroy all lines of a table (database) mapped to a C++ class T (registered into QxOrm context) and filtered by a user SQL query, even if a soft delete behavior is defined for class T.

Parameters:
queryDefine a user SQL query added to default SQL query builded by QxOrm library
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::destroy_by_query<T>() execute following SQL query :
DELETE FROM my_table + WHERE my_query...

Definition at line 842 of file QxDao.h.

template<class T >
QSqlError qx::dao::destroy_by_query ( const qx::QxSqlQuery query,
QSqlDatabase *  pDatabase 
) [inline]

Destroy all lines of a table (database) mapped to a C++ class T (registered into QxOrm context) and filtered by a user SQL query, even if a soft delete behavior is defined for class T.

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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::destroy_by_query<T>() execute following SQL query :
DELETE FROM my_table + WHERE my_query...

Definition at line 292 of file QxDao.h.

template<class T >
qx_bool qx::dao::exist ( T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Search if an element (or list of elements) already exists into database.

Parameters:
tElement (or list of elements) to be searched into 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
Returns:
Return true if element already exists into database; otherwise return false; if an error occurred, qx_bool object contains a description of database error executing SQL query

qx::dao::exist<T>() execute following SQL query :
SELECT * FROM my_table WHERE my_id = ?

Definition at line 319 of file QxDao.h.

template<class T >
qx_bool qx::dao::exist ( T &  t) [inline]

Search if an element (or list of elements) already exists into database.

Parameters:
tElement (or list of elements) to be searched into database
Returns:
Return true if element already exists into database; otherwise return false; if an error occurred, qx_bool object contains a description of database error executing SQL query

qx::dao::exist<T>() execute following SQL query :
SELECT * FROM my_table WHERE my_id = ?

Definition at line 867 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_all ( T &  t,
QSqlDatabase *  pDatabase 
) [inline]

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.

Parameters:
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_all<T>() execute following SQL query :
SELECT * FROM my_table

Definition at line 127 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_all ( T &  t) [inline]

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.

Parameters:
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_all<T>() execute following SQL query :
SELECT * FROM my_table

Definition at line 688 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_all ( T &  t,
QSqlDatabase *  pDatabase,
const QStringList &  columns 
) [inline]

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.

Parameters:
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
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
columnsList of database table columns (mapped to properties of C++ class T) to be fetched
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_all<T>() execute following SQL query :
SELECT * FROM my_table

Definition at line 897 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_all_with_all_relation ( T &  t) [inline]

Fetch a list of objects (retrieve all elements and properties + all relationships associated) of type T (container registered into QxOrm context) mapped to a table in the database.

Parameters:
tContainer to be fetched (retrieve all elements and properties + all relationships associated); t is cleared before executing SQL query
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_all_with_all_relation<T>() execute following SQL query :
SELECT * FROM my_table

Definition at line 1082 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_all_with_all_relation ( T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Fetch a list of objects (retrieve all elements and properties + all relationships associated) of type T (container registered into QxOrm context) mapped to a table in the database.

Parameters:
tContainer to be fetched (retrieve all elements and properties + all relationships associated); t is cleared before executing SQL query
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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_all_with_all_relation<T>() execute following SQL query :
SELECT * FROM my_table

Definition at line 407 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_all_with_relation ( const QString &  relation,
T &  t 
) [inline]

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.

Parameters:
relationList of relationships keys to be fetched (eager fetch instead of default lazy fetch for a relation) : use "|" separator to put many relationships keys into this parameter
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_all_with_relation<T>() execute following SQL query :
SELECT * FROM my_table

Definition at line 1055 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_all_with_relation ( const QStringList &  relation,
T &  t 
) [inline]

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.

Parameters:
relationList of relationships keys to be fetched (eager fetch instead of default lazy fetch for a relation)
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_all_with_relation<T>() execute following SQL query :
SELECT * FROM my_table

Definition at line 1069 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_all_with_relation ( const QString &  relation,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

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.

Parameters:
relationList of relationships keys to be fetched (eager fetch instead of default lazy fetch for a relation) : use "|" separator to put many relationships keys into this parameter
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_all_with_relation<T>() execute following SQL query :
SELECT * FROM my_table

Definition at line 378 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_all_with_relation ( const QStringList &  relation,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

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.

Parameters:
relationList of relationships keys to be fetched (eager fetch instead of default lazy fetch for a relation)
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_all_with_relation<T>() execute following SQL query :
SELECT * FROM my_table

Definition at line 393 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_id ( T &  t) [inline]

Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)

Parameters:
tInstance (with a valid id) to be fetched (retrieve all properties from database)
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_id<T>() execute following SQL query :
SELECT * FROM my_table WHERE my_id = ?

Definition at line 675 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_id ( T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)

Parameters:
tInstance (with a valid id) to be fetched (retrieve all properties 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_id<T>() execute following SQL query :
SELECT * FROM my_table WHERE my_id = ?

Definition at line 113 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_id ( T &  t,
QSqlDatabase *  pDatabase,
const QStringList &  columns 
) [inline]

Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)

Parameters:
tInstance (with a valid id) to be fetched (retrieve all properties 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
columnsList of database table columns (mapped to properties of C++ class T) to be fetched
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_id<T>() execute following SQL query :
SELECT * FROM my_table WHERE my_id = ?

Definition at line 882 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_id_with_all_relation ( T &  t) [inline]

Fetch an object t (retrieve all its properties and relationships) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)

Parameters:
tInstance (with a valid id) to be fetched (retrieve all properties and relationships from database)
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_id_with_all_relation<T>() execute following SQL query :
SELECT * FROM my_table WHERE my_id = ?

Definition at line 1041 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_id_with_all_relation ( T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Fetch an object t (retrieve all its properties and relationships) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)

Parameters:
tInstance (with a valid id) to be fetched (retrieve all properties and relationships 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_id_with_all_relation<T>() execute following SQL query :
SELECT * FROM my_table WHERE my_id = ?

Definition at line 363 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_id_with_relation ( const QString &  relation,
T &  t 
) [inline]

Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)

Parameters:
relationList of relationships keys to be fetched (eager fetch instead of default lazy fetch for a relation) : use "|" separator to put many relationships keys into this parameter
tInstance (with a valid id) to be fetched (retrieve all properties from database)
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_id_with_relation<T>() execute following SQL query :
SELECT * FROM my_table WHERE my_id = ?

Definition at line 1014 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_id_with_relation ( const QStringList &  relation,
T &  t 
) [inline]

Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)

Parameters:
relationList of relationships keys to be fetched (eager fetch instead of default lazy fetch for a relation)
tInstance (with a valid id) to be fetched (retrieve all properties from database)
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_id_with_relation<T>() execute following SQL query :
SELECT * FROM my_table WHERE my_id = ?

Definition at line 1028 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_id_with_relation ( const QString &  relation,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)

Parameters:
relationList of relationships keys to be fetched (eager fetch instead of default lazy fetch for a relation) : use "|" separator to put many relationships keys into this parameter
tInstance (with a valid id) to be fetched (retrieve all properties 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_id_with_relation<T>() execute following SQL query :
SELECT * FROM my_table WHERE my_id = ?

Definition at line 334 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_id_with_relation ( const QStringList &  relation,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a table in the database (t must have a valid id before to be fetched without error)

Parameters:
relationList of relationships keys to be fetched (eager fetch instead of default lazy fetch for a relation)
tInstance (with a valid id) to be fetched (retrieve all properties 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_id_with_relation<T>() execute following SQL query :
SELECT * FROM my_table WHERE my_id = ?

Definition at line 349 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_query ( const qx::QxSqlQuery query,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

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.

Parameters:
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_query<T>() execute following SQL query :
SELECT * FROM my_table + WHERE my_query...

Definition at line 142 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_query ( const qx::QxSqlQuery query,
T &  t 
) [inline]

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.

Parameters:
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_query<T>() execute following SQL query :
SELECT * FROM my_table + WHERE my_query...

Definition at line 702 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_query ( const qx::QxSqlQuery query,
T &  t,
QSqlDatabase *  pDatabase,
const QStringList &  columns 
) [inline]

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.

Parameters:
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
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
columnsList of database table columns (mapped to properties of C++ class T) to be fetched
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_query<T>() execute following SQL query :
SELECT * FROM my_table + WHERE my_query...

Definition at line 913 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_query_with_all_relation ( const qx::QxSqlQuery query,
T &  t 
) [inline]

Fetch a list of objects (retrieve all elements and properties + all relationships associated) of type T (container registered into QxOrm context) mapped to a table in the database and filtered by a user SQL query.

Parameters:
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tContainer to be fetched (retrieve all elements and properties + all relationships associated); t is cleared before executing SQL query
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_query_with_all_relation<T>() execute following SQL query :
SELECT * FROM my_table + WHERE my_query...

Definition at line 1126 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_query_with_all_relation ( const qx::QxSqlQuery query,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Fetch a list of objects (retrieve all elements and properties + all relationships associated) of type T (container registered into QxOrm context) mapped to a table in the database and filtered by a user SQL query.

Parameters:
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tContainer to be fetched (retrieve all elements and properties + all relationships associated); t is cleared before executing SQL query
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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_query_with_all_relation<T>() execute following SQL query :
SELECT * FROM my_table + WHERE my_query...

Definition at line 454 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_query_with_relation ( const QString &  relation,
const qx::QxSqlQuery query,
T &  t 
) [inline]

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.

Parameters:
relationList of relationships keys to be fetched (eager fetch instead of default lazy fetch for a relation) : use "|" separator to put many relationships keys into this parameter
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_query_with_relation<T>() execute following SQL query :
SELECT * FROM my_table + WHERE my_query...

Definition at line 1097 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_query_with_relation ( const QStringList &  relation,
const qx::QxSqlQuery query,
T &  t 
) [inline]

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.

Parameters:
relationList of relationships keys to be fetched (eager fetch instead of default lazy fetch for a relation)
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_query_with_relation<T>() execute following SQL query :
SELECT * FROM my_table + WHERE my_query...

Definition at line 1112 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_query_with_relation ( const QString &  relation,
const qx::QxSqlQuery query,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

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.

Parameters:
relationList of relationships keys to be fetched (eager fetch instead of default lazy fetch for a relation) : use "|" separator to put many relationships keys into this parameter
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_query_with_relation<T>() execute following SQL query :
SELECT * FROM my_table + WHERE my_query...

Definition at line 423 of file QxDao.h.

template<class T >
QSqlError qx::dao::fetch_by_query_with_relation ( const QStringList &  relation,
const qx::QxSqlQuery query,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

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.

Parameters:
relationList of relationships keys to be fetched (eager fetch instead of default lazy fetch for a relation)
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tContainer to be fetched (retrieve all elements and properties associated); t is cleared before executing SQL query
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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::fetch_by_query_with_relation<T>() execute following SQL query :
SELECT * FROM my_table + WHERE my_query...

Definition at line 439 of file QxDao.h.

template<class T >
QSqlError qx::dao::insert ( T &  t) [inline]

Insert an element or a list of elements into database.

Parameters:
tElement (or list of elements) to be inserted into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::insert<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)

Definition at line 715 of file QxDao.h.

template<class T >
QSqlError qx::dao::insert ( T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Insert an element or a list of elements into database.

Parameters:
tElement (or list of elements) to be inserted into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::insert<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)

Definition at line 156 of file QxDao.h.

template<class T >
QSqlError qx::dao::insert_with_all_relation ( T &  t) [inline]

Insert an element and all its relationships (or a list of elements + all relationships) into database.

Parameters:
tElement (or list of elements) to be inserted into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::insert_with_all_relation<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)

Definition at line 1167 of file QxDao.h.

template<class T >
QSqlError qx::dao::insert_with_all_relation ( T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Insert an element and all its relationships (or a list of elements + all relationships) into database.

Parameters:
tElement (or list of elements) to be inserted into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::insert_with_all_relation<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)

Definition at line 498 of file QxDao.h.

template<class T >
QSqlError qx::dao::insert_with_relation ( const QString &  relation,
T &  t 
) [inline]

Insert an element and its relationships (or a list of elements + relationships) into database.

Parameters:
relationList of relationships keys to be inserted in others tables of database : use "|" separator to put many relationships keys into this parameter
tElement (or list of elements) to be inserted into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::insert_with_relation<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)

Definition at line 1140 of file QxDao.h.

template<class T >
QSqlError qx::dao::insert_with_relation ( const QStringList &  relation,
T &  t 
) [inline]

Insert an element and its relationships (or a list of elements + relationships) into database.

Parameters:
relationList of relationships keys to be inserted in others tables of database
tElement (or list of elements) to be inserted into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::insert_with_relation<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)

Definition at line 1154 of file QxDao.h.

template<class T >
QSqlError qx::dao::insert_with_relation ( const QString &  relation,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Insert an element and its relationships (or a list of elements + relationships) into database.

Parameters:
relationList of relationships keys to be inserted in others tables of database : use "|" separator to put many relationships keys into this parameter
tElement (or list of elements) to be inserted into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::insert_with_relation<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)

Definition at line 469 of file QxDao.h.

template<class T >
QSqlError qx::dao::insert_with_relation ( const QStringList &  relation,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Insert an element and its relationships (or a list of elements + relationships) into database.

Parameters:
relationList of relationships keys to be inserted in others tables of database
tElement (or list of elements) to be inserted into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::insert_with_relation<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)

Definition at line 484 of file QxDao.h.

template<class T >
void qx::dao::on_after_delete ( T *  t,
qx::dao::detail::IxDao_Helper *  dao 
) [inline]

Callback after deleting an object into database (here is an example using QxOrm trigger)

Definition at line 1347 of file QxDao.h.

template<class T >
void qx::dao::on_after_insert ( T *  t,
qx::dao::detail::IxDao_Helper *  dao 
) [inline]

Callback after inserting an object into database (here is an example using QxOrm Trigger)

Definition at line 1331 of file QxDao.h.

template<class T >
void qx::dao::on_after_update ( T *  t,
qx::dao::detail::IxDao_Helper *  dao 
) [inline]

Callback after updating an object into database (here is an example using QxOrm Trigger)

Definition at line 1339 of file QxDao.h.

template<class T >
void qx::dao::on_before_delete ( T *  t,
qx::dao::detail::IxDao_Helper *  dao 
) [inline]

Callback before deleting an object into database (here is an example using QxOrm Trigger)

Definition at line 1323 of file QxDao.h.

template<class T >
void qx::dao::on_before_insert ( T *  t,
qx::dao::detail::IxDao_Helper *  dao 
) [inline]

Callback before inserting an object into database (here is an example using QxOrm Trigger)

Definition at line 1307 of file QxDao.h.

template<class T >
void qx::dao::on_before_update ( T *  t,
qx::dao::detail::IxDao_Helper *  dao 
) [inline]

Callback before updating an object into database (here is an example using QxOrm Trigger)

Definition at line 1315 of file QxDao.h.

template<class T >
QSqlError qx::dao::save ( T &  t) [inline]

Insert (if no exist) or update (if already exist) an element or a list of elements into database.

Parameters:
tElement (or list of elements) to be inserted (if no exist) or updated (if already exist) into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::save<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)
or (if already exist into database) :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 757 of file QxDao.h.

template<class T >
QSqlError qx::dao::save ( T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Insert (if no exist) or update (if already exist) an element or a list of elements into database.

Parameters:
tElement (or list of elements) to be inserted (if no exist) or updated (if already exist) into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::save<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)
or (if already exist into database) :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 201 of file QxDao.h.

template<class T >
QSqlError qx::dao::save_with_all_relation ( T &  t) [inline]

Insert (if no exist) or update (if already exist) an element and all its relationships (or a list of elements + all relationships) into database.

Parameters:
tElement (or list of elements) to be inserted (if no exist) or updated (if already exist) into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::save_with_all_relation<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)
or (if already exist into database) :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 1299 of file QxDao.h.

template<class T >
QSqlError qx::dao::save_with_all_relation ( T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Insert (if no exist) or update (if already exist) an element and all its relationships (or a list of elements + all relationships) into database.

Parameters:
tElement (or list of elements) to be inserted (if no exist) or updated (if already exist) into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::save_with_all_relation<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)
or (if already exist into database) :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 639 of file QxDao.h.

template<class T >
QSqlError qx::dao::save_with_relation ( const QStringList &  relation,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Insert (if no exist) or update (if already exist) an element and its relationships (or a list of elements + relationships) into database.

Parameters:
relationList of relationships keys to be inserted or updated in others tables of database
tElement (or list of elements) to be inserted (if no exist) or updated (if already exist) into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::save_with_relation<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)
or (if already exist into database) :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 623 of file QxDao.h.

template<class T >
QSqlError qx::dao::save_with_relation ( const QStringList &  relation,
T &  t 
) [inline]

Insert (if no exist) or update (if already exist) an element and its relationships (or a list of elements + relationships) into database.

Parameters:
relationList of relationships keys to be inserted or updated in others tables of database
tElement (or list of elements) to be inserted (if no exist) or updated (if already exist) into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::save_with_relation<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)
or (if already exist into database) :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 1284 of file QxDao.h.

template<class T >
QSqlError qx::dao::save_with_relation ( const QString &  relation,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Insert (if no exist) or update (if already exist) an element and its relationships (or a list of elements + relationships) into database.

Parameters:
relationList of relationships keys to be inserted or updated in others tables of database : use "|" separator to put many relationships keys into this parameter
tElement (or list of elements) to be inserted (if no exist) or updated (if already exist) into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::save_with_relation<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)
or (if already exist into database) :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 606 of file QxDao.h.

template<class T >
QSqlError qx::dao::save_with_relation ( const QString &  relation,
T &  t 
) [inline]

Insert (if no exist) or update (if already exist) an element and its relationships (or a list of elements + relationships) into database.

Parameters:
relationList of relationships keys to be inserted or updated in others tables of database : use "|" separator to put many relationships keys into this parameter
tElement (or list of elements) to be inserted (if no exist) or updated (if already exist) into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::save_with_relation<T>() execute following SQL query :
INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)
or (if already exist into database) :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 1268 of file QxDao.h.

template<class T >
QSqlError qx::dao::update ( T &  t,
QSqlDatabase *  pDatabase,
const QStringList &  columns 
) [inline]

Update an element or a list of elements into database.

Parameters:
tElement (or list of elements) to be updated into 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
columnsList of database table columns (mapped to properties of C++ class T) to be updated
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 928 of file QxDao.h.

template<class T >
QSqlError qx::dao::update ( T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Update an element or a list of elements into database.

Parameters:
tElement (or list of elements) to be updated into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 170 of file QxDao.h.

template<class T >
QSqlError qx::dao::update ( T &  t) [inline]

Update an element or a list of elements into database.

Parameters:
tElement (or list of elements) to be updated into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 728 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_by_query ( const qx::QxSqlQuery query,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Update an element or a list of elements into database (adding a user SQL query to the default SQL query builded by QxOrm library)

Parameters:
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tElement (or list of elements) to be updated into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_by_query<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc. + WHERE my_query...

Definition at line 185 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_by_query ( const qx::QxSqlQuery query,
T &  t 
) [inline]

Update an element or a list of elements into database (adding a user SQL query to the default SQL query builded by QxOrm library)

Parameters:
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tElement (or list of elements) to be updated into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_by_query<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc. + WHERE my_query...

Definition at line 742 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_by_query ( const qx::QxSqlQuery query,
T &  t,
QSqlDatabase *  pDatabase,
const QStringList &  columns 
) [inline]

Update an element or a list of elements into database (adding a user SQL query to the default SQL query builded by QxOrm library)

Parameters:
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tElement (or list of elements) to be updated into 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
columnsList of database table columns (mapped to properties of C++ class T) to be updated
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_by_query<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc. + WHERE my_query...

Definition at line 944 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_by_query_with_all_relation ( const qx::QxSqlQuery query,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Update an element and all its relationships (or a list of elements + all relationships) into database (adding a user SQL query to the default SQL query builded by QxOrm library)

Parameters:
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tElement (or list of elements) to be updated into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_by_query_with_all_relation<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc. + WHERE my_query...

Definition at line 589 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_by_query_with_all_relation ( const qx::QxSqlQuery query,
T &  t 
) [inline]

Update an element and all its relationships (or a list of elements + all relationships) into database (adding a user SQL query to the default SQL query builded by QxOrm library)

Parameters:
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tElement (or list of elements) to be updated into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_by_query_with_all_relation<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc. + WHERE my_query...

Definition at line 1252 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_by_query_with_relation ( const QStringList &  relation,
const qx::QxSqlQuery query,
T &  t 
) [inline]

Update an element and its relationships (or a list of elements + relationships) into database (adding a user SQL query to the default SQL query builded by QxOrm library)

Parameters:
relationList of relationships keys to be updated in others tables of database
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tElement (or list of elements) to be updated into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_by_query_with_relation<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc. + WHERE my_query...

Definition at line 1225 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_by_query_with_relation ( const QString &  relation,
const qx::QxSqlQuery query,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Update an element and its relationships (or a list of elements + relationships) into database (adding a user SQL query to the default SQL query builded by QxOrm library)

Parameters:
relationList of relationships keys to be updated in others tables of database : use "|" separator to put many relationships keys into this parameter
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tElement (or list of elements) to be updated into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_by_query_with_relation<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc. + WHERE my_query...

Definition at line 529 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_by_query_with_relation ( const QString &  relation,
const qx::QxSqlQuery query,
T &  t 
) [inline]

Update an element and its relationships (or a list of elements + relationships) into database (adding a user SQL query to the default SQL query builded by QxOrm library)

Parameters:
relationList of relationships keys to be updated in others tables of database : use "|" separator to put many relationships keys into this parameter
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tElement (or list of elements) to be updated into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_by_query_with_relation<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc. + WHERE my_query...

Definition at line 1196 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_by_query_with_relation ( const QStringList &  relation,
const qx::QxSqlQuery query,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Update an element and its relationships (or a list of elements + relationships) into database (adding a user SQL query to the default SQL query builded by QxOrm library)

Parameters:
relationList of relationships keys to be updated in others tables of database
queryDefine a user SQL query added to default SQL query builded by QxOrm library
tElement (or list of elements) to be updated into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_by_query_with_relation<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc. + WHERE my_query...

Definition at line 560 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_optimized ( qx::dao::ptr< T > &  ptr) [inline]

Update only modified fields/properties of an element or a list of elements into database (using is dirty pattern and qx::dao::ptr<T> smart-pointer)

Parameters:
ptrElement (or list of elements) to be updated into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_optimized<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 957 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_optimized ( qx::dao::ptr< T > &  ptr,
QSqlDatabase *  pDatabase 
) [inline]

Update only modified fields/properties of an element or a list of elements into database (using is dirty pattern and qx::dao::ptr<T> smart-pointer)

Parameters:
ptrElement (or list of elements) to be updated into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_optimized<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 985 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_optimized_by_query ( const qx::QxSqlQuery query,
qx::dao::ptr< T > &  ptr 
) [inline]

Update only modified fields/properties of an element or a list of elements into database (using is dirty pattern and qx::dao::ptr<T> smart-pointer), adding a user SQL query to the default SQL query builded by QxOrm library.

Parameters:
queryDefine a user SQL query added to default SQL query builded by QxOrm library
ptrElement (or list of elements) to be updated into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_optimized_by_query<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc. + WHERE my_query...

Definition at line 971 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_optimized_by_query ( const qx::QxSqlQuery query,
qx::dao::ptr< T > &  ptr,
QSqlDatabase *  pDatabase 
) [inline]

Update only modified fields/properties of an element or a list of elements into database (using is dirty pattern and qx::dao::ptr<T> smart-pointer), adding a user SQL query to the default SQL query builded by QxOrm library.

Parameters:
queryDefine a user SQL query added to default SQL query builded by QxOrm library
ptrElement (or list of elements) to be updated into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_optimized_by_query<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc. + WHERE my_query...

Definition at line 1000 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_with_all_relation ( T &  t) [inline]

Update an element and all its relationships (or a list of elements + all relationships) into database.

Parameters:
tElement (or list of elements) to be updated into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_with_all_relation<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 1238 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_with_all_relation ( T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Update an element and all its relationships (or a list of elements + all relationships) into database.

Parameters:
tElement (or list of elements) to be updated into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_with_all_relation<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 574 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_with_relation ( const QStringList &  relation,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Update an element and its relationships (or a list of elements + relationships) into database.

Parameters:
relationList of relationships keys to be updated in others tables of database
tElement (or list of elements) to be updated into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_with_relation<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 544 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_with_relation ( const QString &  relation,
T &  t,
QSqlDatabase *  pDatabase 
) [inline]

Update an element and its relationships (or a list of elements + relationships) into database.

Parameters:
relationList of relationships keys to be updated in others tables of database : use "|" separator to put many relationships keys into this parameter
tElement (or list of elements) to be updated into 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
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_with_relation<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 513 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_with_relation ( const QStringList &  relation,
T &  t 
) [inline]

Update an element and its relationships (or a list of elements + relationships) into database.

Parameters:
relationList of relationships keys to be updated in others tables of database
tElement (or list of elements) to be updated into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_with_relation<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 1210 of file QxDao.h.

template<class T >
QSqlError qx::dao::update_with_relation ( const QString &  relation,
T &  t 
) [inline]

Update an element and its relationships (or a list of elements + relationships) into database.

Parameters:
relationList of relationships keys to be updated in others tables of database : use "|" separator to put many relationships keys into this parameter
tElement (or list of elements) to be updated into database
Returns:
Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query

qx::dao::update_with_relation<T>() execute following SQL query :
UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.

Definition at line 1181 of file QxDao.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines