Package conary :: Package local :: Module database :: Class SqlDbRepository
[hide private]
[frames] | no frames]

Class SqlDbRepository

source code

     repository.trovesource.AbstractTroveSource --+    
                                                  |    
       repository.trovesource.SearchableTroveSource --+
                                                      |
           repository.datastore.DataStoreRepository --+
                                                      |
repository.repository.AbstractTroveDatabase --+       |
                                              |       |
          repository.repository.IdealRepository --+   |
                                                  |   |
           repository.repository.AbstractRepository --+
                                                      |
                                                     SqlDbRepository
Known Subclasses:
Database

Instance Methods [hide private]
 
iterAllTroveNames(self) source code
 
iterAllTroves(self) source code
 
findRemovedByName(self, name) source code
 
findByNames(self, nameList) source code
 
getTroveContainers(self, l) source code
 
findTroveContainers(self, names) source code
 
troveIsIncomplete(self, name, version, flavor) source code
 
findTroveReferences(self, names)
Return references to a trove on the system, whether or not that trove is actually installed
source code
 
getTrove(self, name, version, flavor, pristine=True, withFiles=True, withDeps=True)
(PUBLIC API)...
source code
 
getTroves(self, troveList, pristine=True, withFiles=True, withDeps=True, callback=None) source code
versions.Version
getTroveLatestVersion(self, name, branch)
Returns the version of the latest version of a trove on a particular branch.
source code
dict
getAllTroveFlavors(self, troveDict)
Converts a dictionary of the format retured by getAllTroveLeaves() to contain dicts of { version : flavorList } sets instead of containing lists of versions.
source code
 
troveVersionFlavors(self, troveName, version) source code
boolean
hasTroveByName(self, name)
Tests to see if the repository contains any version of the named trove.
source code
 
trovesByName(self, name) source code
 
hasTroves(self, troves) source code
 
hasTrove(self, troveName, version, flavor) source code
list of versions.Version
getTroveVersionList(self, name, withFlavors=False, troveTypes=None)
Returns a list of all of the versions of a trove available in the repository..
source code
list of trove.Trove instances
getTroveList(self, name)
Returns a list of all of the troves available in the repository.
source code
 
getFileStream(self, fileId) source code
 
getFileVersion(self, pathId, fileId, version, withContents=0) source code
 
getConfigFileContents(self, sha1) source code
 
findFileVersion(self, fileId) source code
 
getFileVersions(self, l, allowMissingFiles=False) source code
 
getTransactionCounter(self) source code
 
findUnreferencedTroves(self) source code
 
iterFilesInTrove(self, troveName, version, flavor, sortByPath=False, withFiles=False, pristine=False) source code
 
iterFilesWithTag(self, tag) source code
 
addFileVersion(self, troveId, pathId, fileObj, path, fileId, version, fileStream=None, isPresent=True) source code
 
addTrove(self, trove, pin=False, oldTroveSpec=None) source code
 
addTroveDone(self, troveInfo) source code
 
pinTroves(self, troveList, pin) source code
 
trovesArePinned(self, troveList)
See local.sqldb.Database.trovesArePinned and others for DB-specific implementation
source code
 
commit(self) source code
 
close(self) source code
 
eraseTrove(self, troveName, version, flavor) source code
 
pathIsOwned(self, path) source code
 
eraseFileVersion(self, pathId, version) source code
 
writeAccess(self) source code
 
_initDb(self) source code
 
_getDb(self) source code
 
__init__(self, path, timeout=None) source code

Inherited from repository.trovesource.SearchableTroveSource: createChangeSet, filterByFlavor, filterByFlavors, filterTrovesByPreferences, getTroveLatestByLabel, getTroveLeavesByBranch, getTroveLeavesByLabel, getTroveVersionFlavors, getTroveVersionsByBranch, getTroveVersionsByLabel, isSearchAsDatabase, searchAsDatabase, searchAsRepository, searchLeavesOnly, searchWithFlavor

Inherited from repository.trovesource.AbstractTroveSource: findTrove, findTroves, getDepsForTroveList, getFlavorPreferenceList, getLabelsForTroveName, getPathHashesForTroveList, mergeDepSuggestions, requiresLabelPath, resolveDependencies, resolveDependenciesByGroups, searchableByType, setFlavorPreferenceList, setFlavorPreferencesByFlavor, walkTroveSet

Inherited from repository.datastore.DataStoreRepository: getFileContents

Inherited from repository.repository.AbstractRepository: getTroveDescendants, getTroveInfo, getTroveReferences

Inherited from repository.repository.IdealRepository: createBranch, getAllTroveLeaves, queryMerge

Inherited from repository.repository.AbstractTroveDatabase: commitChangeSet

Properties [hide private]
  db
Method Details [hide private]

iterAllTroveNames(self)

source code 
Overrides: repository.trovesource.SearchableTroveSource.iterAllTroveNames

getTrove(self, name, version, flavor, pristine=True, withFiles=True, withDeps=True)

source code 

(PUBLIC API)
@raises TroveMissing:
@note:
    As this calls database functions, it could also raise any type of
DatabaseError defined in L{dbstore.sqlerrors}

Decorators:
  • @api.publicApi
Overrides: repository.trovesource.AbstractTroveSource.getTrove

getTroves(self, troveList, pristine=True, withFiles=True, withDeps=True, callback=None)

source code 
Overrides: repository.trovesource.SearchableTroveSource.getTroves

getTroveLatestVersion(self, name, branch)

source code 
Returns the version of the latest version of a trove on a particular branch. If that branch doesn't exist for the trove, TroveMissing is raised. The version returned includes timestamps.
Returns: versions.Version
Overrides: repository.repository.IdealRepository.getTroveLatestVersion
(inherited documentation)

getAllTroveFlavors(self, troveDict)

source code 
Converts a dictionary of the format retured by getAllTroveLeaves() to contain dicts of { version : flavorList } sets instead of containing lists of versions. The flavorList lists all of the flavors available for that vesrion of the trove.
Returns: dict
Overrides: repository.repository.IdealRepository.getAllTroveFlavors
(inherited documentation)

hasTroveByName(self, name)

source code 
Tests to see if the repository contains any version of the named trove.
Returns: boolean
Overrides: repository.repository.AbstractRepository.hasTroveByName
(inherited documentation)

trovesByName(self, name)

source code 
Overrides: repository.trovesource.SearchableTroveSource.trovesByName

hasTroves(self, troves)

source code 
Overrides: repository.trovesource.AbstractTroveSource.hasTroves

hasTrove(self, troveName, version, flavor)

source code 
Overrides: repository.trovesource.AbstractTroveSource.hasTrove

getTroveVersionList(self, name, withFlavors=False, troveTypes=None)

source code 
Returns a list of all of the versions of a trove available in the repository.. If withFlavors is True, (version, flavor) tuples are returned instead.
Parameters:
  • name (str) - trove
  • withFlavors (boolean) - If True, flavor information is also returned.
Returns: list of versions.Version
Overrides: repository.trovesource.SearchableTroveSource.getTroveVersionList

getTroveList(self, name)

source code 
Returns a list of all of the troves available in the repository.
Parameters:
  • name (str) - trove
Returns: list of trove.Trove instances

getFileVersion(self, pathId, fileId, version, withContents=0)

source code 
Overrides: repository.trovesource.AbstractTroveSource.getFileVersion

getFileVersions(self, l, allowMissingFiles=False)

source code 
Overrides: repository.trovesource.AbstractTroveSource.getFileVersions

getTransactionCounter(self)

source code 
Raises:

iterFilesInTrove(self, troveName, version, flavor, sortByPath=False, withFiles=False, pristine=False)

source code 
Overrides: repository.trovesource.AbstractTroveSource.iterFilesInTrove

__init__(self, path, timeout=None)
(Constructor)

source code 
Overrides: repository.trovesource.SearchableTroveSource.__init__

Property Details [hide private]

db

Get Method:
conary.local.database.SqlDbRepository._getDb(self)