pythonjit._database

Provides a Object oriented interface for working with sqlite3 databases.

pythonjit uses a database to keep track of when source code changes, so that it knows when to recompile the static libraries.

This is a stripped down copy of pride.components.database. There are features present that are not used in pythonjit.

This module is a utility used by the library, and is not intended to be used in any other capacity.

Cache_Database

Database with the table structure expected by Import_Hook.

Instance defaults:

{'auto_commit': True,
 'connection': None,
 'cursor': None,
 'database_name': '',
 'detect_types_flags': 1,
 'return_cursor': False,
 'text_factory': <type 'str'>}

Method resolution order:

(<class 'pythonjit._database.Cache_Database'>,
 <class 'pythonjit._database.Database'>,
 <type 'object'>)

Database

An object with methods for dispatching sqlite3 commands.
Database objects may be simpler and safer then directly working with sqlite3 queries.
Note that database methods commit automatically when the auto_commit attribute is set to True (defaults to True).

Instance defaults:

{'auto_commit': True,
 'connection': None,
 'cursor': None,
 'database_name': '',
 'detect_types_flags': 1,
 'return_cursor': False,
 'text_factory': <type 'str'>}

Method resolution order:

(<class 'pythonjit._database.Database'>, <type 'object'>)

Method resolution order:

(<class 'sqlite3.IntegrityError'>,
 <class 'sqlite3.DatabaseError'>,
 <class 'sqlite3.Error'>,
 <type 'exceptions.StandardError'>,
 <type 'exceptions.Exception'>,
 <type 'exceptions.BaseException'>,
 <type 'object'>)

create_assignment_string

create_assignment_string(items):

Helper function used by Database objects

create_where_string

create_where_string(where):

Helper function used by Database objects

test_db

test_db():

Unit test for Database objects