Exemple #1
0
 def __init__(self, dict, db, sql, rowid, cache=None):
     UserDictCase.__init__(self, dict)
     if not isinstance(db, sql_base.Database):
         raise TypeError("Second argument needs to be a database handle")
     self.__db = db
     self.__sql = sql
     self.__rowid = rowid
     self.__cache = cache
Exemple #2
0
 def __init__(self, dict, db, sql, rowid, cache=None):
     UserDictCase.__init__(self, dict)
     if not isinstance(db, sql_base.Database):
         raise TypeError("Second argument needs to be a database handle")
     self.__db = db
     self.__sql = sql
     self.__rowid = rowid
     self.__cache = cache
Exemple #3
0
    def __init__(self, db, table, hashname, hashval=None):
        UserDictCase.__init__(self)
        if not isinstance(db, sql_base.Database):
            raise rhnException("Argument db is not a database instance", db)
        self.db = db
        self.table = table
        self.hashname = string.lower(hashname)

        # and the data dictionary
        self.data = {}
        # is this a real entry (ie, use insert or update)
        self.real = 0
        if hashval is not None:  # if we have to load an entry already...
            self.load(hashval)
Exemple #4
0
    def __init__(self, db, table, hashname, hashval=None):
        UserDictCase.__init__(self)
        if not isinstance(db, sql_base.Database):
            raise rhnException("Argument db is not a database instance", db)
        self.db = db
        self.table = table
        self.hashname = string.lower(hashname)

        # and the data dictionary
        self.data = {}
        # is this a real entry (ie, use insert or update)
        self.real = 0
        if hashval is not None:  # if we have to load an entry already...
            self.load(hashval)