You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
Expose bot.db_read() and bot.db_store() operations to Cogs that abstract away dealing with any sort of SQL operations. Have the bot DB functions handle connections and commits, as well as exceptions.
The calling Cog's name can be used to define tables or databases to keep data segregated both per-guild and per-module.
If Cogs need to perform complex transactions on the DB for consistency reasons, a lock can be exposed through the bot as well. But a short default timeout should be implented and signaled (configurable through onebot_config).
Meanwhile, this refactor can be used as an opportunity to switch to an async sqlite implementation. (Issue #5)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expose bot.db_read() and bot.db_store() operations to Cogs that abstract away dealing with any sort of SQL operations. Have the bot DB functions handle connections and commits, as well as exceptions.
The calling Cog's name can be used to define tables or databases to keep data segregated both per-guild and per-module.
If Cogs need to perform complex transactions on the DB for consistency reasons, a lock can be exposed through the bot as well. But a short default timeout should be implented and signaled (configurable through onebot_config).
Meanwhile, this refactor can be used as an opportunity to switch to an async sqlite implementation. (Issue #5)
The text was updated successfully, but these errors were encountered: