Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.runtime
Class SqlGroovyMethods

    java.lang.Object
      org.codehaus.groovy.runtime.SqlGroovyMethods

    public class SqlGroovyMethods

extends Object

This class defines all the new SQL-related groovy methods which enhance the normal JDK SQL classes when inside the Groovy environment. Static methods are used with the first parameter the destination class.

Author:
  Paul King, John Hurst

Constructor Summary
`SqlGroovyMethods()`

Method Summary
`static Iterator<ResultSetMetaDataWrapper>` | `iterator(ResultSetMetaData resultSetMetaData)` Return an Iterator given a ResultSetMetaData.
`static GroovyRowResult` | `toRowResult(ResultSet rs)` Returns a GroovyRowResult given a ResultSet.
`static Timestamp` | `toTimestamp(Date d)` Return a java.sql.Timestamp given a java.util.Date.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SqlGroovyMethods

    public SqlGroovyMethods()

Method Detail

### toRowResult

    public static GroovyRowResult toRowResult(ResultSet rs)
                                       throws SQLException

  Returns a GroovyRowResult given a ResultSet.

  Parameters:
    `rs` - a ResultSet
  Returns:
    the resulting GroovyRowResult
  Throws:
    `SQLException` - if a database error occurs
  Since:
    1.6.0

### toTimestamp

    public static Timestamp toTimestamp(Date d)

  Return a java.sql.Timestamp given a java.util.Date.

  Parameters:
    `d` - a date
  Returns:
    the date wrapped as a Timestamp
  Since:
    1.6.6

### iterator

    public static Iterator<ResultSetMetaDataWrapper> iterator(ResultSetMetaData resultSetMetaData)

  Return an Iterator given a ResultSetMetaData. Enables Groovy collection method syntactic sugar on ResultSetMetaData.

  Parameters:
    `resultSetMetaData` - the ResultSetMetaData to iterate over
  Returns:
    an iterator for the ResultSetMetaData
  Since:
    1.7

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2003-2009 The Codehaus. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD