示例#1
0
文件: orm.py 项目: 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
示例#2
0
文件: orm.py 项目: jdswinbank/tkp
    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
示例#3
0
文件: orm.py 项目: gijzelaerr/tkp-1
    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
示例#4
0
 def setUp(self):
     description = "TestConfigStore"
     self.dataset_id = insert_dataset(description)
示例#5
0
 def setUp(self):
     description = "TestConfigStore"
     self.dataset_id = insert_dataset(description)