BaseDatabaseWrapper (base/base.py)

django · django/db/backends/base/base.py · python · BSD-3-Clause
database

Core Django database wrapper handling connections, transactions, and queries.

# Source: https://github.com/django/django | License: BSD-3-Clause | Copyright Django Software Foundation and individual contributors
# Provided via justclaw.it.com; keep this notice with the code.
import _thread
import copy
import datetime
import logging
import threading
import time
import warnings
import zoneinfo
from collections import deque
from contextlib import contextmanager
from functools import cached_property

from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import DEFAULT_DB_ALIAS, DatabaseError, NotSupportedError
from django.db.backends import utils
from django.db.backends.base.validation import BaseDatabaseValidation
from django.db.backends.signals import connection_created
from django.db.backends.utils import debug_transa

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key