MCPcopy Index your code
hub / github.com/tortoise/tortoise-orm / db

Method db

tortoise/models.py:291–296  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

289
290 @property
291 def db(self) -> BaseDBAsyncClient:
292 if self.default_connection is None:
293 raise ConfigurationError(
294 f"default_connection for the model {self._model} cannot be None"
295 )
296 return get_connection(self.default_connection)
297
298 @property
299 def ordering(self) -> tuple[tuple[str, Order], ...]:

Callers 15

dbFunction · 0.45
_is_asyncpgFunction · 0.45
_is_psycopgFunction · 0.45
_is_mysqlFunction · 0.45
_is_odbcFunction · 0.45
_sql_contextFunction · 0.45
test_char_fuzzFunction · 0.45
test_filter_exactFunction · 0.45
test_single_whenFunction · 0.45
test_multi_whenFunction · 0.45

Calls 2

ConfigurationErrorClass · 0.90
get_connectionFunction · 0.90

Tested by 15

dbFunction · 0.36
_is_asyncpgFunction · 0.36
_is_psycopgFunction · 0.36
_is_mysqlFunction · 0.36
_is_odbcFunction · 0.36
_sql_contextFunction · 0.36
test_char_fuzzFunction · 0.36
test_filter_exactFunction · 0.36
test_single_whenFunction · 0.36
test_multi_whenFunction · 0.36