Ejemplo n.º 1
0
Archivo: models.py Proyecto: ziq211/hue
  def get_rpc_handle(self):
    secret, guid = self.get_decoded(self.secret, self.guid)

    operation = getattr(TOperationType, TOperationType._NAMES_TO_VALUES.get(self.operation_type, 'EXECUTE_STATEMENT'))
    return TOperationHandle(operationId=THandleIdentifier(guid=guid, secret=secret),
                            operationType=operation,
                            hasResultSet=self.has_result_set,
                            modifiedRowCount=self.modified_row_count)
Ejemplo n.º 2
0
 def _make_operation_handle(secret, guid):
     if secret is None or guid is None:
         return None
     operation_id = THandleIdentifier(secret=secret, guid=guid)
     return TOperationHandle(hasResultSet=True,
                             modifiedRowCount=None,
                             operationType=0,
                             operationId=operation_id)