atoti_jdbc.UserContentStorageConfig#

final class atoti_jdbc.UserContentStorageConfig#

The config for storing user content in a separate database.

Example

>>> from atoti_jdbc import UserContentStorageConfig
>>> config = UserContentStorageConfig(
...     "mysql://localhost:7777/example?user=username&password=passwd"
... )
driver: str | None = None#

The driver used to load the data.

This defines Hibernate’s DRIVER option.

Inferred from url if None.

hibernate_options: Mapping[str, str] = {}#

Extra options to pass to Hibernate.

See AvailableSettings.

url: str#

The JDBC connection string of the database.

The jdbc scheme is optional but the database specific scheme (such as h2 or mysql) is mandatory. For instance:

  • "h2:file:/home/user/database/file/path;USER=username;PASSWORD=passwd"

  • "mysql://localhost:7777/example?user=username&password=passwd"

  • "postgresql://postgresql.db.server:5430/example?user=username&password=passwd"

More examples can be found here.

This defines Hibernate’s URL option.