Skip to content

Instantly share code, notes, and snippets.

@oshai
Created February 13, 2019 08:14
Show Gist options
  • Save oshai/2e759ee34512145c656e7f418cef4310 to your computer and use it in GitHub Desktop.
Save oshai/2e759ee34512145c656e7f418cef4310 to your computer and use it in GitHub Desktop.
request -> {
mySQLClient.getConnection(res -> {
if (res.succeeded()) {
SQLConnection connection = res.result();
// Got a connection
connection.query("SELECT 0", result ->
request.response().end("Got response " + result.result().getNumRows()));
} else {
// Failed to get connection - deal with it
request.response().end("Failed!");
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment