EBookContacts.BookQuery¶
Fields¶
None
Methods¶
| class | and_(nqs, qs, unref) | 
| class | any_field_contains(value) | 
| class | field_exists(field) | 
| class | field_test(field, test, value) | 
| class | from_string(query_string) | 
| class | or_(nqs, qs, unref) | 
| class | vcard_field_exists(field) | 
| class | vcard_field_test(field, test, value) | 
| copy() | |
| not_(unref) | |
| ref() | |
| to_string() | |
| unref() | 
Details¶
- 
class EBookContacts.BookQuery¶
- 
classmethod and_(nqs, qs, unref)¶
- Parameters: - nqs (int) – the number of queries to AND
- qs (EBookContacts.BookQuery) – pointer to an array ofEBookContacts.BookQueryitems
- unref (bool) – ifTrue, the new query takes ownership of the existing queries
 - Returns: - A new - EBookContacts.BookQuery- Return type: - Create a new - EBookContacts.BookQuerywhich is the logical AND of the queries in #qs.
- nqs (
 - 
classmethod any_field_contains(value)¶
- Parameters: - value ( - str) – a value- Returns: - the new - EBookContacts.BookQuery- Return type: - EBookContacts.BookQuery- Creates a new - EBookContacts.BookQuerywhich tests if any field contains value.
 - 
classmethod field_exists(field)¶
- Parameters: - field ( - EBookContacts.ContactField) – a- EBookContacts.ContactField- Returns: - the new - EBookContacts.BookQuery- Return type: - EBookContacts.BookQuery- Creates a new - EBookContacts.BookQuerywhich tests if the field field exists.
 - 
classmethod field_test(field, test, value)¶
- Parameters: - field (EBookContacts.ContactField) – anEBookContacts.ContactFieldto test
- test (EBookContacts.BookQueryTest) – the test to apply
- value (str) – the value to test for
 - Returns: - the new - EBookContacts.BookQuery- Return type: - Creates a new - EBookContacts.BookQuerywhich tests field for value using the test test.
- field (
 - 
classmethod from_string(query_string)¶
- Parameters: - query_string ( - str) – the query- Returns: - the new - EBookContacts.BookQuery.- Return type: - EBookContacts.BookQuery- Parse query_string and return a new - EBookContacts.BookQueryrepresenting it.
 - 
classmethod or_(nqs, qs, unref)¶
- Parameters: - nqs (int) – the number of queries to OR
- qs (EBookContacts.BookQuery) – pointer to an array ofEBookContacts.BookQueryitems
- unref (bool) – ifTrue, the new query takes ownership of the existing queries
 - Returns: - A new - EBookContacts.BookQuery- Return type: - Creates a new - EBookContacts.BookQuerywhich is the logical OR of the queries in #qs.
- nqs (
 - 
classmethod vcard_field_exists(field)¶
- Parameters: - field ( - str) – a field name- Returns: - the new - EBookContacts.BookQuery- Return type: - EBookContacts.BookQuery- Creates a new - EBookContacts.BookQuerywhich tests if the field field exists. field should be a vCard field name, such as- EBookContacts.EVC_FNor- EBookContacts.EVC_X_MSN.
 - 
classmethod vcard_field_test(field, test, value)¶
- Parameters: - field (str) – aEBookContacts.VCardfield name to test
- test (EBookContacts.BookQueryTest) – the test to apply
- value (str) – the value to test for
 - Returns: - the new - EBookContacts.BookQuery- Return type: - Creates a new - EBookContacts.BookQuerywhich tests field for value using the test test.- New in version 2.22. 
- field (
 - 
copy()¶
- Returns: - A new - EBookContacts.BookQueryidentical to self.- Return type: - EBookContacts.BookQuery- Creates a copy of self. 
 - 
not_(unref)¶
- Parameters: - unref ( - bool) – if- True, the new query takes ownership of the existing queries- Returns: - the new - EBookContacts.BookQuery- Return type: - EBookContacts.BookQuery- Creates a new - EBookContacts.BookQuerywhich is the opposite of #q.
 - 
ref()¶
- Returns: - self - Return type: - EBookContacts.BookQuery- Increment the reference count on self. 
 - 
to_string()¶
- Returns: - The string form of the query. This string should be freed when finished with. - Return type: - str- Return the string representation of self. 
 - 
unref()¶
- Decrement the reference count on self. When the reference count reaches 0, self will be freed and any child queries will have - EBookContacts.BookQuery.unref() called.
 
- 
classmethod