I’m trying to create a general library which would have all methods for managing data on our database.
This library will have a lot of methods so I would like to make it more organized. I would like it to be used with the following syntax.
db.setData().insertNewAccount(username, password);
db.modifyData().deleteAccount(username, password);
db.getData().getAccount();
How would I make it work like that if I type setData for example methods related to setData would show up.
If you really want to do it that way, then you could do something like this (pseudo code):
And then you could do it your way, more fluently: