def runQuery(self, query, qid): qm = QueryMessage() qm.query = query try: self.queryClient.run(qm, "localhost", getCallbackPort(), qid) except TQueryError as qe: raise Exception(qe.message)
def run(self, query): qm = QueryMessage() qm.query = query try: self.queryClient.runSimple(qm) except TQueryError as qe: raise Exception(qe.message)
def getFirstTuple(self, query): qm = QueryMessage() qm.query = query try: ttuple = self.queryClient.getFirstTuple(qm) except TQueryError as qe: raise Exception(qe.message) return translate(ttuple)