App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Functions | Variables
google.appengine.ext.ndb.prospective_search Namespace Reference

Functions

def subscribe
 
def unsubscribe
 
def get_subscription
 
def list_subscriptions
 
def match
 
def get_document
 

Variables

 DEFAULT_RESULT_BATCH_SIZE = prospective_search.DEFAULT_RESULT_BATCH_SIZE
 
 DEFAULT_LEASE_DURATION_SEC = prospective_search.DEFAULT_LEASE_DURATION_SEC
 
 DEFAULT_LIST_SUBSCRIPTIONS_MAX_RESULTS = \
 
 DEFAULT_LIST_TOPICS_MAX_RESULTS = \
 
 Error = prospective_search.Error
 
 DocumentTypeError = prospective_search.DocumentTypeError
 
 QuerySyntaxError = prospective_search.QuerySyntaxError
 
 SchemaError = prospective_search.SchemaError
 
 SubscriptionDoesNotExist = prospective_search.SubscriptionDoesNotExist
 
 TopicNotSpecified = prospective_search.TopicNotSpecified
 
 SubscriptionState = prospective_search.SubscriptionState
 
 subscription_state_name = prospective_search.subscription_state_name
 
list __all__
 
 _doc_class = prospective_search_pb.MatchRequest
 
dictionary _MODEL_TYPE_TO_PYTHON_TYPE
 
 list_topics = prospective_search.list_topics
 

Detailed Description

Prospective Search for NDB.

This reimplements all of the standard APIs with the following changes:

- A document_class argument must be an NDB Model class.
- A document must be an NDB Model instance.
- get_document() always returns an NDB Model instance.

The exceptions and public constants exported by the standard module
are re-exported here.

Function Documentation

def google.appengine.ext.ndb.prospective_search.get_document (   request)
Decodes document from prospective_search result POST request.

Args:
  request: received POST request

Returns:
  document: original NDB Model document from match call.

Raises:
  DocumentTypeError: if document class is not recognized.
def google.appengine.ext.ndb.prospective_search.get_subscription (   document_class,
  sub_id,
  topic = None 
)
Get subscription information.
def google.appengine.ext.ndb.prospective_search.list_subscriptions (   document_class,
  sub_id_start = '',
  topic = None,
  max_results = DEFAULT_LIST_SUBSCRIPTIONS_MAX_RESULTS,
  expires_before = None 
)
List subscriptions on a topic.
def google.appengine.ext.ndb.prospective_search.match (   document,
  topic = None,
  result_key = None,
  result_relative_url = '/_ah/prospective_search',
  result_task_queue = 'default',
  result_batch_size = DEFAULT_RESULT_BATCH_SIZE,
  result_return_document = True 
)
Match document with all subscribed queries on specified topic.
def google.appengine.ext.ndb.prospective_search.subscribe (   document_class,
  query,
  sub_id,
  schema = None,
  topic = None,
  lease_duration_sec = DEFAULT_LEASE_DURATION_SEC 
)
Subscribe a query.

Variable Documentation

list google.appengine.ext.ndb.prospective_search.__all__
Initial value:
1 = ['get_document',
2  'get_subscription',
3  'list_subscriptions',
4  'list_topics',
5  'match',
6  'unsubscribe',
7  'subscribe',
8  'subscription_state_name',
9  'DEFAULT_RESULT_BATCH_SIZE',
10  'DEFAULT_LEASE_DURATION_SEC',
11  'DEFAULT_LIST_SUBSCRIPTIONS_MAX_RESULTS',
12  'DEFAULT_LIST_TOPICS_MAX_RESULTS',
13  'DocumentTypeError',
14  'Error',
15  'QuerySyntaxError',
16  'SchemaError',
17  'SubscriptionDoesNotExist',
18  'SubscriptionState',
19  'TopicNotSpecified']
dictionary google.appengine.ext.ndb.prospective_search._MODEL_TYPE_TO_PYTHON_TYPE