Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Record to JSON
public class SomeJsonTest {
public void getJsonFromRecord(){
SomethingDao somethingDao = new SomethingDao();
//setConfiguration/ setVertx left out
CompletableFuture<JsonObject> jsonFuture = somethingDao.executeAsync(dslContext -> dslContext
.selectFrom(somethingDao.getTable())
.where(Tables.SOMETHING.SOMEID.eq(1))
.fetchOne())
.thenApply(ISomething::toJson)
;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment