Package portage :: Package cache :: Module sqlite :: Class database
[hide private]

Class database

source code

       object --+        
                |        
template.database --+    
                    |    
  fs_template.FsBased --+
                        |
                       database

Instance Methods [hide private]
 
__init__(self, *args, **config)
initialize the derived class; specifically, store label/keys
source code
 
_import_sqlite(self) source code
 
_db_escape_string(self, s)
meta escaping, returns quoted string for use in sql statements
source code
 
_db_init_connection(self, config) source code
 
_db_init_structures(self) source code
 
_db_table_exists(self, table_name)
return true/false dependant on a tbl existing
source code
 
_db_table_get_create(self, table_name)
return true/false dependant on a tbl existing
source code
 
_db_validate_create_statement(self, statement) source code
 
_db_init_cache_size(self, cache_bytes) source code
 
_db_init_synchronous(self, synchronous) source code
 
_getitem(self, cpv)
get cpv's values.
source code
 
_setitem(self, cpv, values)
__setitem__ calls this after readonly checks.
source code
 
commit(self) source code
 
_delitem(self, cpv)
__delitem__ calls this after readonly checks.
source code
 
__contains__(self, cpv)
This method should always be overridden.
source code
 
__iter__(self)
generator for walking the dir struct
source code

Inherited from template.database: __del__, __delitem__, __getitem__, __setitem__, get, get_matches, has_key, items, iteritems, iterkeys, keys, sync, validate_entry

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from template.database (private): _internal_eclasses

Class Variables [hide private]
  autocommits = False
  synchronous = False
  cache_bytes = 10485760

Inherited from template.database: cleanse_keys, complete_eclass_entries, serialize_eclasses, store_eclass_paths, validation_chf

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **config)
(Constructor)

source code 

initialize the derived class; specifically, store label/keys

Overrides: object.__init__
(inherited documentation)

_getitem(self, cpv)

source code 

get cpv's values. override this in derived classess

Overrides: template.database._getitem
(inherited documentation)

_setitem(self, cpv, values)

source code 

__setitem__ calls this after readonly checks. override it in derived classes note _eclassees_ key *must* be handled

Overrides: template.database._setitem
(inherited documentation)

commit(self)

source code 
Overrides: template.database.commit

_delitem(self, cpv)

source code 

__delitem__ calls this after readonly checks. override it in derived classes

Overrides: template.database._delitem
(inherited documentation)

__contains__(self, cpv)
(In operator)

source code 

This method should always be overridden. It is provided only for backward compatibility with modules that override has_key instead. It will automatically raise a NotImplementedError if has_key has not been overridden.

Overrides: template.database.__contains__
(inherited documentation)

__iter__(self)

source code 

generator for walking the dir struct

Overrides: template.database.__iter__