Classes | Functions

RDB Namespace Reference

Simple template-based relational database. More...

Classes

Functions


Detailed Description

Simple template-based relational database.


Function Documentation

QList<const T*> RDB::sortRows ( IT  it,
R(T::*)() const   order 
) [inline]

Sort rows of a table using given property.

The values of the property are compared using operator >.

Parameters:
it Row iterator of any kind.
order Getter method of the property to use for sorting.
Returns:
The list of rows ordered by the property value. Example:
 RDB::IndexConstIterator<MyRow> it( myTable.index() );
 QList<const MyRow*> rows = sortRows( it, &MyRow::size );
QList<const T*> RDB::localeAwareSortRows ( IT  it,
R(T::*)() const   order 
) [inline]

Sort rows of a table using given property.

The values of the property are compared using QString::localeAwareCompare().

Parameters:
it Row iterator of any kind.
order Getter method of the property to use for sorting.
Returns:
The list of rows ordered by the property value.
See also:
sortRows()
const T* RDB::findRow ( IT  it,
R(T::*)() const   method,
const V &  value 
) [inline]

Find a row with given value of a non-indexed property in a table.

Parameters:
it Row iterator of any kind.
method Getter method of the property to check.
value The value to find.
Returns:
The first row with given value or NULL if none was found.