-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
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
Allow Contract classes to make modifications to operations #33
Comments
Hi @keyboardr I have the feeling that a fair of amount of users might need to modify the behavior of queries, deletes, inserts and updates. And ProviGen doesn't provide an easy documented way to do it. As you said the user needs to understand how ProviGen works and needs to copy over the full query / delete / insert /update methods to achieve this. So, we probably should do something about it. Now, I don't know what's the best approach. On the first hand if we add a new I think we need to think about this a little bit more and consider all the options we have. What do you think ? |
I've used ProviGen on several projects, and it's gotten to the point that I On Wed, Sep 10, 2014 at 12:37 AM, Timothée Jeannin <[email protected]
|
There's some whitespace and formatting issues, as well as some minor code On Wed, Sep 10, 2014 at 4:35 AM, Josh Brown [email protected] wrote:
|
Allow the Contract classes to specify classes to modify queries, deletes, inserts, and updates.
A primary use case for this would be to allow contract classes to do joins, subselects, group-bys, etc. without modifying the provider subclass (which would normally require copying over the full method).
I'll have a pull request to follow this up, but I wanted to get input on it while I'm working on it. So far my approach is to add a new Modifier annotation and four new interfaces (DeleteModifier, InsertModifier, QueryModifier, and UpdateModifier). Each of the new interfaces would have one method per relevant parameter (table, projection, selection, values, etc), and would take all of the original values as parameters. Contract uses instanceof in its constructor to determine which type of modifier is referenced by the annotation. ProviGenProvider then uses the modifiers when performing the relevant method.
The text was updated successfully, but these errors were encountered: