App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Static Public Attributes | List of all members
google.appengine.datastore.datastore_sqlite_stub.DatastoreSqliteStub Class Reference
Inheritance diagram for google.appengine.datastore.datastore_sqlite_stub.DatastoreSqliteStub:
google.appengine.datastore.datastore_stub_util.BaseDatastore google.appengine.datastore.datastore_stub_util.DatastoreStub google.appengine.datastore.datastore_stub_util.BaseTransactionManager google.appengine.datastore.datastore_stub_util.BaseIndexManager

Public Member Functions

def __init__
 
def Clear
 
def Read
 
def Close
 
def MakeSyncCall
 
def AssertPbIsInitialized
 
- Public Member Functions inherited from google.appengine.datastore.datastore_stub_util.BaseDatastore
def __init__
 
def Clear
 
def GetQueryCursor
 
def Get
 
def Put
 
def Delete
 
def Touch
 
def SetAutoIdPolicy
 
def Write
 
- Public Member Functions inherited from google.appengine.datastore.datastore_stub_util.BaseTransactionManager
def __init__
 
def SetConsistencyPolicy
 
def Clear
 
def BeginTransaction
 
def GetTxn
 
def Groom
 
def Flush
 
- Public Member Functions inherited from google.appengine.datastore.datastore_stub_util.BaseIndexManager
def __init__
 
def CreateIndex
 
def GetIndexes
 
def UpdateIndex
 
def DeleteIndex
 
- Public Member Functions inherited from google.appengine.datastore.datastore_stub_util.DatastoreStub
def __init__
 
def Clear
 
def QueryHistory
 
def SetTrusted
 

Static Public Attributes

tuple READ_ERROR_MSG
 
- Static Public Attributes inherited from google.appengine.datastore.datastore_stub_util.BaseIndexManager
 WRITE_ONLY = entity_pb.CompositeIndex.WRITE_ONLY
 
 READ_WRITE = entity_pb.CompositeIndex.READ_WRITE
 
 DELETED = entity_pb.CompositeIndex.DELETED
 
 ERROR = entity_pb.CompositeIndex.ERROR
 

Detailed Description

Persistent stub for the Python datastore API.

Stores all entities in an SQLite database. A DatastoreSqliteStub instance
handles a single app's data.

Constructor & Destructor Documentation

def google.appengine.datastore.datastore_sqlite_stub.DatastoreSqliteStub.__init__ (   self,
  app_id,
  datastore_file,
  require_indexes = False,
  verbose = False,
  service_name = 'datastore_v3',
  trusted = False,
  consistency_policy = None,
  root_path = None,
  use_atexit = True,
  auto_id_policy = datastore_stub_util.SEQUENTIAL 
)
Constructor.

Initializes the SQLite database if necessary.

Args:
  app_id: string
  datastore_file: string, path to sqlite database. Use None to create an
  in-memory database.
  require_indexes: bool, default False. If True, composite indexes must
  exist in index.yaml for queries that need them.
  verbose: bool, default False. If True, logs all select statements.
  service_name: Service name expected for all calls.
  trusted: bool, default False. If True, this stub allows an app to access
  the data of another app.
  consistency_policy: The consistency policy to use or None to use the
default. Consistency policies can be found in
datastore_stub_util.*ConsistencyPolicy
  root_path: string, the root path of the app.
  use_atexit: bool, indicates if the stub should save itself atexit.
  auto_id_policy: enum, datastore_stub_util.SEQUENTIAL or .SCATTERED

Member Function Documentation

def google.appengine.datastore.datastore_sqlite_stub.DatastoreSqliteStub.AssertPbIsInitialized (   self,
  pb 
)
Raises an exception if the given PB is not initialized and valid.
def google.appengine.datastore.datastore_sqlite_stub.DatastoreSqliteStub.Clear (   self)
Clears the datastore.
def google.appengine.datastore.datastore_sqlite_stub.DatastoreSqliteStub.Close (   self)
Closes the SQLite connection and releases the files.
def google.appengine.datastore.datastore_sqlite_stub.DatastoreSqliteStub.MakeSyncCall (   self,
  service,
  call,
  request,
  response,
  request_id = None 
)
The main RPC entry point. service must be 'datastore_v3'.
def google.appengine.datastore.datastore_sqlite_stub.DatastoreSqliteStub.Read (   self)
Reads the datastore from disk.

Noop for compatibility with file stub.

Member Data Documentation

tuple google.appengine.datastore.datastore_sqlite_stub.DatastoreSqliteStub.READ_ERROR_MSG
static
Initial value:
1 = ('Data in %s is corrupt or a different version. '
2  'Try running with the --clear_datastore flag.\n%r')

The documentation for this class was generated from the following file: