Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add support for additional collection libraries #117

Open
nicklundin08 opened this issue Mar 2, 2024 · 3 comments
Open

[Feature] Add support for additional collection libraries #117

nicklundin08 opened this issue Mar 2, 2024 · 3 comments

Comments

@nicklundin08
Copy link

Hello!

First off, awesome project - I love using this library as someone who comes from a .NET background 馃殌


One of the Java projects Im working on currently makes use of both JINQ as well as Vavr for collections. One of the things that is kind of annoying is unwrapping all of the vavr types into JVM collection types before passing them into query expressions.

In the example below, the dbCustomers1 query wont work but the dbCustomers2 query will.

var customerIds = io.vavr.List.of("id1", "id2"); //Maybe this comes from an API input or something like that)

var dbCustomers1 = db.stream(CustomerDAO.class)
  .where(c -> customerIds.contains(c.getId())     // Wont work - Jinq doesnt know about vavr collection types
  .collect(io.vavr.List.collector());

var customerIdsAsJavaList = customerIds.toJavaList();

var dbCustomers1 = db.stream(CustomerDAO.class)
  .where(c -> customerIdsAsJavaList .contains(c.getId()) // Will work - happy JINQ noises
  .collect(io.vavr.List.collector());

In this project we also use jackson. They have a module approach to this where you can register custom collection types like this

Im curious if you'd be open to supporting the ability to register other collection types somehow (either by module or some other means).

Thanks!

@my2iu
Copy link
Owner

my2iu commented Mar 3, 2024

Jinq isn't currently under active development. It's in maintenance mode where I just make sure that it continues to run on newer versions of Java and fix any bugs that may arise. No new features are currently planned unless one is urgently needed for some use case.

@nicklundin08
Copy link
Author

No worries. Thanks for all the hard work thus far

@my2iu
Copy link
Owner

my2iu commented Mar 3, 2024

I'll keep the issue open, just to keep track of things that could be improved with the project.

@my2iu my2iu reopened this Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants