services¶
Service declaration for the guilds domain.
Guild services.
- class byte_bot.server.domain.guilds.services.AllowedUsersConfigRepository(*, statement: ~sqlalchemy.sql.selectable.Select | None = None, session: ~sqlalchemy.ext.asyncio.session.AsyncSession | ~sqlalchemy.ext.asyncio.scoping.async_scoped_session[~sqlalchemy.ext.asyncio.session.AsyncSession], auto_expunge: bool = False, auto_refresh: bool = True, auto_commit: bool = False, order_by: list[tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any]] | tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any] | None = None, error_messages: ~advanced_alchemy.exceptions.ErrorMessages | type[~advanced_alchemy.utils.dataclass.Empty] | None = <class 'advanced_alchemy.utils.dataclass.Empty'>, load: ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any]]] | ~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~sqlalchemy.sql.base.ExecutableOption | ~collections.abc.Sequence[~sqlalchemy.sql.base.ExecutableOption] | None = None, execution_options: dict[str, ~typing.Any] | None = None, wrap_exceptions: bool = True, uniquify: bool | None = None, count_with_window_function: bool | None = None, **kwargs: ~typing.Any)[source]¶
 Bases:
SQLAlchemyAsyncRepository[AllowedUsersConfig]AllowedUsersConfig SQLAlchemy 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
wrap_exceptions – Wrap SQLAlchemy exceptions in a
RepositoryError. When set toFalse, the original exception will be raised.uniquify – Optionally apply the
unique()method to results before returning.count_with_window_function – When false, list and count will use two queries instead of an analytical window function.
**kwargs – Additional arguments.
- model_type¶
 alias of
AllowedUsersConfig
- class byte_bot.server.domain.guilds.services.AllowedUsersConfigService(session: ~sqlalchemy.ext.asyncio.session.AsyncSession | ~sqlalchemy.ext.asyncio.scoping.async_scoped_session[~sqlalchemy.ext.asyncio.session.AsyncSession], *, statement: ~sqlalchemy.sql.selectable.Select | None = None, auto_expunge: bool = False, auto_refresh: bool = True, auto_commit: bool = False, order_by: list[tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any]] | tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any] | None = None, error_messages: ~advanced_alchemy.exceptions.ErrorMessages | type[~advanced_alchemy.utils.dataclass.Empty] | None = <class 'advanced_alchemy.utils.dataclass.Empty'>, wrap_exceptions: bool = True, load: ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any]]] | ~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~sqlalchemy.sql.base.ExecutableOption | ~collections.abc.Sequence[~sqlalchemy.sql.base.ExecutableOption] | None = None, execution_options: dict[str, ~typing.Any] | None = None, uniquify: bool | None = None, count_with_window_function: bool | None = None, **repo_kwargs: ~typing.Any)[source]¶
 Bases:
SQLAlchemyAsyncRepositoryService[AllowedUsersConfig, Any]Handles basic operations for the guilds’ Allowed Users config.
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
wrap_exceptions – Wrap exceptions in a RepositoryError
load – Set default relationships to be loaded
execution_options – Set default execution options
uniquify – Optionally apply the
unique()method to results before returning.count_with_window_function – When false, list and count will use two queries instead of an analytical window function.
**repo_kwargs – passed as keyword args to repo instantiation.
- repository_type¶
 alias of
AllowedUsersConfigRepository
- match_fields: ClassVar[list[str] | str | None] = ['guild_id']¶
 List of dialects that prefer to use
field.id = ANY(:1)instead offield.id IN (...).
- async to_model(data: ModelDictT[AllowedUsersConfig], operation: str | None = None) AllowedUsersConfig[source]¶
 Convert data to a model.
- Parameters:
 data (AllowedUsersConfig | dict[str, Any]) – Data to convert to a model
operation (str | None) – Operation to perform on the data
- Returns:
 Converted model
- Return type:
 Project
- class byte_bot.server.domain.guilds.services.ForumConfigRepository(*, statement: ~sqlalchemy.sql.selectable.Select | None = None, session: ~sqlalchemy.ext.asyncio.session.AsyncSession | ~sqlalchemy.ext.asyncio.scoping.async_scoped_session[~sqlalchemy.ext.asyncio.session.AsyncSession], auto_expunge: bool = False, auto_refresh: bool = True, auto_commit: bool = False, order_by: list[tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any]] | tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any] | None = None, error_messages: ~advanced_alchemy.exceptions.ErrorMessages | type[~advanced_alchemy.utils.dataclass.Empty] | None = <class 'advanced_alchemy.utils.dataclass.Empty'>, load: ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any]]] | ~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~sqlalchemy.sql.base.ExecutableOption | ~collections.abc.Sequence[~sqlalchemy.sql.base.ExecutableOption] | None = None, execution_options: dict[str, ~typing.Any] | None = None, wrap_exceptions: bool = True, uniquify: bool | None = None, count_with_window_function: bool | None = None, **kwargs: ~typing.Any)[source]¶
 Bases:
SQLAlchemyAsyncRepository[ForumConfig]ForumConfig SQLAlchemy 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
wrap_exceptions – Wrap SQLAlchemy exceptions in a
RepositoryError. When set toFalse, the original exception will be raised.uniquify – Optionally apply the
unique()method to results before returning.count_with_window_function – When false, list and count will use two queries instead of an analytical window function.
**kwargs – Additional arguments.
- model_type¶
 alias of
ForumConfig
- class byte_bot.server.domain.guilds.services.ForumConfigService(session: ~sqlalchemy.ext.asyncio.session.AsyncSession | ~sqlalchemy.ext.asyncio.scoping.async_scoped_session[~sqlalchemy.ext.asyncio.session.AsyncSession], *, statement: ~sqlalchemy.sql.selectable.Select | None = None, auto_expunge: bool = False, auto_refresh: bool = True, auto_commit: bool = False, order_by: list[tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any]] | tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any] | None = None, error_messages: ~advanced_alchemy.exceptions.ErrorMessages | type[~advanced_alchemy.utils.dataclass.Empty] | None = <class 'advanced_alchemy.utils.dataclass.Empty'>, wrap_exceptions: bool = True, load: ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any]]] | ~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~sqlalchemy.sql.base.ExecutableOption | ~collections.abc.Sequence[~sqlalchemy.sql.base.ExecutableOption] | None = None, execution_options: dict[str, ~typing.Any] | None = None, uniquify: bool | None = None, count_with_window_function: bool | None = None, **repo_kwargs: ~typing.Any)[source]¶
 Bases:
SQLAlchemyAsyncRepositoryService[ForumConfig, Any]Handles basic operations for the guilds’ Forum config.
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
wrap_exceptions – Wrap exceptions in a RepositoryError
load – Set default relationships to be loaded
execution_options – Set default execution options
uniquify – Optionally apply the
unique()method to results before returning.count_with_window_function – When false, list and count will use two queries instead of an analytical window function.
**repo_kwargs – passed as keyword args to repo instantiation.
- repository_type¶
 alias of
AllowedUsersConfigRepository
- match_fields: ClassVar[list[str] | str | None] = ['guild_id']¶
 List of dialects that prefer to use
field.id = ANY(:1)instead offield.id IN (...).
- async to_model(data: ModelDictT[ForumConfig], operation: str | None = None) ForumConfig[source]¶
 Convert data to a model.
- Parameters:
 data (ForumConfig | dict[str, Any]) – Data to convert to a model
operation (str | None) – Operation to perform on the data
- Returns:
 Converted model
- Return type:
 Project
- class byte_bot.server.domain.guilds.services.GitHubConfigRepository(*, statement: ~sqlalchemy.sql.selectable.Select | None = None, session: ~sqlalchemy.ext.asyncio.session.AsyncSession | ~sqlalchemy.ext.asyncio.scoping.async_scoped_session[~sqlalchemy.ext.asyncio.session.AsyncSession], auto_expunge: bool = False, auto_refresh: bool = True, auto_commit: bool = False, order_by: list[tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any]] | tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any] | None = None, error_messages: ~advanced_alchemy.exceptions.ErrorMessages | type[~advanced_alchemy.utils.dataclass.Empty] | None = <class 'advanced_alchemy.utils.dataclass.Empty'>, load: ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any]]] | ~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~sqlalchemy.sql.base.ExecutableOption | ~collections.abc.Sequence[~sqlalchemy.sql.base.ExecutableOption] | None = None, execution_options: dict[str, ~typing.Any] | None = None, wrap_exceptions: bool = True, uniquify: bool | None = None, count_with_window_function: bool | None = None, **kwargs: ~typing.Any)[source]¶
 Bases:
SQLAlchemyAsyncRepository[GitHubConfig]GitHubConfig SQLAlchemy 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
wrap_exceptions – Wrap SQLAlchemy exceptions in a
RepositoryError. When set toFalse, the original exception will be raised.uniquify – Optionally apply the
unique()method to results before returning.count_with_window_function – When false, list and count will use two queries instead of an analytical window function.
**kwargs – Additional arguments.
- model_type¶
 alias of
GitHubConfig
- class byte_bot.server.domain.guilds.services.GitHubConfigService(session: ~sqlalchemy.ext.asyncio.session.AsyncSession | ~sqlalchemy.ext.asyncio.scoping.async_scoped_session[~sqlalchemy.ext.asyncio.session.AsyncSession], *, statement: ~sqlalchemy.sql.selectable.Select | None = None, auto_expunge: bool = False, auto_refresh: bool = True, auto_commit: bool = False, order_by: list[tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any]] | tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any] | None = None, error_messages: ~advanced_alchemy.exceptions.ErrorMessages | type[~advanced_alchemy.utils.dataclass.Empty] | None = <class 'advanced_alchemy.utils.dataclass.Empty'>, wrap_exceptions: bool = True, load: ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any]]] | ~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~sqlalchemy.sql.base.ExecutableOption | ~collections.abc.Sequence[~sqlalchemy.sql.base.ExecutableOption] | None = None, execution_options: dict[str, ~typing.Any] | None = None, uniquify: bool | None = None, count_with_window_function: bool | None = None, **repo_kwargs: ~typing.Any)[source]¶
 Bases:
SQLAlchemyAsyncRepositoryService[GitHubConfig, Any]Handles basic operations for the guilds’ GitHub config.
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
wrap_exceptions – Wrap exceptions in a RepositoryError
load – Set default relationships to be loaded
execution_options – Set default execution options
uniquify – Optionally apply the
unique()method to results before returning.count_with_window_function – When false, list and count will use two queries instead of an analytical window function.
**repo_kwargs – passed as keyword args to repo instantiation.
- repository_type¶
 alias of
GitHubConfigRepository
- match_fields: ClassVar[list[str] | str | None] = ['guild_id']¶
 List of dialects that prefer to use
field.id = ANY(:1)instead offield.id IN (...).
- async to_model(data: ModelDictT[GitHubConfig], operation: str | None = None) GitHubConfig[source]¶
 Convert data to a model.
- Parameters:
 data (GitHubConfig | dict[str, Any]) – Data to convert to a model
operation (str | None) – Operation to perform on the data
- Returns:
 Converted model
- Return type:
 Project
- class byte_bot.server.domain.guilds.services.GuildsRepository(*, statement: ~sqlalchemy.sql.selectable.Select | None = None, session: ~sqlalchemy.ext.asyncio.session.AsyncSession | ~sqlalchemy.ext.asyncio.scoping.async_scoped_session[~sqlalchemy.ext.asyncio.session.AsyncSession], auto_expunge: bool = False, auto_refresh: bool = True, auto_commit: bool = False, order_by: list[tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any]] | tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any] | None = None, error_messages: ~advanced_alchemy.exceptions.ErrorMessages | type[~advanced_alchemy.utils.dataclass.Empty] | None = <class 'advanced_alchemy.utils.dataclass.Empty'>, load: ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any]]] | ~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~sqlalchemy.sql.base.ExecutableOption | ~collections.abc.Sequence[~sqlalchemy.sql.base.ExecutableOption] | None = None, execution_options: dict[str, ~typing.Any] | None = None, wrap_exceptions: bool = True, uniquify: bool | None = None, count_with_window_function: bool | None = None, **kwargs: ~typing.Any)[source]¶
 Bases:
SQLAlchemyAsyncSlugRepository[Guild]Guilds SQLAlchemy 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
wrap_exceptions – Wrap SQLAlchemy exceptions in a
RepositoryError. When set toFalse, the original exception will be raised.uniquify – Optionally apply the
unique()method to results before returning.count_with_window_function – When false, list and count will use two queries instead of an analytical window function.
**kwargs – Additional arguments.
- class byte_bot.server.domain.guilds.services.GuildsService(session: ~sqlalchemy.ext.asyncio.session.AsyncSession | ~sqlalchemy.ext.asyncio.scoping.async_scoped_session[~sqlalchemy.ext.asyncio.session.AsyncSession], *, statement: ~sqlalchemy.sql.selectable.Select | None = None, auto_expunge: bool = False, auto_refresh: bool = True, auto_commit: bool = False, order_by: list[tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any]] | tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any] | None = None, error_messages: ~advanced_alchemy.exceptions.ErrorMessages | type[~advanced_alchemy.utils.dataclass.Empty] | None = <class 'advanced_alchemy.utils.dataclass.Empty'>, wrap_exceptions: bool = True, load: ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any]]] | ~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~sqlalchemy.sql.base.ExecutableOption | ~collections.abc.Sequence[~sqlalchemy.sql.base.ExecutableOption] | None = None, execution_options: dict[str, ~typing.Any] | None = None, uniquify: bool | None = None, count_with_window_function: bool | None = None, **repo_kwargs: ~typing.Any)[source]¶
 Bases:
SQLAlchemyAsyncRepositoryService[Guild, Any]Handles basic operations for a guild.
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
wrap_exceptions – Wrap exceptions in a RepositoryError
load – Set default relationships to be loaded
execution_options – Set default execution options
uniquify – Optionally apply the
unique()method to results before returning.count_with_window_function – When false, list and count will use two queries instead of an analytical window function.
**repo_kwargs – passed as keyword args to repo instantiation.
- repository_type¶
 alias of
GuildsRepository
- class byte_bot.server.domain.guilds.services.SOTagsConfigRepository(*, statement: ~sqlalchemy.sql.selectable.Select | None = None, session: ~sqlalchemy.ext.asyncio.session.AsyncSession | ~sqlalchemy.ext.asyncio.scoping.async_scoped_session[~sqlalchemy.ext.asyncio.session.AsyncSession], auto_expunge: bool = False, auto_refresh: bool = True, auto_commit: bool = False, order_by: list[tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any]] | tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any] | None = None, error_messages: ~advanced_alchemy.exceptions.ErrorMessages | type[~advanced_alchemy.utils.dataclass.Empty] | None = <class 'advanced_alchemy.utils.dataclass.Empty'>, load: ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any]]] | ~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~sqlalchemy.sql.base.ExecutableOption | ~collections.abc.Sequence[~sqlalchemy.sql.base.ExecutableOption] | None = None, execution_options: dict[str, ~typing.Any] | None = None, wrap_exceptions: bool = True, uniquify: bool | None = None, count_with_window_function: bool | None = None, **kwargs: ~typing.Any)[source]¶
 Bases:
SQLAlchemyAsyncRepository[SOTagsConfig]SOTagsConfig SQLAlchemy 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
wrap_exceptions – Wrap SQLAlchemy exceptions in a
RepositoryError. When set toFalse, the original exception will be raised.uniquify – Optionally apply the
unique()method to results before returning.count_with_window_function – When false, list and count will use two queries instead of an analytical window function.
**kwargs – Additional arguments.
- model_type¶
 alias of
SOTagsConfig
- class byte_bot.server.domain.guilds.services.SOTagsConfigService(session: ~sqlalchemy.ext.asyncio.session.AsyncSession | ~sqlalchemy.ext.asyncio.scoping.async_scoped_session[~sqlalchemy.ext.asyncio.session.AsyncSession], *, statement: ~sqlalchemy.sql.selectable.Select | None = None, auto_expunge: bool = False, auto_refresh: bool = True, auto_commit: bool = False, order_by: list[tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any]] | tuple[str | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any], bool] | ~sqlalchemy.sql.elements.UnaryExpression[~typing.Any] | None = None, error_messages: ~advanced_alchemy.exceptions.ErrorMessages | type[~advanced_alchemy.utils.dataclass.Empty] | None = <class 'advanced_alchemy.utils.dataclass.Empty'>, wrap_exceptions: bool = True, load: ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~collections.abc.Sequence[~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any]]] | ~sqlalchemy.orm.strategy_options._AbstractLoad | ~typing.Literal['*'] | ~sqlalchemy.orm.attributes.InstrumentedAttribute[~typing.Any] | ~sqlalchemy.orm.relationships.RelationshipProperty[~typing.Any] | ~sqlalchemy.orm.interfaces.MapperProperty[~typing.Any] | ~sqlalchemy.sql.base.ExecutableOption | ~collections.abc.Sequence[~sqlalchemy.sql.base.ExecutableOption] | None = None, execution_options: dict[str, ~typing.Any] | None = None, uniquify: bool | None = None, count_with_window_function: bool | None = None, **repo_kwargs: ~typing.Any)[source]¶
 Bases:
SQLAlchemyAsyncRepositoryService[SOTagsConfig, Any]Handles basic operations for the guilds’ StackOverflow tags config.
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
wrap_exceptions – Wrap exceptions in a RepositoryError
load – Set default relationships to be loaded
execution_options – Set default execution options
uniquify – Optionally apply the
unique()method to results before returning.count_with_window_function – When false, list and count will use two queries instead of an analytical window function.
**repo_kwargs – passed as keyword args to repo instantiation.
- repository_type¶
 alias of
SOTagsConfigRepository
- match_fields: ClassVar[list[str] | str | None] = ['guild_id']¶
 List of dialects that prefer to use
field.id = ANY(:1)instead offield.id IN (...).
- async to_model(data: ModelDictT[SOTagsConfig], operation: str | None = None) SOTagsConfig[source]¶
 Convert data to a model.
- Parameters:
 data (SOTagsConfig | dict[str, Any]) – Data to convert to a model
operation (str | None) – Operation to perform on the data
- Returns:
 Converted model
- Return type:
 Project