Skip to content

Instantly share code, notes, and snippets.

@brianm
Created June 2, 2009 16:47
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 brianm/122352 to your computer and use it in GitHub Desktop.
Save brianm/122352 to your computer and use it in GitHub Desktop.
public void testUsefulArgumentOutputForDebug() throws Exception {
try {
h.createStatement("insert into something (id, name) values (:id, :name)")
.bind("name", "brian")
.bind(7, 8)
.bindFromMap(new HandyMapThing().add("one", "two"))
.bindFromProperties(new Object())
.execute();
}
catch (StatementException e) {
System.out.println(e.getMessage());
}
}
Unable to execute, no named parameter matches "id" and no positional param for place 0
(which is 1 in the JDBC 'start at 1' scheme) has been set. [statement:"insert into
something (id, name) values (:id, :name)", located:"insert into something (id, name)
values (:id, :name)", rewritten:"insert into something (id, name) values (?, ?)",
arguments:{ positional:{7:8}, named:{name:'brian'}, lazy:[{one=two},{lazy bean
proprty arguments "java.lang.Object@65c24701"]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment