|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Callback
Callback interface for SQLite's query results.
Example:
class TableFmt implements SQLite.Callback { public void columns(String cols[]) { System.out.println("<TH><TR>"); for (int i = 0; i < cols.length; i++) { System.out.println("<TD>" + cols[i] + "</TD>"); } System.out.println("</TR></TH>"); } public boolean newrow(String cols[]) { System.out.println("<TR>"); for (int i = 0; i < cols.length; i++) { System.out.println("<TD>" + cols[i] + "</TD>"); } System.out.println("</TR>"); return false; } } ... SQLite.Database db = new SQLite.Database(); db.open("db", 0); System.out.println("<TABLE>"); db.exec("select * from TEST", new TableFmt()); System.out.println("</TABLE>"); ...
Method Summary | |
---|---|
void |
columns(java.lang.String[] coldata)
Reports column names of the query result. |
boolean |
newrow(java.lang.String[] rowdata)
Reports row data of the query result. |
void |
types(java.lang.String[] types)
Reports type names of the columns of the query result. |
Method Detail |
---|
void columns(java.lang.String[] coldata)
coldata
- string array holding the column namesboolean newrow(java.lang.String[] rowdata)
rowdata
- string array holding the column values of the rowvoid types(java.lang.String[] types)
types
- string array holding column types
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |