Esempio n. 1
0
File: orm.py Progetto: ajstewart/tkp
 def id(self):
     """Add or obtain an id to/from the table
     """
     if self._id is None:
         try:
             self._id = insert_dataset(self._data['description'])
         except Exception as e:
             logger.error("ORM: error inserting dataset,  %s: %s" % (type(e).__name__, str(e)))
             raise
     return self._id
Esempio n. 2
0
    def id(self):
        """Add or obtain an id to/from the table

        This uses the SQL function insertDataset().
        """
        if self._id is None:
            try:
                self._id = insert_dataset(self._data['description'])
            except self.database.connection.Error, e:
                logger.error("insert dataset failed: %s" % e)
                raise
Esempio n. 3
0
    def id(self):
        """Add or obtain an id to/from the table

        This uses the SQL function insertDataset().
        """
        if self._id is None:
            try:
                self._id = insert_dataset(self._data['description'])
            except Exception as e:
                logger.error("ORM: error inserting dataset,  %s: %s" % (type(e).__name__, str(e)))
                raise
        return self._id
Esempio n. 4
0
 def setUp(self):
     description = "TestConfigStore"
     self.dataset_id = insert_dataset(description)
Esempio n. 5
0
 def setUp(self):
     description = "TestConfigStore"
     self.dataset_id = insert_dataset(description)