-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.html
More file actions
49 lines (49 loc) · 1.7 KB
/
Copy pathpackage.html
File metadata and controls
49 lines (49 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<html>
<body>
<h3>
<strong>sqlite4java</strong> is a minimalistic Java wrapper for <a href="http://sqlite.org">SQLite RDBMS</a>, aiming
to provide high-performance, low-garbage interface for desktop Java applications.
</h3>
<p>
<strong>sqlite4java</strong> is shipped with pre-compiled binaries for Windows, Linux and Mac OS X; the binaries
contain the SQLite database code and additional wrapper code.
</p>
<p>
To start using <strong>sqlite4java</strong>, you only need to place <code>sqlite4java.jar</code> and
platform-dependent binaries into a directory in the CLASSPATH. (Binaries should be in the same directory
as the jar file.)
</p>
<p>
To check SQLite version and library version, you can just run the jar file: <code>java -jar sqlite4java.jar</code>
</p>
<p>
<strong>sqlite4java</strong> is built using JDK 1.6.
</p>
<p>
Note on SQL used: SQL should contain characters from ASCII character table. If you need to insert or search for
Unicode data, you need to bind it using statement parameters.
</p>
<p>
Main classes are {@link com.almworks.sqlite4java.SQLiteConnection} and {@link SQLiteStatement}.
A simple example:
<pre>
SQLiteConnection db = new SQLiteConnection(new File("/tmp/database"));
db.open(true);
...
SQLiteStatement st = db.prepare("SELECT order_id FROM orders WHERE quantity >= ?");
try {
st.bind(1, minimumQuantity);
while (st.step()) {
orders.add(st.columnLong(0));
}
} finally {
st.dispose();
}
...
db.close();
</pre>
<p>
See <a href="http://code.google.com/p/sqlite4java/">http://code.google.com/p/sqlite4java</a> for more information.
</p>
</body>
</html>