-
Notifications
You must be signed in to change notification settings - Fork 357
Support for PagingRepositories [DATAJDBC-101] #336
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
Comments
Jens Schauder commented Spring Batch contains various implementations of |
Milan Milanov commented Hi there, Jens Schauder, Mark Paluch. I saw that https://github.com/spring-projects/spring-data-jdbc/pull/125 was merged some time ago, but the paging/sorting repository is still not available. Since I'm interested in having this feature I thought I can try and implement it myself. Some questions:
Kind regards, Milan |
Jens Schauder commented Hi Milan Milanov,
A sketch how to implement this:
|
Milan Milanov commented Hi Jens Schauder, i took a look at the project and the task yesterday. Kudos for the easier to reason about abstractions. I'm now looking at at the SelectBuilder.SelectAndFrom selectBuilder = StatementBuilder.select(columnExpressions);
Sort s = null;
Pageable p = null;
if (!joinTables.isEmpty()) {
SelectBuilder.SelectJoin baseSelect = selectBuilder.from(table);
for (Join join : joinTables) {
baseSelect = baseSelect.leftOuterJoin(join.joinTable).on(join.joinColumn).equals(join.parentId);
}
return ((SelectBuilder.SelectFromAndJoinCondition) baseSelect).limitOffset(p.getPageSize(), p.getOffset()).orderBy(<orders>);
} else {
return selectBuilder.from(table).orderBy(<orders>).limitOffset(p.getPageSize(), p.getOffset());
} So, now my questions are:
|
Jens Schauder commented
|
Milan Milanov commented Hello again. I did some actual work on this issue and have the following new questions:
|
Jens Schauder commented
I hope that helps. Feel free to ask if you have more questions |
Milan Milanov commented Yup, one more round, hopefully one of the last ones:
|
Jens Schauder commented
|
Milan Milanov commented Hi Jens Schauder, some time passed but i'm back onto this issue now. One more question - in the |
Jens Schauder commented The variant that I'd prefer is to create an
You should base your work on https://github.com/spring-projects/spring-data-jdbc/pull/182 since it actually introduces dialects in Spring Data JDBC |
Jens Schauder commented Also I want this to get in the next GA release, so please don't take to much time, otherwise I'd have to implement it myself |
Milan Milanov commented Okay, i'll take a look at the PR and try to base my changes onto it. I'll write here in a few days to let you know how it goes so you can decide how to proceed |
Milan Milanov commented Opened #183. Feedback welcome |
Jens Schauder opened DATAJDBC-101 and commented
Issue Links:
Referenced from: pull request #183
7 votes, 9 watchers
The text was updated successfully, but these errors were encountered: