SQLite

Class TableResult

public class TableResult extends Object implements Callback

Class representing an SQLite result set as returned by the Database.get_table convenience method.

Example:
   ...
   SQLite.Database db = new SQLite.Database();
   db.open("db", 0);
   System.out.print(db.get_table("select * from TEST"));
   ...
 
Example output:
   id|firstname|lastname|
   0|John|Doe|
   1|Speedy|Gonzales|
   ...
 
Field Summary
String[]column
Column names of the result set.
intncolumns
Number of columns in the result set.
intnrows
Number of rows in the result set.
Vectorrows
Rows of the result set.
String[]types
Types of columns of the result set or null.
Constructor Summary
TableResult()
Create an empty result set.
Method Summary
voidclear()
Clear result set.
voidcolumns(String[] coldata)
Callback method used while the query is executed.
booleannewrow(String[] rowdata)
Callback method used while the query is executed.
StringtoString()
Make String representation of result set.
voidtypes(String[] types)
Callback method used while the query is executed.

Field Detail

column

public String[] column
Column names of the result set.

ncolumns

public int ncolumns
Number of columns in the result set.

nrows

public int nrows
Number of rows in the result set.

rows

public Vector rows
Rows of the result set. Each row is stored as a String array.

types

public String[] types
Types of columns of the result set or null.

Constructor Detail

TableResult

public TableResult()
Create an empty result set.

Method Detail

clear

public void clear()
Clear result set.

columns

public void columns(String[] coldata)
Callback method used while the query is executed.

newrow

public boolean newrow(String[] rowdata)
Callback method used while the query is executed.

toString

public String toString()
Make String representation of result set.

types

public void types(String[] types)
Callback method used while the query is executed.
Contact: Christian Werner