App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
google.appengine.tools.bulkloader._Database Class Reference
Inheritance diagram for google.appengine.tools.bulkloader._Database:
google.appengine.tools.bulkloader._ProgressDatabase google.appengine.tools.bulkloader.ResultDatabase google.appengine.tools.bulkloader.ExportProgressDatabase

Public Member Functions

def __init__
 
def ThreadComplete
 

Public Attributes

 db_filename
 
 primary_conn
 
 primary_thread
 
 secondary_conn
 
 secondary_thread
 
 operation_count
 
 commit_periodicity
 
 existing_table
 
 insert_cursor
 
 update_cursor
 

Static Public Attributes

string SIGNATURE_TABLE_NAME = 'bulkloader_database_signature'
 

Detailed Description

Base class for database connections in this module.

The table is created by a primary thread (the python main thread)
but all future lookups and updates are performed by a secondary
thread.

Constructor & Destructor Documentation

def google.appengine.tools.bulkloader._Database.__init__ (   self,
  db_filename,
  create_table,
  signature,
  index = None,
  commit_periodicity = 100 
)
Initialize the _Database instance.

Args:
  db_filename: The sqlite3 file to use for the database.
  create_table: A string containing the SQL table creation command.
  signature: A string identifying the important invocation options,
used to make sure we are not using an old database.
  index: An optional string to create an index for the database.
  commit_periodicity: Number of operations between database commits.

Member Function Documentation

def google.appengine.tools.bulkloader._Database.ThreadComplete (   self)
Finalize any operations the secondary thread has performed.

The database aggregates lots of operations into a single commit, and
this method is used to commit any pending operations as the thread
is about to shut down.

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