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
neat way to pass a query #79
Comments
I'm personally not a fan of this. I think sql2o is the best lite ORM for java because of its simplicity, lack of code generation, and easy configuration. There are a few other orms that use annotations like these (see our performance tests for examples). I think this lib should stick roughly to its current api |
I'm not saying don't add it, just that I don't think it should live in the core sql2o that most people will use. Maybe we could make a separate maven artifact like "org.sql2o.extensions -> sql2o-annotations" that has this functionality |
@aldenquimby |
Ok I'm cool with adding this as an extension 👍. Maybe part of a 2.1 release. We've got a few things to wrap up for 1.5, then a bunch of refactoring for 2.0. |
@aldenquimby and this is initial unit-test |
Interesting. After the 2.0 release we can make an extension artifact for it and you can put that code there. Also I think things may end up getting much more complicated than this. MyBatis supports annotations like this for all sql calls, and from looking at their code, it ends up being a pretty large undertaking. What would you want to call the package? |
@aldenquimby sql2o.toDAO(DAO.class) instead of DAOFactory.toDAO(sql2o, DAO.class) unfortunally Java doesnt't have sexy 'extensions methods' features like C# so it's impossible to add |
I support the idea of a sql2o-annotations extension. I would like to keep this out of the core library. We should not introduce any annotations or similar in the core-lib. When that is said, I really like the concept, and I think it could become an awesome extension! Other ideas for an 'annotations' extension, is annotations for generating entities (or pojos) through a constructor. Similar to jackson JsonCreator annotation. And maybe support for some JPA-annotations. But all of this should not be a part of the core library. |
this can be done via external ResultSetHandlerFactory |
well, how to remove my annotations-related commits from pull request? |
get the commit-id of the commit with:
You should pick the commit-id below the first commit you would like the remove. I guess the id you are looking for is e9216c1 to remove the commit
This will remove the commit and unstage your changes. It will not remove any code you have written. If you want to keep the code in another branch, you can create the branch, checkout the branch and commit to the branch.
To get back to your master-branch
|
@aaberg after I perform
|
That is because git by default won't allow you to push anything that will remove commit from server. You have to force push.
Sorry I forgot to mention this before. |
thanx! 2014-04-08 22:55 GMT+04:00 Lars Aaberg notifications@github.com:
|
The issue 10 years old. Closing. |
https://github.com/EtnaSoftwareSystems/ormia
we can implement this in sql2o using already existing infrastructure
The text was updated successfully, but these errors were encountered: