def close_session(self, sessionHandle): req = TCloseSessionReq(sessionHandle=sessionHandle) return self._client.CloseSession(req)
def close(self): req = TCloseSessionReq(sessionHandle=self.session) self.client.CloseSession(req)
def close_session(self): session = Session.objects.get_session( self.user, self.query_server['server_name']).get_handle() req = TCloseSessionReq(sessionHandle=session) return self._client.CloseSession(req)
print name, else: print ', ' + name, print print('-' * 32) fetchReq = TFetchResultsReq(operationHandle=opHandle, orientation=TFetchOrientation.FETCH_NEXT, maxRows=100) resultsRes = client.FetchResults(fetchReq) for row in resultsRes.results.rows: for i, col in enumerate(row.colVals): if i == 0: print get_value(col), else: print ', ' + str(get_value(col)), print print('-' * 32) req = TCloseOperationReq(operationHandle=opHandle) client.CloseOperation(req) print "\n# 5) Closing Session..." req = TCloseSessionReq(sessionHandle=session) client.CloseSession(req) print("Bye") except Exception, e: print e