akonadi
22 #include "contactgroupsearchjob.h"
24 #include <akonadi/itemfetchscope.h>
26 using namespace Akonadi;
28 class ContactGroupSearchJob::Private
42 #ifdef AKONADI_USE_STRIGI_SEARCH
46 " <field name=\"type\"/>"
47 " <string>ContactGroup</string>"
52 "SELECT ?r WHERE { ?r a nco:ContactGroup }"
74 if ( criterion ==
Name ) {
75 query += QString::fromLatin1(
76 #ifdef AKONADI_USE_STRIGI_SEARCH
81 " <field name=\"type\"/>"
82 " <string>ContactGroup</string>"
85 " <field name=\"contactGroupName\"/>"
86 " <string>%1</string>"
92 "SELECT DISTINCT ?group "
96 " ?group nco:contactGroupName \"%1\"^^<http://www.w3.org/2001/XMLSchema#string>."
103 if ( criterion ==
Name ) {
104 query += QString::fromLatin1(
105 #ifdef AKONADI_USE_STRIGI_SEARCH
110 " <field name=\"type\"/>"
111 " <string>ContactGroup</string>"
114 " <field name=\"contactGroupName\"/>"
115 " <string>%1</string>"
121 "SELECT DISTINCT ?group "
125 " ?group nco:contactGroupName ?v . "
126 " ?v bif:contains \"'%1'\""
133 if ( criterion ==
Name ) {
134 query += QString::fromLatin1(
135 #ifdef AKONADI_USE_STRIGI_SEARCH
140 " <field name=\"type\"/>"
141 " <string>ContactGroup</string>"
144 " <field name=\"contactGroupName\"/>"
145 " <string>%1</string>"
151 "SELECT DISTINCT ?group "
155 " ?group nco:contactGroupName ?v . "
156 " ?v bif:contains \"'%1*'\""
164 if ( d->mLimit != -1 ) {
165 #ifndef AKONADI_USE_STRIGI_SEARCH
166 query += QString::fromLatin1(
" LIMIT %1" ).arg( d->mLimit );
170 query = query.arg( value );
185 if ( item.
hasPayload<KABC::ContactGroup>() ) {
186 contactGroups.append( item.
payload<KABC::ContactGroup>() );
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:34 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.