Public Types | |
enum | PlaceInSignal { Subject = 0, Object } |
Public Member Functions | |
TrackerPartialUpdater (const QString &updateQuery) | |
Constructs a TrackerLiveQueryUpdater which will run an update query specified by the updateQuery. | |
TrackerPartialUpdater (const TrackerPartialUpdater &other) | |
TrackerPartialUpdater & | operator= (const TrackerPartialUpdater &other) |
void | watchClass (const QString &klass, const QStringList &predicates, const QString &filterSnippet, PlaceInSignal placeInSignal, int idColumn) |
Defines when to run the update query (when the class klass and one of its predicates changes), what kind of update query to run (the FILTER statement is constructed from filterSnippet strings which contain a "%LIST" placeholder for an id list, placeInSignal indicating whether to put subjects or objects to the list), and which rows are affected by the update query (idColumn contains one of the tracker:ids in the signal). | |
void | watchClassForInserts (const QString &klass, const QStringList &predicates, const QString &filterSnippet, PlaceInSignal placeInSignal, int idColumn) |
The same as watchClass(), but only watches insertion of predicates to an object belonging to class klass. | |
void | watchClassForDeletes (const QString &klass, const QStringList &predicates, const QString &filterSnippet, PlaceInSignal placeInSignal, int idColumn) |
The same as watchClass(), but only watches insertion of predicates to an object belonging to class klass. | |
Friends | |
class | TrackerLiveQuery |
TrackerPartialUpdater::TrackerPartialUpdater | ( | const QString & | updateQuery | ) |
Constructs a TrackerLiveQueryUpdater which will run an update query specified by the updateQuery.
updateQuery must contain exactly one "%FILTER" placeholder where the FILTER statement is inserted. The user specifies to which changes the TrackerPartialUpdater reacts to by calling watchClass() one or multiple times.
void TrackerPartialUpdater::watchClass | ( | const QString & | klass, | |
const QStringList & | predicates, | |||
const QString & | filterSnippet, | |||
PlaceInSignal | placeInSignal, | |||
int | idColumn | |||
) |
Defines when to run the update query (when the class klass and one of its predicates changes), what kind of update query to run (the FILTER statement is constructed from filterSnippet strings which contain a "%LIST" placeholder for an id list, placeInSignal indicating whether to put subjects or objects to the list), and which rows are affected by the update query (idColumn contains one of the tracker:ids in the signal).
An empty predicate list means "all predicates".
void TrackerPartialUpdater::watchClassForDeletes | ( | const QString & | klass, | |
const QStringList & | predicates, | |||
const QString & | filterSnippet, | |||
PlaceInSignal | placeInSignal, | |||
int | idColumn | |||
) |
The same as watchClass(), but only watches insertion of predicates to an object belonging to class klass.
void TrackerPartialUpdater::watchClassForInserts | ( | const QString & | klass, | |
const QStringList & | predicates, | |||
const QString & | filterSnippet, | |||
PlaceInSignal | placeInSignal, | |||
int | idColumn | |||
) |
The same as watchClass(), but only watches insertion of predicates to an object belonging to class klass.