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:
Returns:

A new EBookContacts.BookQuery

Return type:

EBookContacts.BookQuery

Create a new EBookContacts.BookQuery which is the logical AND of the queries in #qs.

classmethod any_field_contains(value)
Parameters:value (str) – a value
Returns:the new EBookContacts.BookQuery
Return type:EBookContacts.BookQuery

Creates a new EBookContacts.BookQuery which 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.BookQuery which tests if the field field exists.

classmethod field_test(field, test, value)
Parameters:
Returns:

the new EBookContacts.BookQuery

Return type:

EBookContacts.BookQuery

Creates a new EBookContacts.BookQuery which tests field for value using the test test.

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.BookQuery representing it.

classmethod or_(nqs, qs, unref)
Parameters:
Returns:

A new EBookContacts.BookQuery

Return type:

EBookContacts.BookQuery

Creates a new EBookContacts.BookQuery which is the logical OR of the queries in #qs.

classmethod vcard_field_exists(field)
Parameters:field (str) – a field name
Returns:the new EBookContacts.BookQuery
Return type:EBookContacts.BookQuery

Creates a new EBookContacts.BookQuery which tests if the field field exists. field should be a vCard field name, such as EBookContacts.EVC_FN or EBookContacts.EVC_X_MSN.

classmethod vcard_field_test(field, test, value)
Parameters:
Returns:

the new EBookContacts.BookQuery

Return type:

EBookContacts.BookQuery

Creates a new EBookContacts.BookQuery which tests field for value using the test test.

New in version 2.22.

copy()
Returns:A new EBookContacts.BookQuery identical 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.BookQuery which 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.