We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace {model, event_manager_module} instead of {doc_module, event_manager_module}
{model, event_manager_module}
{doc_module, event_manager_module}
The text was updated successfully, but these errors were encountered:
@Euen (/cc @elbrujohalcon) I think we support this already, we actually are handling the event in that way {model, event_manager_module}, check this out: https://github.com/inaka/sumo_db/blob/master/src/sumo_config.erl#L47
As you can see, the event config is defined as {DocName :: atom(), EventHandler :: module()}, where the DocName is the name of the model.
{DocName :: atom(), EventHandler :: module()}
DocName
What we can do is make it more explicit, like this:
-type event_config() :: {SchemaName :: sumo:schema_name(), EventHandler :: module()}.
And this actually applies to the doc config as well:
-type doc_config() :: {SchemaName :: sumo:schema_name(), Store :: atom(), Props :: map()}.
What do you guys think?
Sorry, something went wrong.
@cabol I'm not sure… I think @Euen and I needed to use the module in our config files for this to work. Are you sure it works, despite of that spec?
And yes… you can use sumo:schema_name() there, I'm cool with that.
sumo:schema_name()
No branches or pull requests
Replace
{model, event_manager_module}
instead of{doc_module, event_manager_module}
The text was updated successfully, but these errors were encountered: