Backends¶
Base Backend¶
-
class
dockit.backends.base.BaseDocumentQuerySet¶ The
BaseDocumentQuerySetclass provides an interface for implementing document querysets.-
__len__()¶ returns an integer representing the number of items in the queryset
-
count()¶ Alias of __len__
-
delete()¶ deletes all the documents in the given queryset
-
all()¶ Returns a copy of this queryset, minus any caching.
-
get(doc_id)¶ returns the documents with the given id belonging to the queryset
-
__getitem__(val)¶ returns a document or a slice of documents
-
__nonzero__()¶ returns True if the queryset is not empty
-
-
class
dockit.backends.base.BaseDocumentStorage¶ The
BaseDocumentStorageclass provides an interface for implementing document storage backends.-
get_query(query_index)¶ return an implemented BaseDocumentQuerySet that contains all the documents
-
register_document(document)¶ is called for every document registered in the system
-
save(doc_class, collection, data)¶ stores the given primitive data in the specified collection
-
get(doc_class, collection, doc_id)¶ returns the primitive data for the document belonging in the specified collection
-
delete(doc_class, collection, doc_id)¶ deletes the given document from the specified collection
-
get_id(data)¶ returns the id from the primitive data
-
get_id_field_name()¶ returns a string representing the primary key field name
-
-
class
dockit.backends.base.BaseIndexStorage¶ The
BaseIndexStorageclass provides an interface for implementing index storage backends.-
register_index(query_index)¶ register the query index with this backend
-
destroy_index(query_index)¶ release the query index with this backend
-
get_query(query_index)¶ returns an implemented BaseDocumentQuerySet representing the query index
-
register_document(document)¶ is called for every document registered in the system
-
on_save(doc_class, collection, doc_id, data)¶ is called for every document save
-
on_delete(doc_class, collection, doc_id)¶ is called for every document delete
-