ahvn.klstore.db_store module

class ahvn.klstore.db_store.DatabaseKLStore(database=None, name=None, condition=None, *args, **kwargs)[源代码]

基类:BaseKLStore

Database-backed KL store using the UKF ORM model.

Minimal, clear implementation that maps UKF ORM rows to BaseUKF objects.

参数:
__init__(database=None, name=None, condition=None, *args, **kwargs)[源代码]

Initialize the database KL store.

参数:
  • database (Optional[str]) -- Database name or path.

  • name (Optional[str]) -- Name of the KLStore instance. If None, defaults to "default".

  • condition (Optional[Callable]) -- Optional upsert/insert condition to apply to the KLStore. KLs that do not satisfy the condition will be ignored. If None, all KLs are accepted.

  • *args -- Additional positional arguments for BaseKLStore.

  • **kwargs -- Additional keyword arguments for BaseKLStore.

close()[源代码]

Closes the store, if applicable.