def execute(self): message_body = self._message() message = iRODSMessage("RODS_API_REQ", msg=message_body, int_info=api_number["GEN_QUERY_AN"]) with self.sess.pool.get_connection() as conn: conn.send(message) try: result_message = conn.recv() results = result_message.get_main_message(GenQueryResponse) result_set = ResultSet(results) except CAT_NO_ROWS_FOUND: result_set = ResultSet(empty_gen_query_out(self.columns.keys())) return result_set
def execute(self): message_body = self._message() message = iRODSMessage('RODS_API_REQ', msg=message_body, int_info=api_number['GEN_QUERY_AN']) with self.sess.pool.get_connection() as conn: conn.send(message) try: result_message = conn.recv() results = result_message.get_main_message(GenQueryResponse) result_set = ResultSet(results) except CAT_NO_ROWS_FOUND: result_set = ResultSet(empty_gen_query_out(self.columns.keys())) return result_set
def execute(self): with self.sess.pool.get_connection() as conn: # check server version server_version = tuple(int(token) for token in conn.server_version.replace('rods', '').split('.')) if server_version < (4, 0, 0): self._strip() message_body = self._message() message = iRODSMessage( 'RODS_API_REQ', msg=message_body, int_info=api_number['GEN_QUERY_AN']) conn.send(message) try: result_message = conn.recv() results = result_message.get_main_message(GenQueryResponse) result_set = ResultSet(results) except CAT_NO_ROWS_FOUND: result_set = ResultSet( empty_gen_query_out(list(self.columns.keys()))) return result_set
def execute(self): with self.sess.pool.get_connection() as conn: # check server version server_version = tuple(int(token) for token in conn.server_version.replace('rods', '').split('.')) if server_version < (4, 0, 0): self._strip() message_body = self._message() message = iRODSMessage( 'RODS_API_REQ', msg=message_body, int_info=api_number['GEN_QUERY_AN']) conn.send(message) try: result_message = conn.recv() results = result_message.get_main_message(GenQueryResponse) result_set = ResultSet(results) except CAT_NO_ROWS_FOUND: result_set = ResultSet( empty_gen_query_out(self.columns.keys())) return result_set