Method
__init__
(
self,
model: type[MODEL],
db: BaseDBAsyncClient,
objects: Iterable[MODEL],
batch_size: int | None = None,
ignore_conflicts: bool = False,
update_fields: Iterable[str] | None = None,
on_conflict: Iterable[str] | None = None,
)
Source from the content-addressed store, hash-verified
| 2019 | ) |
| 2020 | |
| 2021 | def __init__( |
| 2022 | self, |
| 2023 | model: type[MODEL], |
| 2024 | db: BaseDBAsyncClient, |
| 2025 | objects: Iterable[MODEL], |
| 2026 | batch_size: int | None = None, |
| 2027 | ignore_conflicts: bool = False, |
| 2028 | update_fields: Iterable[str] | None = None, |
| 2029 | on_conflict: Iterable[str] | None = None, |
| 2030 | ): |
| 2031 | super().__init__(model) |
| 2032 | self._objects = objects |
| 2033 | self._ignore_conflicts = ignore_conflicts |
| 2034 | self._batch_size = batch_size |
| 2035 | self._db = db |
| 2036 | self._update_fields = update_fields |
| 2037 | self._on_conflict = on_conflict |
| 2038 | |
| 2039 | def _analyze_db_default_fields(self, columns: list[str]) -> set[str]: |
| 2040 | """Classify each db_default field across all instances. |
Callers
nothing calls this directly
Tested by
no test coverage detected