QxOrm 1.1.6
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::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::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...

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  QxSqlDatabase.h
 

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


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.


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::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::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::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::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_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_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::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::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::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::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::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_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 (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::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_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_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::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 85 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 98 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 537 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 549 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 680 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 239 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

Definition at line 212 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

Definition at line 655 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 = ?

Definition at line 199 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 = ?

Definition at line 643 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...

Definition at line 668 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...

Definition at line 226 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 693 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 253 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 575 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 126 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 723 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 341 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 863 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 312 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 327 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 836 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 850 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 562 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 708 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 112 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 297 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 822 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 795 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 809 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 268 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 283 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 589 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 141 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 739 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 388 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 907 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 357 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 373 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 878 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 893 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 602 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 155 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 432 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 948 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 935 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 403 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 418 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 921 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 1084 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 1068 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 1076 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 1060 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 1044 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 1052 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 185 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 630 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 526 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 1036 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 493 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 1021 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 510 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 1005 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 169 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 615 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 754 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 767 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 781 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 989 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 476 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 447 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 462 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 962 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 976 of file QxDao.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines