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
I maintain a plugin that needs to persist some values between bot executions. This data is not specific to any channel or nickname, so the existing bot.db.{set,get}_{nick,channel}_value() functions aren't optimal, as they would require fabricating a channel or user, which has other implications including potential collisions. My interim solution of writing the values to the bot.config.pluginname is dirty since these values aren't things the bot owner should need to care about.
Proposed are the following methods within SopelDB:
get_plugin_value(plugin, key)
"""Retrieves the value for a given key associated with a plugin name."""set_plugin_value(plugin, key, value)
"""Sets the value for a given key to be associated with the plugin name."""
The text was updated successfully, but these errors were encountered:
We have already nick_values and channel_values tables, so logically adding a plugin_values table would make sense for this.
Does it need any columns besides plugin, key, and value? All probably type STRING.
Work on this would need to coordinate with #1446, probably by waiting to start implementation until the conversion to SQLAlchemy is done (then this only has to be implemented once, on the new architecture).
I maintain a plugin that needs to persist some values between bot executions. This data is not specific to any channel or nickname, so the existing
bot.db.{set,get}_{nick,channel}_value()
functions aren't optimal, as they would require fabricating a channel or user, which has other implications including potential collisions. My interim solution of writing the values to the bot.config.pluginname is dirty since these values aren't things the bot owner should need to care about.Proposed are the following methods within
SopelDB
:The text was updated successfully, but these errors were encountered: