MCPcopy
hub / github.com/django/django / using

Method using

django/db/models/query.py:2479–2489  ·  view source on GitHub ↗

Select the database this RawQuerySet should execute against.

(self, alias)

Source from the content-addressed store, hash-verified

2477 return self._db or router.db_for_read(self.model, **self._hints)
2478
2479 def using(self, alias):
2480 """Select the database this RawQuerySet should execute against."""
2481 return RawQuerySet(
2482 self.raw_query,
2483 model=self.model,
2484 query=self.query.chain(using=alias),
2485 params=self.params,
2486 translations=self.translations,
2487 using=alias,
2488 fetch_mode=self._fetch_mode,
2489 )
2490
2491 @cached_property
2492 def columns(self):

Callers

nothing calls this directly

Calls 2

RawQuerySetClass · 0.85
chainMethod · 0.45

Tested by

no test coverage detected