This is a collection of modules that I've released over the years. Most of them stand alone, or have just one or two dependencies in here, so you don't have to download this whole repo.
Handle when "" is passed to t1 or t2.
Currently if "" gets passed to t1 or t2 it will just result in a compilation error. This pr handles that case by not generating the respective function if t1 or t2 is left empty. Example
struct Role { int id; }
struct User {
int id;
@ForeignKey!(Role.id, "") int role_id;
}
mixin(one_to_many(User.role_id, "role", ""));
Database db = ...
User user = ...
Role role = user.get_role(db); // Works
auto users = role.get_users(db); // Error get_users doesn't exist
Handle when "" is passed to t1 or t2. Currently if "" gets passed to t1 or t2 it will just result in a compilation error. This pr handles that case by not generating the respective function if t1 or t2 is left empty. Example
EDIT: fix example