Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
QueryRunner runner = new QueryRunner(dataSource);
try
{
// Execute the SQL insert statement
runner.insert("INSERT INTO Person (name,height) VALUES (:name,:height)")
.bind("name", "John Doe")
.bind("height", 1.82)
.execute();
// Now it's time to rise to the occation...
int updates = runner.update("UPDATE Person SET height=:height WHERE name=:name")
.bind("name", "John Doe")
.bind("height", 2.05)
.execute();
}
catch(SQLException sqle) {
// Handle it
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.