MCPcopy
hub / github.com/django/django / exists

Method exists

django/db/models/query.py:1430–1436  ·  view source on GitHub ↗

Return True if the QuerySet would have any results, False otherwise.

(self)

Source from the content-addressed store, hash-verified

1428 _update.queryset_only = False
1429
1430 def exists(self):
1431 """
1432 Return True if the QuerySet would have any results, False otherwise.
1433 """
1434 if self._result_cache is None:
1435 return self.query.has_results(using=self.db)
1436 return bool(self._result_cache)
1437
1438 async def aexists(self):
1439 return await sync_to_async(self.exists)()

Callers 15

makedirsFunction · 0.45
iter_modules_and_filesFunction · 0.45
sys_path_directoriesFunction · 0.45
get_child_argumentsFunction · 0.45
_watch_rootMethod · 0.45
_subscribe_dirMethod · 0.45
_watch_globMethod · 0.45
all_locale_pathsFunction · 0.45
set_headersMethod · 0.45
load_tests_for_labelMethod · 0.45
find_top_levelFunction · 0.45

Calls 1

has_resultsMethod · 0.45

Tested by

no test coverage detected