Return Excludable for given model and alias. :param model_cls: target model to check :type model_cls: ormar.models.metaclass.ModelMetaclass :param alias: table alias from relation manager :type alias: str :return: Excludable for given model and alias
(self, model_cls: type["Model"], alias: str = "")
| 482 | return exc is not None and bool(exc.include or exc.exclude) |
| 483 | |
| 484 | def get(self, model_cls: type["Model"], alias: str = "") -> Excludable: |
| 485 | """ |
| 486 | Return Excludable for given model and alias. |
| 487 | |
| 488 | :param model_cls: target model to check |
| 489 | :type model_cls: ormar.models.metaclass.ModelMetaclass |
| 490 | :param alias: table alias from relation manager |
| 491 | :type alias: str |
| 492 | :return: Excludable for given model and alias |
| 493 | :rtype: ormar.models.excludable.Excludable |
| 494 | """ |
| 495 | key = self._make_key(model_cls, alias) |
| 496 | excludable = self.items.get(key) |
| 497 | if not excludable: |
| 498 | excludable = Excludable() |
| 499 | self.items[key] = excludable |
| 500 | return excludable |
| 501 | |
| 502 | def build( |
| 503 | self, |