Thanks for the reply Noel.  That's too bad.  Oh well I'll figure something 
out.

Relatedly, I am running into a problem trying to get this working.  I have 
the following:

return "CREATE ALIAS findUser AS $$\n" +
                                "ResultSet findUser() {\n" +
                                "    org.h2.tools.SimpleResultSet rs = new 
org.h2.tools.SimpleResultSet();\n" +
                                "    rs.addColumn(\"ID\", Types.INTEGER, 
10, 0);\n" +
                                "    rs.addColumn(\"NAME\", Types.VARCHAR, 
255, 0);\n" +
                                "    rs.addRow(1, \"Steve\");\n" +
                                "    return rs;\n" +
                                "} $$";

But this keeps giving me the error:

08:57:37,103 ERROR SchemaExport:425 - HHH000389: Unsuccessful: CREATE ALIAS 
findUser AS $$
ResultSet findUser() {
    org.h2.tools.SimpleResultSet rs = new org.h2.tools.SimpleResultSet();
    rs.addColumn("ID", Types.INTEGER, 10, 0);
    rs.addColumn("NAME", Types.VARCHAR, 255, 0);
    rs.addRow(1, "Steve");
    return rs;
} $$
08:57:37,105 ERROR SchemaExport:426 - Syntax error in SQL statement 
"/org/h2/dynamic/FINDUSER.java:9: package org.h2.tools does not exist
    org.h2.tools.SimpleResultSet rs = new org.h2.tools.SimpleResultSet();
                ^
/org/h2/dynamic/FINDUSER.java:9: package org.h2.tools does not exist
    org.h2.tools.SimpleResultSet rs = new org.h2.tools.SimpleResultSet();

I verified that the version of H2 I am using (1.2.145) does in fact have 
this class.  Any idea what is going on there?  That snippet is taken almost 
verbatim from the user guide.  I tried both with the import and then FQN 
references.

On Monday, June 25, 2012 8:48:26 AM UTC-5, Noel Grandin wrote:
>
> H2 does not implement in/out parameters, you'd either need to 
> (a) pass some kind of carrier object into the method that could be 
> updated, 
> (b) return your data in a carrier object 
> (c) return your data in a result set 
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/H5srCLpDQFYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to