Last active
August 30, 2017 09:51
-
-
Save jklingsporn/3a940a82190ba266f63be524bbca4adb to your computer and use it in GitHub Desktop.
Record into Map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SomeJsonTest { | |
public void getJsonFromRecord2(){ | |
SomethingDao somethingDao = new SomethingDao(); | |
CompletableFuture<JsonObject> jsonFuture = somethingDao.executeAsync(dslContext -> dslContext | |
.select(Tables.SOMETHING.SOMEID) | |
.select(Tables.SOMEOTHERTHING.SOMEVALUE) | |
.join(Tables.SOMEOTHERTHING) | |
.on(Tables.SOMETHING.SOMEID.eq(Tables.SOMEOTHERTHING.SOMEOTHERID)) | |
.where(Tables.SOMETHING.SOMEID.eq(1)) | |
.fetchOneMap()) | |
//or .fetchOne(Record::intoMap) | |
.thenApply(JsonObject::new); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment