exist

判断key是否存在

  1. def exist(self, hash_key, sort_key, timeout=0):
  2. """
  3. Check value exist.
  4. :param hash_key: (str) which hash key used for this API.
  5. :param sort_key: (str) which sort key used for this API.
  6. :param timeout: (int) how long will the operation timeout in milliseconds.
  7. if timeout > 0, it is a timeout value for current operation,
  8. else the timeout value specified to create the instance will be used.
  9. :return: (tuple<error_types.code.value, None>) (code, ign)
  10. code: error_types.ERR_OK.value when data exist, error_types.ERR_OBJECT_NOT_FOUND.value when data not found.
  11. ign: useless, should be ignored.
  12. """