Esempio n. 1
0
 def __init__(self, fs_table, mounts_table):
     fs_col = PkName('filesystem')
     fs_col.set_fk(fs_table)
     mnt_name_col = PkName('mnt_name')
     mnt_name_col.set_fk(mounts_table)
     ord_col = Num('ord')
     partition_column = Num('partition')
     columns = [fs_col, mnt_name_col, ord_col, partition_column]
     Table.__init__(self, 'filesystem_mounts', columns)
Esempio n. 2
0
def template_columns():
    return [
        PkBigname('template'),
        Name('mode'),
        Name('owner'),
        Name('grp_owner'),
        Num('templatefile')]
Esempio n. 3
0
 def __init__(self, profiles_table, traits_table):
     profile_col = PkName('profile')
     profile_col.set_fk(profiles_table)
     trait_col = PkName('trait')
     trait_col.set_fk(traits_table)
     ord_col = Num('ord')
     Table.__init__(self, 'profile_trait', [profile_col, trait_col, ord_col])
Esempio n. 4
0
 def __init__(self, suite, traits_table):
     tablename = ujoin(suite, 'scripts')
     script_column = PkName('script')
     script_column.set_fk('scriptnames')
     sfile_column = Num('scriptfile')
     sfile_column.set_fk('textfiles')
     script_columns = [script_column, sfile_column]
     _TraitRelation.__init__(self, traits_table, tablename, script_columns)
Esempio n. 5
0
 def __init__(self, machines_table):
     machine_col = PkName('machine')
     machine_col.set_fk(machines_table)
     tablename = ujoin('machine', 'scripts')
     script_column = PkName('script')
     script_column.set_fk('scriptnames')
     sfile_column = Num('scriptfile')
     sfile_column.set_fk('textfiles')
     columns = [machine_col, script_column, sfile_column]
     Table.__init__(self, tablename, columns)
Esempio n. 6
0
def packages_columns():
    return [
        PkBigname('package'),
        Name('priority'),
        Bigname('section'),
        Num('installedsize'),
        Bigname('filename'),
        Bigname('maintainer'),
        Bigname('size'),
        Name('md5sum'),
        Bigname('version'),
        Text('description')]
Esempio n. 7
0
 def __init__(self):
     suite = PkName('suite')
     apt_id = PkName('apt_id')
     order = Num('ord')
     name = 'suite_apt_sources'
     Table.__init__(self, name, [suite, apt_id, order])
Esempio n. 8
0
from useless.sqlgen.classes import Column, Table
from useless.sqlgen.defaults import Text
from useless.sqlgen.defaults import PkBigname, Bigname, Name, Num

dpkg_tables = ['available', 'status', 'filelist', 'md5sums', 'conffiles']
other_tables = ['current']


common_columns = [
    PkBigname('package'),
    Name('essential'),
    Name('priority'),
    Name('section'),
    Num('installedsize'),
    Bigname('maintainer'),
    Name('version')
    ]
    

#columns for /var/lib/dpkg/status
status_columns = common_columns + [
    Name('status'),
    Text('replaces'),
    Text('provides'),
    Text('predepends'),
    Text('conflicts'),
    Bigname('source'),
    Text('suggests'),
    Text('recommends'),
    Text('depends'),
Esempio n. 9
0
 def __init__(self, mounts_table):
     mnt_name_col = PkName('mnt_name')
     mnt_name_col.set_fk(mounts_table)
     partition_col = Num('partition')
     columns = [mnt_name_col, partition_col]
     Table.__init__(self, 'partition_mounts', columns)
Esempio n. 10
0
 def __init__(self, name, mach_types_table):
     mtype_col = PkName('machine_type')
     mtype_col.set_fk(mach_types_table)
     columns = [mtype_col, PkName('module'), Num('ord')]
     Table.__init__(self, name, columns)
Esempio n. 11
0
def partition_columns():
    return [PkName('partition'), Num('start'), Num('size'), Num('Id')]