inaka / sumo_db

Erlang Persistency Framework
http://inaka.github.io/sumo_db/
Apache License 2.0
174 stars 37 forks source link

Add extra options to doc configuration #239

Closed elbrujohalcon closed 8 years ago

elbrujohalcon commented 8 years ago

As described in inaka/sumo_db_mysql#6, schema names are by design equal to module names for the modules that implement _sumodoc behaviour. That's an undesired limitation that we should avoid by adding an optional extra parameter to each docs configuration where these kinds of things and others can be specified. That way, in situations like the one @jordan0day describes, instead of…

    , { docs
      , [ {user, the_store}
        , …
        ]
      }

…we would have…

    , { docs
      , [ {user, the_store, #{module => my_users}}
        , …
        ]
      }

…or…

    , { docs
      , [ {my_users, the_store, #{schema_name => "user"}}
        , …
        ]
      }
elbrujohalcon commented 8 years ago

After this feature is implemented here, we will need to adjust all the drivers to support it.