Esempio n. 1
0
 def __init__(self):
     """
     Constructor
     :rtype: GroceriesTable
     """
     # Is the database connexion initialized ?
     if not Database.is_ready():
         Database.on()
Esempio n. 2
0
    def __init__(self, autoload=True):
        """
        Constructor
        :param autoload: Automaticaly load parameters as attributes ?
        :rtype: ParamsTable
        """
        # Is the database connexion initialized ?
        if not Database.is_ready():
            Database.on()

        # Load parameters as attributes
        if autoload:
            self.load()