Package conary :: Package dbstore :: Module idtable :: Class CachedIdTable
[hide private]
[frames] | no frames]

Class CachedIdTable

source code

IdTable --+
          |
         CachedIdTable
Known Subclasses:
local.sqldb.Tags

Provides an IdTable mapping with three differences -- ids are cached, they can't be removed, and getting a tag creates it if it doesn't already exist. This is designed for small tables!

Instance Methods [hide private]
 
__init__(self, db, tableName, keyName, strName) source code
 
getId(self, theId) source code
 
__getitem__(self, item) source code
 
get(self, item, defValue) source code
 
addId(self, item) source code
 
getItemDict(self, itemSeq) source code
 
delId(self, theId) source code
 
__delitem__(self, item) source code

Inherited from IdTable: getOrAddId, has_key, items, iteritems, iterkeys, itervalues, keys, values

Method Details [hide private]

__init__(self, db, tableName, keyName, strName)
(Constructor)

source code 
Overrides: IdTable.__init__

getId(self, theId)

source code 
Overrides: IdTable.getId

__getitem__(self, item)
(Indexing operator)

source code 
Overrides: IdTable.__getitem__

get(self, item, defValue)

source code 
Overrides: IdTable.get

addId(self, item)

source code 
Overrides: IdTable.addId

getItemDict(self, itemSeq)

source code 
Overrides: IdTable.getItemDict

delId(self, theId)

source code 
Overrides: IdTable.delId

__delitem__(self, item)
(Index deletion operator)

source code 
Overrides: IdTable.__delitem__