We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, when constructing Result types (e.g. for the mock API), something like the following logic has to be used:
Result
Field<Integer> key = DSL.field("key", Integer.class); Field<String> value = DSL.field("value", String.class); Result<Record2<Integer, String>> result = create.newResult(key, value); result.add(create.newRecord(key, value)); result.get(0).setValue(key, 1); result.get(0).setValue(value, "1"); result.add(create.newRecord(key, value)); result.get(1).setValue(key, 2); result.get(1).setValue(value, "2"); mock[0] = new MockResult(2, result);
This is rather cumbersome and repetitive:
void
Something like this would be much better, conceptually:
mock[0] = new MockResult(2, create.newResult(key, value) .withRecord(1, "1") .withRecord(2, "2") );
The above example is not possible from a generic type safety perspective - but another solution may be.
The text was updated successfully, but these errors were encountered:
I didn't find a better solution for this API in all these years. Closing as won't fix
Sorry, something went wrong.
No branches or pull requests
Currently, when constructing
Result
types (e.g. for the mock API), something like the following logic has to be used:This is rather cumbersome and repetitive:
void
and cannot be chainedSomething like this would be much better, conceptually:
The above example is not possible from a generic type safety perspective - but another solution may be.
The text was updated successfully, but these errors were encountered: