コード例 #1
0
ファイル: query.py プロジェクト: nickeddy/python-irodsclient
 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
コード例 #2
0
ファイル: query.py プロジェクト: BioComputing/irods-qgis
 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
コード例 #3
0
ファイル: query.py プロジェクト: iychoi/python-irodsclient
    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
コード例 #4
0
    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