Package SQLite
Class TableResult
java.lang.Object
SQLite.TableResult
- All Implemented Interfaces:
Callback
- Direct Known Subclasses:
TableResultX
public class TableResult extends Object implements Callback
Class representing an SQLite result set as
returned by the
Database.get_table
convenience method.
Example:
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
Fields Modifier and Type Field Description booleanatmaxrowsFlag to indicate Maximum number of rows condition.String[]columnColumn names of the result set.intmaxrowsMaximum number of rows to hold in the table.intncolumnsNumber of columns in the result set.intnrowsNumber of rows in the result set.VectorrowsRows of the result set.String[]typesTypes of columns of the result set or null. -
Constructor Summary
Constructors Constructor Description TableResult()Create an empty result set.TableResult(int maxrows)Create an empty result set with maximum number of rows. -
Method Summary
Modifier and Type Method Description 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 Details
-
ncolumns
public int ncolumnsNumber of columns in the result set. -
nrows
public int nrowsNumber of rows in the result set. -
column
Column names of the result set. -
types
Types of columns of the result set or null. -
rows
Rows of the result set. Each row is stored as a String array. -
maxrows
public int maxrowsMaximum number of rows to hold in the table. -
atmaxrows
public boolean atmaxrowsFlag to indicate Maximum number of rows condition.
-
-
Constructor Details
-
TableResult
public TableResult()Create an empty result set. -
TableResult
public TableResult(int maxrows)Create an empty result set with maximum number of rows.
-
-
Method Details
-
clear
public void clear()Clear result set. -
columns
Callback method used while the query is executed. -
types
Callback method used while the query is executed. -
newrow
Callback method used while the query is executed. -
toString
Make String representation of result set.
-