[groovy-user] RE: RE: groovy+sql not-working example

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[groovy-user] RE: RE: groovy+sql not-working example

Željko Krstić
This is what got from javap -classpath
c:\groovy\embeddable\groovy-all-1.0-jsr-05.jar  groovy.sql.Sql
There is no INTEGER or VARCHAR. What this mean and what version of groovy has
this functionality?


Compiled from "Sql.java"
public class groovy.sql.Sql extends java.lang.Object{
    protected java.util.logging.Logger log;
    int updateCount;
    static java.lang.Class class$groovy$sql$Sql;
    public static groovy.sql.Sql newInstance(java.lang.String)       throws
java.sql.SQLException;
    public static groovy.sql.Sql newInstance(java.lang.String,
java.util.Properties)       throws java.sql.SQLException;
    public static groovy.sql.Sql newInstance(java.lang.String,
java.util.Properties, java.lang.String)       throws java.sql.SQLException,
java.lang.ClassNotFoundException;
    public static groovy.sql.Sql newInstance(java.lang.String,
java.lang.String, java.lang.String)       throws java.sql.SQLException;
    public static groovy.sql.Sql newInstance(java.lang.String,
java.lang.String, java.lang.String, java.lang.String)       throws
java.sql.SQLException, java.lang.ClassNotFoundException;
    public static groovy.sql.Sql newInstance(java.lang.String,
java.lang.String)       throws java.sql.SQLException,
java.lang.ClassNotFoundException;
    public static void loadDriver(java.lang.String)       throws
java.lang.ClassNotFoundException;
    public groovy.sql.Sql(javax.sql.DataSource);
    public groovy.sql.Sql(java.sql.Connection);
    public groovy.sql.Sql(groovy.sql.Sql);
    public groovy.sql.DataSet dataSet(java.lang.String);
    public groovy.sql.DataSet dataSet(java.lang.Class);
    public void query(java.lang.String, groovy.lang.Closure)       throws
java.sql.SQLException;
    public void query(java.lang.String, java.util.List, groovy.lang.Closure)  
   throws java.sql.SQLException;
    public void query(groovy.lang.GString, groovy.lang.Closure)       throws
java.sql.SQLException;
    public void queryEach(java.lang.String, groovy.lang.Closure)       throws
java.sql.SQLException;
    public void eachRow(java.lang.String, groovy.lang.Closure)       throws
java.sql.SQLException;
    public void queryEach(java.lang.String, java.util.List,
groovy.lang.Closure)       throws java.sql.SQLException;
    public void eachRow(java.lang.String, java.util.List, groovy.lang.Closure)
     throws java.sql.SQLException;
    public void eachRow(groovy.lang.GString, groovy.lang.Closure)       throws
java.sql.SQLException;
    public void queryEach(groovy.lang.GString, groovy.lang.Closure)      
throws java.sql.SQLException;
    public java.util.List rows(java.lang.String)       throws
java.sql.SQLException;
    public java.lang.Object firstRow(java.lang.String)       throws
java.sql.SQLException;
    public java.util.List rows(java.lang.String, java.util.List)       throws
java.sql.SQLException;
    public java.lang.Object firstRow(java.lang.String, java.util.List)      
throws java.sql.SQLException;
    public boolean execute(java.lang.String)       throws
java.sql.SQLException;
    public int executeUpdate(java.lang.String)       throws
java.sql.SQLException;
    public boolean execute(java.lang.String, java.util.List)       throws
java.sql.SQLException;
    public int executeUpdate(java.lang.String, java.util.List)       throws
java.sql.SQLException;
    public boolean execute(groovy.lang.GString)       throws
java.sql.SQLException;
    public int executeUpdate(groovy.lang.GString)       throws
java.sql.SQLException;
    public int call(java.lang.String)       throws java.lang.Exception;
    public int call(java.lang.String, java.util.List)       throws
java.lang.Exception;
    public int call(groovy.lang.GString)       throws java.lang.Exception;
    public void close()       throws java.sql.SQLException;
    public javax.sql.DataSource getDataSource();
    public void commit();
    public void rollback();
    public int getUpdateCount();
    public java.sql.Connection getConnection();
    public void withStatement(groovy.lang.Closure);
    protected java.lang.String asSql(groovy.lang.GString, java.util.List);
    protected java.lang.String nullify(java.lang.String);
    protected int findWhereKeyword(java.lang.String);
    protected java.util.List getParameters(groovy.lang.GString);
    protected void setParameters(java.util.List, java.sql.PreparedStatement)  
   throws java.sql.SQLException;
    protected void setObject(java.sql.PreparedStatement, int, java.lang.Object)
      throws java.sql.SQLException;
    protected java.sql.Connection createConnection()       throws
java.sql.SQLException;
    protected void closeResources(java.sql.Connection, java.sql.Statement,
java.sql.ResultSet);
    protected void closeResources(java.sql.Connection, java.sql.Statement);
    protected void configure(java.sql.Statement);
    static java.lang.Class class$(java.lang.String);
    static javax.sql.DataSource access$000(groovy.sql.Sql);
}



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] RE: RE: groovy+sql not-working example

Robert Fuller
Yes, this feature appears not to be included in your groovy jar. I'd
expect to see:
public static final groovy.sql.OutParameter INTEGER;

This is certainly in the cvs version:
http://fisheye.codehaus.org/viewrep/~raw,r=1.21/groovy/groovy/groovy-core/src/main/groovy/sql/Sql.java

I am not sure what releases include this.

Željko Krstić wrote:

>This is what got from javap -classpath
>c:\groovy\embeddable\groovy-all-1.0-jsr-05.jar  groovy.sql.Sql
>There is no INTEGER or VARCHAR. What this mean and what version of groovy has
>this functionality?
>
>
>Compiled from "Sql.java"
>public class groovy.sql.Sql extends java.lang.Object{
>    protected java.util.logging.Logger log;
>    int updateCount;
>    static java.lang.Class class$groovy$sql$Sql;
>    public static groovy.sql.Sql newInstance(java.lang.String)       throws
>java.sql.SQLException;
>    public static groovy.sql.Sql newInstance(java.lang.String,
>java.util.Properties)       throws java.sql.SQLException;
>    public static groovy.sql.Sql newInstance(java.lang.String,
>java.util.Properties, java.lang.String)       throws java.sql.SQLException,
>java.lang.ClassNotFoundException;
>    public static groovy.sql.Sql newInstance(java.lang.String,
>java.lang.String, java.lang.String)       throws java.sql.SQLException;
>    public static groovy.sql.Sql newInstance(java.lang.String,
>java.lang.String, java.lang.String, java.lang.String)       throws
>java.sql.SQLException, java.lang.ClassNotFoundException;
>    public static groovy.sql.Sql newInstance(java.lang.String,
>java.lang.String)       throws java.sql.SQLException,
>java.lang.ClassNotFoundException;
>    public static void loadDriver(java.lang.String)       throws
>java.lang.ClassNotFoundException;
>    public groovy.sql.Sql(javax.sql.DataSource);
>    public groovy.sql.Sql(java.sql.Connection);
>    public groovy.sql.Sql(groovy.sql.Sql);
>    public groovy.sql.DataSet dataSet(java.lang.String);
>    public groovy.sql.DataSet dataSet(java.lang.Class);
>    public void query(java.lang.String, groovy.lang.Closure)       throws
>java.sql.SQLException;
>    public void query(java.lang.String, java.util.List, groovy.lang.Closure)  
>   throws java.sql.SQLException;
>    public void query(groovy.lang.GString, groovy.lang.Closure)       throws
>java.sql.SQLException;
>    public void queryEach(java.lang.String, groovy.lang.Closure)       throws
>java.sql.SQLException;
>    public void eachRow(java.lang.String, groovy.lang.Closure)       throws
>java.sql.SQLException;
>    public void queryEach(java.lang.String, java.util.List,
>groovy.lang.Closure)       throws java.sql.SQLException;
>    public void eachRow(java.lang.String, java.util.List, groovy.lang.Closure)
>     throws java.sql.SQLException;
>    public void eachRow(groovy.lang.GString, groovy.lang.Closure)       throws
>java.sql.SQLException;
>    public void queryEach(groovy.lang.GString, groovy.lang.Closure)      
>throws java.sql.SQLException;
>    public java.util.List rows(java.lang.String)       throws
>java.sql.SQLException;
>    public java.lang.Object firstRow(java.lang.String)       throws
>java.sql.SQLException;
>    public java.util.List rows(java.lang.String, java.util.List)       throws
>java.sql.SQLException;
>    public java.lang.Object firstRow(java.lang.String, java.util.List)      
>throws java.sql.SQLException;
>    public boolean execute(java.lang.String)       throws
>java.sql.SQLException;
>    public int executeUpdate(java.lang.String)       throws
>java.sql.SQLException;
>    public boolean execute(java.lang.String, java.util.List)       throws
>java.sql.SQLException;
>    public int executeUpdate(java.lang.String, java.util.List)       throws
>java.sql.SQLException;
>    public boolean execute(groovy.lang.GString)       throws
>java.sql.SQLException;
>    public int executeUpdate(groovy.lang.GString)       throws
>java.sql.SQLException;
>    public int call(java.lang.String)       throws java.lang.Exception;
>    public int call(java.lang.String, java.util.List)       throws
>java.lang.Exception;
>    public int call(groovy.lang.GString)       throws java.lang.Exception;
>    public void close()       throws java.sql.SQLException;
>    public javax.sql.DataSource getDataSource();
>    public void commit();
>    public void rollback();
>    public int getUpdateCount();
>    public java.sql.Connection getConnection();
>    public void withStatement(groovy.lang.Closure);
>    protected java.lang.String asSql(groovy.lang.GString, java.util.List);
>    protected java.lang.String nullify(java.lang.String);
>    protected int findWhereKeyword(java.lang.String);
>    protected java.util.List getParameters(groovy.lang.GString);
>    protected void setParameters(java.util.List, java.sql.PreparedStatement)  
>   throws java.sql.SQLException;
>    protected void setObject(java.sql.PreparedStatement, int, java.lang.Object)
>      throws java.sql.SQLException;
>    protected java.sql.Connection createConnection()       throws
>java.sql.SQLException;
>    protected void closeResources(java.sql.Connection, java.sql.Statement,
>java.sql.ResultSet);
>    protected void closeResources(java.sql.Connection, java.sql.Statement);
>    protected void configure(java.sql.Statement);
>    static java.lang.Class class$(java.lang.String);
>    static javax.sql.DataSource access$000(groovy.sql.Sql);
>}
>
>
>
>---------------------------------------------------------------------
>To unsubscribe from this list please visit:
>
>    http://xircles.codehaus.org/manage_email
>  
>


--
   Robert Fuller    Applepie Solutions Ltd   http://www.aplpi.com
email:[hidden email] mobile:+353.86.0507760 office:+353.91.751262
  Unit 30, Industry Support Centre, GMIT, Dublin Rd, Galway, Ireland.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] RE: RE: groovy+sql not-working example

Guillaume Laforge
Administrator
If that's the patches I applied a few weeks ago, I guess it's not even yet released.
It'll be included in the next release.
In the meantime, it's only in the CVS version I guess.

On 6/2/06, Robert Fuller <[hidden email]> wrote:
Yes, this feature appears not to be included in your groovy jar. I'd
expect to see:
public static final groovy.sql.OutParameter INTEGER;

This is certainly in the cvs version:
http://fisheye.codehaus.org/viewrep/~raw,r=1.21/groovy/groovy/groovy-core/src/main/groovy/sql/Sql.java

I am not sure what releases include this.

Željko Krsti&#263; wrote:

>This is what got from javap -classpath
>c:\groovy\embeddable\groovy-all-1.0-jsr-05.jar  groovy.sql.Sql
>There is no INTEGER or VARCHAR. What this mean and what version of groovy has
>this functionality?
>
>
>Compiled from " Sql.java"
>public class groovy.sql.Sql extends java.lang.Object{
>    protected java.util.logging.Logger log;
>    int updateCount;
>    static java.lang.Class class$groovy$sql$Sql;
>    public static groovy.sql.Sql newInstance(java.lang.String)       throws
>java.sql.SQLException;
>    public static groovy.sql.Sql newInstance(java.lang.String,
>java.util.Properties)       throws java.sql.SQLException ;
>    public static groovy.sql.Sql newInstance(java.lang.String,
>java.util.Properties, java.lang.String)       throws java.sql.SQLException,
>java.lang.ClassNotFoundException;
>    public static groovy.sql.Sql newInstance(java.lang.String,
>java.lang.String, java.lang.String)       throws java.sql.SQLException;
>    public static groovy.sql.Sql newInstance(java.lang.String,
>java.lang.String, java.lang.String , java.lang.String)       throws
>java.sql.SQLException, java.lang.ClassNotFoundException;
>    public static groovy.sql.Sql newInstance(java.lang.String,
>java.lang.String)       throws java.sql.SQLException ,
>java.lang.ClassNotFoundException;
>    public static void loadDriver(java.lang.String)       throws
>java.lang.ClassNotFoundException;
>    public groovy.sql.Sql(javax.sql.DataSource);
>    public groovy.sql.Sql(java.sql.Connection);
>    public groovy.sql.Sql(groovy.sql.Sql);
>    public groovy.sql.DataSet dataSet(java.lang.String);
>    public groovy.sql.DataSet dataSet(java.lang.Class);
>    public void query( java.lang.String, groovy.lang.Closure)       throws
>java.sql.SQLException;
>    public void query(java.lang.String, java.util.List, groovy.lang.Closure)
>   throws java.sql.SQLException;
>    public void query( groovy.lang.GString, groovy.lang.Closure)       throws
>java.sql.SQLException;
>    public void queryEach(java.lang.String, groovy.lang.Closure)       throws
>java.sql.SQLException;
>    public void eachRow( java.lang.String, groovy.lang.Closure)       throws
>java.sql.SQLException;
>    public void queryEach(java.lang.String, java.util.List,
>groovy.lang.Closure)       throws java.sql.SQLException;
>    public void eachRow( java.lang.String, java.util.List, groovy.lang.Closure)
>     throws java.sql.SQLException;
>    public void eachRow(groovy.lang.GString, groovy.lang.Closure)       throws
>java.sql.SQLException;
>    public void queryEach( groovy.lang.GString, groovy.lang.Closure)
>throws java.sql.SQLException;
>    public java.util.List rows(java.lang.String)       throws
>java.sql.SQLException;
>    public java.lang.Object firstRow( java.lang.String)       throws
>java.sql.SQLException;
>    public java.util.List rows(java.lang.String, java.util.List)       throws
>java.sql.SQLException;
>    public java.lang.Object firstRow(java.lang.String , java.util.List)
>throws java.sql.SQLException;
>    public boolean execute(java.lang.String)       throws
>java.sql.SQLException;
>    public int executeUpdate(java.lang.String)       throws
> java.sql.SQLException;
>    public boolean execute(java.lang.String, java.util.List)       throws
>java.sql.SQLException;
>    public int executeUpdate(java.lang.String, java.util.List)       throws
> java.sql.SQLException;
>    public boolean execute(groovy.lang.GString)       throws
>java.sql.SQLException;
>    public int executeUpdate(groovy.lang.GString)       throws
>java.sql.SQLException;
>    public int call(java.lang.String)       throws java.lang.Exception;

>    public int call(java.lang.String, java.util.List)       throws
>java.lang.Exception;
>    public int call(groovy.lang.GString )       throws java.lang.Exception;
>    public void close()       throws java.sql.SQLException;
>    public javax.sql.DataSource getDataSource();
>    public void commit();
>    public void rollback();
>    public int getUpdateCount();
>    public java.sql.Connection getConnection();
>    public void withStatement(groovy.lang.Closure);
>    protected java.lang.String asSql(groovy.lang.GString, java.util.List );
>    protected java.lang.String nullify(java.lang.String);
>    protected int findWhereKeyword(java.lang.String);
>    protected java.util.List getParameters(groovy.lang.GString);
>    protected void setParameters( java.util.List, java.sql.PreparedStatement)
>   throws java.sql.SQLException;
>    protected void setObject(java.sql.PreparedStatement, int, java.lang.Object)
>      throws java.sql.SQLException;
>    protected java.sql.Connection createConnection()       throws
>java.sql.SQLException;
>    protected void closeResources(java.sql.Connection, java.sql.Statement,
>java.sql.ResultSet);
>    protected void closeResources( java.sql.Connection, java.sql.Statement);
>    protected void configure(java.sql.Statement);
>    static java.lang.Class class$(java.lang.String);
>    static javax.sql.DataSource access$000(groovy.sql.Sql );
>}
>
>
>
>---------------------------------------------------------------------
>To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
   Robert Fuller    Applepie Solutions Ltd   http://www.aplpi.com
[hidden email] mobile:+353.86.0507760 office:+353.91.751262
  Unit 30, Industry Support Centre, GMIT, Dublin Rd, Galway, Ireland.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email




--
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/blog/groovy