services¶
Services for the tags domain.
- class app.domain.tags.services.TagService(session: AsyncSession | async_scoped_session[AsyncSession], *, statement: Select[Any] | None = None, auto_expunge: bool = False, auto_refresh: bool = True, auto_commit: bool = False, order_by: list[OrderingPair] | OrderingPair | None = None, error_messages: ErrorMessages | None | EmptyType = <class 'advanced_alchemy.utils.dataclass.Empty'>, load: LoadSpec | None = None, execution_options: dict[str, Any] | None = None, **repo_kwargs: Any)[source]¶
Bases:
SQLAlchemyAsyncRepositoryService
[Tag
, Any]Handles basic lookup operations for an Tag.
Configure the service object.
- Parameters:
session – Session managing the unit-of-work for the operation.
statement – To facilitate customization of the underlying select query.
auto_expunge – Remove object from session before returning.
auto_refresh – Refresh object from session before returning.
auto_commit – Commit objects before returning.
order_by – Set default order options for queries.
error_messages – A set of custom error messages to use for operations
load – Set default relationships to be loaded
execution_options – Set default execution options
**repo_kwargs – passed as keyword args to repo instantiation.
- class Repository(*, statement: Select[tuple[ModelT]] | None = None, session: AsyncSession | async_scoped_session[AsyncSession], auto_expunge: bool = False, auto_refresh: bool = True, auto_commit: bool = False, order_by: list[OrderingPair] | OrderingPair | None = None, error_messages: ErrorMessages | None | EmptyType = <class 'advanced_alchemy.utils.dataclass.Empty'>, load: LoadSpec | None = None, execution_options: dict[str, Any] | None = None, **kwargs: Any)[source]¶
Bases:
SQLAlchemyAsyncRepository
[Tag
]Tag Repository.
Repository for SQLAlchemy models.
- Parameters:
statement – To facilitate customization of the underlying select query.
session – Session managing the unit-of-work for the operation.
auto_expunge – Remove object from session before returning.
auto_refresh – Refresh object from session before returning.
auto_commit – Commit objects before returning.
order_by – Set default order options for queries.
load – Set default relationships to be loaded
execution_options – Set default execution options
error_messages – A set of custom error messages to use for operations
**kwargs – Additional arguments.
- model_type¶
alias of
Tag
- repository_type¶
alias of
Repository