Skip to content

Instantly share code, notes, and snippets.

@jklingsporn
Last active August 30, 2017 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jklingsporn/93748f0dca09421051e2e4671a4fa5ea to your computer and use it in GitHub Desktop.
Save jklingsporn/93748f0dca09421051e2e4671a4fa5ea to your computer and use it in GitHub Desktop.
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