com.caucho.db.sql
Class SelectResult

java.lang.Object
  extended by com.caucho.db.sql.SelectResult

public class SelectResult
extends java.lang.Object


Method Summary
 void close()
           
static SelectResult create(Expr[] exprs, com.caucho.db.sql.Order order)
           
 int findColumnIndex(java.lang.String name)
          Returns the column index with the given name.
 java.sql.Blob getBlob(int index)
          Returns the blob value of the given index.
 byte[] getBytes(int index)
          Returns the string value of the given index.
 java.sql.Clob getClob(int index)
          Returns the clob value of the given index.
 long getDate(int index)
           
 double getDouble(int index)
          Returns a double value from this column.
 Expr[] getExprs()
          Returns the expressions.
 int getInt(int index)
          Returns the integer value of the column.
 long getLong(int index)
          Returns the long value of the column.
 java.lang.String getString(int index)
          Returns the string value of the given index.
 boolean next()
          Moves to the next row, returning true if the row has data.
 void startRow()
          Starts a row
 boolean wasNull()
          Returns true if the last column read was null.
 void write(byte[] buffer, int offset, int length)
          Writes a buffer
 void write(int value)
          Writes the next byte.
 void writeBinary(byte[] buffer, int offset, int length)
          Writes a binary.
 void writeBlob(byte[] buffer, int offset)
          Writes a blob.
 void writeBlock(int code, byte[] buffer, int offset, int length)
          Writes a string.
 void writeDate(long value)
          Writes a date.
 void writeDouble(double dValue)
          Writes a double.
 void writeInt(int value)
          Writes an long.
 void writeLong(long value)
          Writes a long.
 void writeNull()
          Writes a null.
 void writeShort(int value)
          Writes a short
 void writeString(byte[] buffer, int offset, int stringLength)
          Writes a string.
 void writeString(java.lang.String s)
          Writes a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static SelectResult create(Expr[] exprs,
                                  com.caucho.db.sql.Order order)

next

public boolean next()
             throws java.sql.SQLException
Moves to the next row, returning true if the row has data.

Throws:
java.sql.SQLException

getExprs

public Expr[] getExprs()
Returns the expressions.


findColumnIndex

public int findColumnIndex(java.lang.String name)
                    throws java.sql.SQLException
Returns the column index with the given name.

Throws:
java.sql.SQLException

getString

public java.lang.String getString(int index)
                           throws java.sql.SQLException
Returns the string value of the given index.

Throws:
java.sql.SQLException

getBytes

public byte[] getBytes(int index)
                throws java.sql.SQLException
Returns the string value of the given index.

Throws:
java.sql.SQLException

getInt

public int getInt(int index)
           throws java.sql.SQLException
Returns the integer value of the column.

Throws:
java.sql.SQLException

getLong

public long getLong(int index)
             throws java.sql.SQLException
Returns the long value of the column.

Throws:
java.sql.SQLException

getDouble

public double getDouble(int index)
                 throws java.sql.SQLException
Returns a double value from this column.

Throws:
java.sql.SQLException

getDate

public long getDate(int index)
             throws java.sql.SQLException
Throws:
java.sql.SQLException

getBlob

public java.sql.Blob getBlob(int index)
                      throws java.sql.SQLException
Returns the blob value of the given index.

Throws:
java.sql.SQLException

getClob

public java.sql.Clob getClob(int index)
                      throws java.sql.SQLException
Returns the clob value of the given index.

Throws:
java.sql.SQLException

wasNull

public boolean wasNull()
Returns true if the last column read was null.


startRow

public void startRow()
Starts a row


writeNull

public void writeNull()
Writes a null.


writeString

public void writeString(java.lang.String s)
Writes a string.


writeString

public void writeString(byte[] buffer,
                        int offset,
                        int stringLength)
Writes a string.


writeBinary

public void writeBinary(byte[] buffer,
                        int offset,
                        int length)
Writes a binary.


writeBlock

public void writeBlock(int code,
                       byte[] buffer,
                       int offset,
                       int length)
Writes a string.


writeDouble

public void writeDouble(double dValue)
Writes a double.


writeLong

public void writeLong(long value)
Writes a long.


writeDate

public void writeDate(long value)
Writes a date.


writeInt

public void writeInt(int value)
Writes an long.


writeShort

public void writeShort(int value)
Writes a short


writeBlob

public void writeBlob(byte[] buffer,
                      int offset)
Writes a blob.


write

public void write(int value)
Writes the next byte.


write

public void write(byte[] buffer,
                  int offset,
                  int length)
Writes a buffer


close

public void close()