Package conary :: Package local :: Module localrep :: Class SqlDataStore
[hide private]
[frames] | no frames]

Class SqlDataStore

source code

repository.datastore.AbstractDataStore --+
                                         |
                                        SqlDataStore

Implements a DataStore interface on a sql database. File contents are stored directly in the sql database.

Instance Methods [hide private]
 
hasFile(self, hash) source code
 
decrementCount(self, hash)
Decrements the count by one; it it becomes 1, the count file is removed.
source code
 
incrementCount(self, hash, fileObj=None, precompressed=True)
Increments the count by one.
source code
 
addFileReference(self, hash) source code
 
addFile(self, f, hash, precompressed=True) source code
 
openFile(self, hash, mode='r') source code
 
removeFile(self, hash) source code
 
__init__(self, db) source code

Inherited from repository.datastore.AbstractDataStore: openRawFile

Method Details [hide private]

hasFile(self, hash)

source code 
Overrides: repository.datastore.AbstractDataStore.hasFile

decrementCount(self, hash)

source code 
Decrements the count by one; it it becomes 1, the count file is removed. If it becomes zero, the contents are removed.

incrementCount(self, hash, fileObj=None, precompressed=True)

source code 
Increments the count by one. If it becomes one (the file is new), the contents of fileObj are stored into that path.

addFileReference(self, hash)

source code 
Overrides: repository.datastore.AbstractDataStore.addFileReference

addFile(self, f, hash, precompressed=True)

source code 
Overrides: repository.datastore.AbstractDataStore.addFile

openFile(self, hash, mode='r')

source code 
Overrides: repository.datastore.AbstractDataStore.openFile

removeFile(self, hash)

source code 
Overrides: repository.datastore.AbstractDataStore.removeFile