Home | Trees | Index | Help |
|
---|
Package dak :: Package daklib :: Module database |
|
Function Summary | |
---|---|
Executes a database query q. | |
Returns database architecture_id for given architecture, caches result. | |
Returns database archive_id for given archive, caches result. | |
Returns database component_id for given component, caches result. | |
Returns -1, -2 or the file_id for a given combination of filename size md5sum location_id. | |
Returns database location_id for given combination of location component archive. | |
Return the name of the maintainer behind maintainer_id | |
If fingerprintd does not have an entry in the fingerprint table yet, create one and return its id. | |
If keyring does not have an entry in the keyring table yet, create one and return its id. | |
If maintainer does not have an entry in the maintainer table yet, create one and return its id. | |
If queue does not have an entry in the queue_name table yet, create one and return its id. | |
If uid does not have an entry in the uid table yet, create one and return its id. | |
Returns database override_id for given override_type type, caches result. | |
Returns database priority_id for given priority, caches result. | |
Returns database section_id for given section, caches result. | |
Returns database source_id for given combination of source and version, caches result. | |
Returns database suite_id for given suite, caches result. | |
Returns database version for a given source in a given suite, caches result. | |
Return the suites in which pkgname is. | |
database module init. | |
Insert a new entry into the files table. |
Variable Summary | |
---|---|
dict |
architecture_id_cache = {}
|
dict |
archive_id_cache = {}
|
Configuration |
Cnf = <Configuration object at 0x7f5a6b212570>
|
dict |
component_id_cache = {}
|
dict |
files_id_cache = {}
|
dict |
fingerprint_id_cache = {}
|
dict |
keyring_id_cache = {}
|
dict |
location_id_cache = {}
|
dict |
maintainer_cache = {}
|
dict |
maintainer_id_cache = {}
|
dict |
override_type_id_cache = {}
|
dict |
priority_id_cache = {}
|
pgobject |
projectB = <pgobject object at 0x7f5a6b25b300>
|
dict |
queue_id_cache = {}
|
dict |
section_id_cache = {}
|
dict |
source_id_cache = {}
|
dict |
suite_id_cache = {}
|
dict |
suite_version_cache = {}
|
dict |
uid_id_cache = {}
|
sys
,
time
,
types
Function Details |
---|
do_query(q)Executes a database query q. Writes statistics to stderr and returns the result. |
get_architecture_id(architecture)Returns database architecture_id for given architecture, caches result. |
get_archive_id(archive)Returns database archive_id for given archive, caches result. |
get_component_id(component)Returns database component_id for given component, caches result. |
get_files_id(filename, size, md5sum, location_id)Returns -1, -2 or the file_id for a given combination of filename size md5sum location_id. The database is queried using filename and location_id, size and md5sum are for extra checks. Return values: -1 - The given combination of arguments result in more (or less) than one result from the database -2 - The given size and md5sum do not match the values in the database anything else is a file_id Result is cached. |
get_location_id(location, component, archive)Returns database location_id for given combination of location component archive. The 3 parameters are the database ids returned by the respective "get_foo_id" functions. The result will be cached. |
get_maintainer(maintainer_id)Return the name of the maintainer behind maintainer_id |
get_or_set_fingerprint_id(fingerprint)If fingerprintd does not have an entry in the fingerprint table yet, create one and return its id. If fingerprint already has an entry, simply return its id. Result is cached. |
get_or_set_keyring_id(keyring)If keyring does not have an entry in the keyring table yet, create one and return its id. If keyring already has an entry, simply return its id. Result is cached. |
get_or_set_maintainer_id(maintainer)If maintainer does not have an entry in the maintainer table yet, create one and return its id. If maintainer already has an entry, simply return its id. Result is cached. |
get_or_set_queue_id(queue)If queue does not have an entry in the queue_name table yet, create one and return its id. If queue already has an entry, simply return its id. Result is cached. |
get_or_set_uid_id(uid)If uid does not have an entry in the uid table yet, create one and return its id. If uid already has an entry, simply return its id. Result is cached. |
get_override_type_id(type)Returns database override_id for given override_type type, caches result. |
get_priority_id(priority)Returns database priority_id for given priority, caches result. |
get_section_id(section)Returns database section_id for given section, caches result. |
get_source_id(source, version)Returns database source_id for given combination of source and version, caches result. |
get_suite_id(suite)Returns database suite_id for given suite, caches result. |
get_suite_version(source, suite)Returns database version for a given source in a given suite, caches result. |
get_suites(pkgname, src=False)Return the suites in which pkgname is. If src is True, query for source package, else binary. |
init(config, sql)database module init. Just sets two variables |
set_files_id(filename, size, md5sum, sha1sum, sha256sum, location_id)Insert a new entry into the files table. Returns the new file_id |
Variable Details |
---|
architecture_id_cache
|
archive_id_cache
|
Cnf
|
component_id_cache
|
files_id_cache
|
fingerprint_id_cache
|
keyring_id_cache
|
location_id_cache
|
maintainer_cache
|
maintainer_id_cache
|
override_type_id_cache
|
priority_id_cache
|
projectB
|
queue_id_cache
|
section_id_cache
|
source_id_cache
|
suite_id_cache
|
suite_version_cache
|
uid_id_cache
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Jan 24 18:08:17 2009 | http://epydoc.sf.net |