3 ms·
This is a custom expression language to work within the expressive limitations of the language: create.select(BOOK.TITLE) .from(BOOK) .where(BO
by mythz 2y ago
This is a custom expression language to work within the expressive limitations of the language:
create.select(BOOK.TITLE)
.from(BOOK)
.where(BOOK.PUBLISHED_IN.eq(2011))
.orderBy(BOOK.TITLE)
If Java supported LINQ you'd be able to use a more intuitive and natural Java expression syntax instead:
create.from<Book>()
.where(x -> x.publishedIn == 2011)
.orderBy(x -> x.title)
.select(x -> x.title);
- pjmlp 2y agoJava streams are what you're looking for. If you insist in telling LINQ === EF, well that isn't what most folks in .NET use System.Linq for. And back to the ORM thing, jOOQ is one way, there are others, and even if it isn't 1:1 to "from x select whatever" the approach exists.
- mythz 2y ago> If you insist in telling LINQ === EF I don't use EF, nor have I ever mentioned it. You're replying to a thread about what it takes to implement a LINQ provider, which was dismissed as every high level language implements it with iterables, then proceed to give non-equivalent examples.
- recursive 2y agoIQueryable<> manipulation has other tools available to it than brute-force iteration, like streams do. Streams may be the closest thing java has, but it's still a fundamentally different thing.