~ubuntu-branches/ubuntu/saucy/db/saucy-proposed

« back to all changes in this revision

Viewing changes to sql/jdbc/doc/SQLite/Callback.html

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-11-05 15:02:09 UTC
  • mfrom: (13.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20101105150209-ppvyn0619pu014xo
Tags: 5.1.19-1ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Pass --build/--host to configure to support cross-building, and don't
    override CC.
  - Disable the Java build when cross-building, for now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
 
<!--NewPage-->
3
 
<HTML>
4
 
<HEAD>
5
 
<!-- Generated by javadoc (build 1.4.2_03) on Sun Jan 31 16:35:17 CET 2010 -->
6
 
<TITLE>
7
 
Callback (SQLite Java Wrapper)
8
 
</TITLE>
9
 
 
10
 
<META NAME="keywords" CONTENT="SQLite.Callback interface">
11
 
 
12
 
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
13
 
 
14
 
<SCRIPT type="text/javascript">
15
 
function windowTitle()
16
 
{
17
 
    parent.document.title="Callback (SQLite Java Wrapper)";
18
 
}
19
 
</SCRIPT>
20
 
 
21
 
</HEAD>
22
 
 
23
 
<BODY BGCOLOR="white" onload="windowTitle();">
24
 
 
25
 
 
26
 
<!-- ========= START OF TOP NAVBAR ======= -->
27
 
<A NAME="navbar_top"><!-- --></A>
28
 
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29
 
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
30
 
<TR>
31
 
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
32
 
<A NAME="navbar_top_firstrow"><!-- --></A>
33
 
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
34
 
  <TR ALIGN="center" VALIGN="top">
35
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
36
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
37
 
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
38
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
39
 
  </TR>
40
 
</TABLE>
41
 
</TD>
42
 
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
43
 
</EM>
44
 
</TD>
45
 
</TR>
46
 
 
47
 
<TR>
48
 
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
49
 
&nbsp;<A HREF="../SQLite/BusyHandler.html" title="interface in SQLite"><B>PREV CLASS</B></A>&nbsp;
50
 
&nbsp;<A HREF="../SQLite/Constants.html" title="class in SQLite"><B>NEXT CLASS</B></A></FONT></TD>
51
 
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
52
 
  <A HREF="../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
53
 
&nbsp;<A HREF="Callback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
54
 
&nbsp;<SCRIPT type="text/javascript">
55
 
  <!--
56
 
  if(window==top) {
57
 
    document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
58
 
  }
59
 
  //-->
60
 
</SCRIPT>
61
 
<NOSCRIPT>
62
 
  <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
63
 
</NOSCRIPT>
64
 
 
65
 
</FONT></TD>
66
 
</TR>
67
 
<TR>
68
 
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
69
 
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
70
 
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
71
 
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
72
 
</TR>
73
 
</TABLE>
74
 
<A NAME="skip-navbar_top"></A>
75
 
<!-- ========= END OF TOP NAVBAR ========= -->
76
 
 
77
 
<HR>
78
 
<!-- ======== START OF CLASS DATA ======== -->
79
 
<H2>
80
 
<FONT SIZE="-1">
81
 
SQLite</FONT>
82
 
<BR>
83
 
Interface Callback</H2>
84
 
<DL>
85
 
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../SQLite/TableResult.html" title="class in SQLite">TableResult</A></DD>
86
 
</DL>
87
 
<HR>
88
 
<DL>
89
 
<DT>public interface <B>Callback</B></DL>
90
 
 
91
 
<P>
92
 
Callback interface for SQLite's query results.
93
 
 <BR><BR>
94
 
 Example:<BR>
95
 
 
96
 
 <PRE>
97
 
   class TableFmt implements SQLite.Callback {
98
 
     public void columns(String cols[]) {
99
 
       System.out.println("&lt;TH&gt;&lt;TR&gt;");
100
 
       for (int i = 0; i &lt; cols.length; i++) {
101
 
         System.out.println("&lt;TD&gt;" + cols[i] + "&lt;/TD&gt;");
102
 
       }
103
 
       System.out.println("&lt;/TR&gt;&lt;/TH&gt;");
104
 
     }
105
 
     public boolean newrow(String cols[]) {
106
 
       System.out.println("&lt;TR&gt;");
107
 
       for (int i = 0; i &lt; cols.length; i++) {
108
 
         System.out.println("&lt;TD&gt;" + cols[i] + "&lt;/TD&gt;");
109
 
       }
110
 
       System.out.println("&lt;/TR&gt;");
111
 
       return false;
112
 
     }
113
 
   }
114
 
   ...
115
 
   SQLite.Database db = new SQLite.Database();
116
 
   db.open("db", 0);
117
 
   System.out.println("&lt;TABLE&gt;");
118
 
   db.exec("select * from TEST", new TableFmt());
119
 
   System.out.println("&lt;/TABLE&gt;");
120
 
   ...
121
 
 </PRE>
122
 
<P>
123
 
 
124
 
<P>
125
 
<HR>
126
 
 
127
 
<P>
128
 
<!-- ======== NESTED CLASS SUMMARY ======== -->
129
 
 
130
 
 
131
 
<!-- =========== FIELD SUMMARY =========== -->
132
 
 
133
 
 
134
 
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
135
 
 
136
 
 
137
 
<!-- ========== METHOD SUMMARY =========== -->
138
 
 
139
 
<A NAME="method_summary"><!-- --></A>
140
 
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
141
 
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
142
 
<TD COLSPAN=2><FONT SIZE="+2">
143
 
<B>Method Summary</B></FONT></TD>
144
 
</TR>
145
 
<TR BGCOLOR="white" CLASS="TableRowColor">
146
 
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
147
 
<CODE>&nbsp;void</CODE></FONT></TD>
148
 
<TD><CODE><B><A HREF="../SQLite/Callback.html#columns(java.lang.String[])">columns</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]&nbsp;coldata)</CODE>
149
 
 
150
 
<BR>
151
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reports column names of the query result.</TD>
152
 
</TR>
153
 
<TR BGCOLOR="white" CLASS="TableRowColor">
154
 
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
155
 
<CODE>&nbsp;boolean</CODE></FONT></TD>
156
 
<TD><CODE><B><A HREF="../SQLite/Callback.html#newrow(java.lang.String[])">newrow</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]&nbsp;rowdata)</CODE>
157
 
 
158
 
<BR>
159
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reports row data of the query result.</TD>
160
 
</TR>
161
 
<TR BGCOLOR="white" CLASS="TableRowColor">
162
 
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
163
 
<CODE>&nbsp;void</CODE></FONT></TD>
164
 
<TD><CODE><B><A HREF="../SQLite/Callback.html#types(java.lang.String[])">types</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]&nbsp;types)</CODE>
165
 
 
166
 
<BR>
167
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reports type names of the columns of the query result.</TD>
168
 
</TR>
169
 
</TABLE>
170
 
&nbsp;
171
 
<P>
172
 
 
173
 
<!-- ============ FIELD DETAIL =========== -->
174
 
 
175
 
 
176
 
<!-- ========= CONSTRUCTOR DETAIL ======== -->
177
 
 
178
 
 
179
 
<!-- ============ METHOD DETAIL ========== -->
180
 
 
181
 
<A NAME="method_detail"><!-- --></A>
182
 
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
183
 
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
184
 
<TD COLSPAN=1><FONT SIZE="+2">
185
 
<B>Method Detail</B></FONT></TD>
186
 
</TR>
187
 
</TABLE>
188
 
 
189
 
<A NAME="columns(java.lang.String[])"><!-- --></A><H3>
190
 
columns</H3>
191
 
<PRE>
192
 
public void <B>columns</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]&nbsp;coldata)</PRE>
193
 
<DL>
194
 
<DD>Reports column names of the query result.
195
 
 This method is invoked first (and once) when
196
 
 the SQLite engine returns the result set.<BR><BR>
197
 
<P>
198
 
<DD><DL>
199
 
<DT><B>Parameters:</B><DD><CODE>coldata</CODE> - string array holding the column names</DL>
200
 
</DD>
201
 
</DL>
202
 
<HR>
203
 
 
204
 
<A NAME="newrow(java.lang.String[])"><!-- --></A><H3>
205
 
newrow</H3>
206
 
<PRE>
207
 
public boolean <B>newrow</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]&nbsp;rowdata)</PRE>
208
 
<DL>
209
 
<DD>Reports row data of the query result.
210
 
 This method is invoked for each row of the
211
 
 result set. If true is returned the running
212
 
 SQLite query is aborted.<BR><BR>
213
 
<P>
214
 
<DD><DL>
215
 
<DT><B>Parameters:</B><DD><CODE>rowdata</CODE> - string array holding the column values of the row</DL>
216
 
</DD>
217
 
</DL>
218
 
<HR>
219
 
 
220
 
<A NAME="types(java.lang.String[])"><!-- --></A><H3>
221
 
types</H3>
222
 
<PRE>
223
 
public void <B>types</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]&nbsp;types)</PRE>
224
 
<DL>
225
 
<DD>Reports type names of the columns of the query result.
226
 
 This is available from SQLite 2.6.0 on and needs
227
 
 the PRAGMA show_datatypes to be turned on.<BR><BR>
228
 
<P>
229
 
<DD><DL>
230
 
<DT><B>Parameters:</B><DD><CODE>types</CODE> - string array holding column types</DL>
231
 
</DD>
232
 
</DL>
233
 
<!-- ========= END OF CLASS DATA ========= -->
234
 
<HR>
235
 
 
236
 
 
237
 
<!-- ======= START OF BOTTOM NAVBAR ====== -->
238
 
<A NAME="navbar_bottom"><!-- --></A>
239
 
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
240
 
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
241
 
<TR>
242
 
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
243
 
<A NAME="navbar_bottom_firstrow"><!-- --></A>
244
 
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
245
 
  <TR ALIGN="center" VALIGN="top">
246
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
247
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
248
 
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
249
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
250
 
  </TR>
251
 
</TABLE>
252
 
</TD>
253
 
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
254
 
</EM>
255
 
</TD>
256
 
</TR>
257
 
 
258
 
<TR>
259
 
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
260
 
&nbsp;<A HREF="../SQLite/BusyHandler.html" title="interface in SQLite"><B>PREV CLASS</B></A>&nbsp;
261
 
&nbsp;<A HREF="../SQLite/Constants.html" title="class in SQLite"><B>NEXT CLASS</B></A></FONT></TD>
262
 
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
263
 
  <A HREF="../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
264
 
&nbsp;<A HREF="Callback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
265
 
&nbsp;<SCRIPT type="text/javascript">
266
 
  <!--
267
 
  if(window==top) {
268
 
    document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
269
 
  }
270
 
  //-->
271
 
</SCRIPT>
272
 
<NOSCRIPT>
273
 
  <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
274
 
</NOSCRIPT>
275
 
 
276
 
</FONT></TD>
277
 
</TR>
278
 
<TR>
279
 
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
280
 
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
281
 
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
282
 
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
283
 
</TR>
284
 
</TABLE>
285
 
<A NAME="skip-navbar_bottom"></A>
286
 
<!-- ======== END OF BOTTOM NAVBAR ======= -->
287
 
 
288
 
<HR>
289
 
<small>Contact: <a HREF="mailto:chw@ch-werner.de">Christian Werner</a></small>
290
 
</BODY>
291
 
</HTML>