def getExpressionLevelById(self, expressionId): """ :param expressionId: the ExpressionLevel ID :return: dictionary representing an ExpressionLevel object, or None if no match is found. """ sql = ("SELECT * FROM Expression WHERE id = ?") query = self._dbconn.execute(sql, (expressionId, )) try: return sqlite_backend.fetchOne(query) except AttributeError: raise exceptions.ExpressionLevelNotFoundException(expressionId)
def getExpressionLevelById(self, expressionId): """ :param expressionId: the ExpressionLevel ID :return: dictionary representing an ExpressionLevel object, or None if no match is found. """ sql = ("SELECT * FROM Expression WHERE id = ?") query = self._dbconn.execute(sql, (expressionId,)) try: return sqlite_backend.fetchOne(query) except AttributeError: raise exceptions.ExpressionLevelNotFoundException( expressionId)
def getRnaQuantificationById(self, rnaQuantificationId): """ :param rnaQuantificationId: the RNA Quantification ID :return: dictionary representing an RnaQuantification object, or None if no match is found. """ sql = ("SELECT * FROM RnaQuantification WHERE id = ?") query = self._dbconn.execute(sql, (rnaQuantificationId,)) try: return sqlite_backend.fetchOne(query) except AttributeError: raise exceptions.RnaQuantificationNotFoundException( rnaQuantificationId)
def getRnaQuantificationById(self, rnaQuantificationId): """ :param rnaQuantificationId: the RNA Quantification ID :return: dictionary representing an RnaQuantification object, or None if no match is found. """ sql = ("SELECT * FROM RnaQuantification WHERE id = ?") query = self._dbconn.execute(sql, (rnaQuantificationId, )) try: return sqlite_backend.fetchOne(query) except AttributeError: raise exceptions.RnaQuantificationNotFoundException( rnaQuantificationId)
def fetchOneMethod(self): sql = "SELECT id, name FROM ReadGroup LIMIT 1" query = self._dbconn.execute(sql) rowDict = sqlite_backend.fetchOne(query) return rowDict