Skip to content

Commit fb0f263

Browse files
committed
docs: convert markdown to asciidoc
1 parent 128d9b2 commit fb0f263

File tree

3 files changed

+95
-71
lines changed

3 files changed

+95
-71
lines changed

README.md renamed to README.adoc

Lines changed: 80 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,46 @@
1-
# SQLite JDBC Driver
2-
[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/xerial/sqlite-jdbc/ci.yml?branch=master)](https://github.com/xerial/sqlite-jdbc/actions/workflows/ci.yml?query=branch%3Amaster)
3-
[![Join the chat at https://gitter.im/xerial/sqlite-jdbc](https://badges.gitter.im/xerial/sqlite-jdbc.svg)](https://gitter.im/xerial/sqlite-jdbc?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.xerial/sqlite-jdbc/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.xerial/sqlite-jdbc/)
5-
[![javadoc](https://javadoc.io/badge2/org.xerial/sqlite-jdbc/javadoc.svg)](https://javadoc.io/doc/org.xerial/sqlite-jdbc)
6-
[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/org.xerial/sqlite-jdbc?color=blue&label=maven%20snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/org/xerial/sqlite-jdbc/)
1+
= SQLite JDBC Driver
2+
:project-version: 3.41.2.1
73

8-
SQLite JDBC is a library for accessing and creating [SQLite](https://www.sqlite.org) database files in Java.
4+
image:https://img.shields.io/github/actions/workflow/status/xerial/sqlite-jdbc/ci.yml?branch=master[GitHub Workflow Status (branch),link=https://github.com/xerial/sqlite-jdbc/actions/workflows/ci.yml?query=branch%3Amaster]
5+
image:https://badges.gitter.im/xerial/sqlite-jdbc.svg[Join the chat,link=https://gitter.im/xerial/sqlite-jdbc?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge]
6+
image:https://maven-badges.herokuapp.com/maven-central/org.xerial/sqlite-jdbc/badge.svg[Maven Central,link=https://maven-badges.herokuapp.com/maven-central/org.xerial/sqlite-jdbc/]
7+
image:https://javadoc.io/badge2/org.xerial/sqlite-jdbc/javadoc.svg[javadoc,link=https://javadoc.io/doc/org.xerial/sqlite-jdbc]
8+
image:https://img.shields.io/nexus/s/org.xerial/sqlite-jdbc?color=blue&label=maven%20snapshot&server=https%3A%2F%2Foss.sonatype.org%2F[Sonatype Nexus (Snapshots),link=https://oss.sonatype.org/content/repositories/snapshots/org/xerial/sqlite-jdbc/]
9+
10+
SQLite JDBC is a library for accessing and creating https://www.sqlite.org[SQLite] database files in Java.
911

1012
Our SQLiteJDBC library requires no configuration since native libraries for major OSs, including Windows, macOS, Linux etc., are assembled into a single JAR (Java Archive) file.
1113

12-
# Usage
14+
== Usage
1315

14-
:arrow_right: More usage examples and configuration are available in [USAGE.md](USAGE.md)
16+
➡️ More usage examples and configuration are available in link:USAGE.md[USAGE.md]
1517

16-
SQLite JDBC is a library for accessing SQLite databases through the JDBC API. For the general usage of JDBC, see [JDBC Tutorial](https://docs.oracle.com/javase/tutorial/jdbc/index.html) or [Oracle JDBC Documentation](https://www.oracle.com/technetwork/java/javase/tech/index-jsp-136101.html).
18+
SQLite JDBC is a library for accessing SQLite databases through the JDBC API. For the general usage of JDBC, see https://docs.oracle.com/javase/tutorial/jdbc/index.html[JDBC Tutorial] or https://www.oracle.com/technetwork/java/javase/tech/index-jsp-136101.html[Oracle JDBC Documentation].
1719

18-
1. [Download](#download) `sqlite-jdbc-(VERSION).jar`
20+
. <<Download,Download>> `sqlite-jdbc-{project-version}.jar`
1921
then append this jar file into your classpath.
20-
2. Open a SQLite database connection from your code. (see the example below)
22+
. Open a SQLite database connection from your code. (see the example below)
23+
24+
=== Example usage
2125

22-
## Example usage
23-
Assuming `sqlite-jdbc-(VERSION).jar` is placed in the current directory.
26+
Assuming `sqlite-jdbc-{project-version}.jar` is placed in the current directory.
2427

25-
```shell
28+
[source,shell,subs="attributes+"]
29+
----
2630
> javac Sample.java
27-
> java -classpath ".;sqlite-jdbc-(VERSION).jar" Sample # in Windows
31+
> java -classpath ".;sqlite-jdbc-{project-version}.jar" Sample # in Windows
2832
or
29-
> java -classpath ".:sqlite-jdbc-(VERSION).jar" Sample # in macOS or Linux
33+
> java -classpath ".:sqlite-jdbc-{project-version}.jar" Sample # in macOS or Linux
3034
name = leo
3135
id = 1
3236
name = yui
3337
id = 2
34-
```
38+
----
3539

36-
**Sample.java**
40+
=== Sample.java
3741

38-
```java
42+
[source,java]
43+
----
3944
import java.sql.Connection;
4045
import java.sql.DriverManager;
4146
import java.sql.ResultSet;
@@ -87,36 +92,40 @@ id = 2
8792
}
8893
}
8994
}
90-
```
9195
92-
# How does SQLiteJDBC work?
93-
Our SQLite JDBC driver package (i.e., `sqlite-jdbc-(VERSION).jar`) contains three
96+
----
97+
98+
== How does SQLiteJDBC work?
99+
100+
Our SQLite JDBC driver package (i.e., `sqlite-jdbc-{project-version}.jar`) contains three
94101
types of native SQLite libraries (`sqlitejdbc.dll`, `sqlitejdbc.jnilib`, `sqlitejdbc.so`),
95102
each of them is compiled for Windows, macOS and Linux. An appropriate native library
96103
file is automatically extracted into your OS's temporary folder, when your program
97104
loads `org.sqlite.JDBC` driver.
98105

99-
## Supported Operating Systems
106+
=== Supported Operating Systems
107+
100108
Since sqlite-jdbc-3.6.19, the natively compiled SQLite engines will be used for
101109
the following operating systems:
102110

103-
| | x86 | x86_64 | armv5 | armv6 | armv7 | arm64 | ppc64 |
104-
|--------------|-----|--------|-------|-------|-------|-------|-------|
105-
| Windows ||| | ||| |
106-
| macOS | || | | || |
107-
| Linux (libc) ||||||||
108-
| Linux (musl) ||| | | || |
109-
| Android |||| | || |
110-
| FreeBSD ||| | | || |
111+
|===
112+
| |x86 |x86_64 |armv5 |armv6 |armv7 |arm64 |ppc64
111113

114+
|Windows |✔ |✔ | | |✔ |✔ |
115+
|macOS | |✔ | | | |✔ |
116+
|Linux (libc) |✔ |✔ |✔ |✔ |✔ |✔ |✔
117+
|Linux (musl) |✔ |✔ | | | |✔ |
118+
|Android |✔ |✔ |✔ | | |✔ |
119+
|FreeBSD |✔ |✔ | | | |✔ |
120+
|===
112121

113122
In the other OSs not listed above, the pure-java SQLite is used. (Applies to versions before 3.7.15)
114123

115-
If you want to use the native library for your OS, [build the source from scratch](./CONTRIBUTING.md).
124+
If you want to use the native library for your OS, link:./CONTRIBUTING.md[build the source from scratch].
116125

117-
## GraalVM native-image support
126+
=== GraalVM native-image support
118127

119-
Sqlite JDBC supports [GraalVM native-image](https://www.graalvm.org/native-image/) out of the box starting from version 3.40.1.0.
128+
Sqlite JDBC supports https://www.graalvm.org/native-image/[GraalVM native-image] out of the box starting from version 3.40.1.0.
120129
There has been rudimentary support for some versions before that, but this was not actively tested by the CI.
121130

122131
By default, the `sqlitejdbc` library for the compilation target will be included in the native image, accompanied by the required JNI configuration.
@@ -127,15 +136,21 @@ As a result, the native image itself will be slightly smaller and the overhead o
127136
but you need to make sure the library can be found at run-time.
128137
The best way to do this is to simply place the library next to the executable.
129138

130-
### CLI example
131-
```shell
139+
==== CLI example
140+
141+
[source,shell]
142+
----
132143
native-image -Dorg.sqlite.lib.exportPath=~/outDir -H:Path=~/outDir -cp foo.jar org.example.Main
133-
```
144+
----
145+
134146
This will place both the `sqlitejdbc` shared library and the native-image output in the `~/outDir` folder.
135147

136-
### Maven example
137-
This example uses the [native-build-tools](https://graalvm.github.io/native-build-tools/latest/index.html) maven plugin:
138-
```xml
148+
=== Maven example
149+
150+
This example uses the https://graalvm.github.io/native-build-tools/latest/index.html[native-build-tools] maven plugin:
151+
152+
[source,xml]
153+
----
139154
<plugin>
140155
<groupId>org.graalvm.buildtools</groupId>
141156
<artifactId>native-maven-plugin</artifactId>
@@ -145,56 +160,62 @@ This example uses the [native-build-tools](https://graalvm.github.io/native-buil
145160
</buildArgs>
146161
</configuration>
147162
</plugin>
148-
```
163+
----
164+
149165
This will automatically place the `sqlitejdbc` library in the `/target` folder of your project, creating a functional execution environment.
150166
When packaging the resulting app, simply include the library in the distribution bundle.
151167

152-
# Download
168+
== Download
153169

154-
Download from [Maven Central](https://search.maven.org/artifact/org.xerial/sqlite-jdbc) or from the [releases](https://github.com/xerial/sqlite-jdbc/releases) page.
170+
Download from https://search.maven.org/artifact/org.xerial/sqlite-jdbc[Maven Central] or from the https://github.com/xerial/sqlite-jdbc/releases[releases] page.
155171

156-
```xml
172+
[source,xml,subs="attributes+"]
173+
----
157174
<dependencies>
158175
<dependency>
159176
<groupId>org.xerial</groupId>
160177
<artifactId>sqlite-jdbc</artifactId>
161-
<version>(version)</version>
178+
<version>{project-version}</version>
162179
</dependency>
163180
</dependencies>
164-
```
181+
----
182+
183+
Snapshots of the development version are available in https://oss.sonatype.org/content/repositories/snapshots/org/xerial/sqlite-jdbc/[Sonatype's snapshots repository].
165184

166-
Snapshots of the development version are available in [Sonatype's snapshots repository](https://oss.sonatype.org/content/repositories/snapshots/org/xerial/sqlite-jdbc/).
185+
=== Project versioning explained
167186

168-
## Project versioning explained
169187
The project's version follows the version of the SQLite library that is bundled in the jar, with an extra digit to denote the project's increment.
170188

171189
For example, if the SQLite version is `3.39.2`, the project version will be `3.39.2.x`, where `x` starts at 0, and increments with every release that is not changing the SQLite version.
172190

173191
If the SQLite version is updated to `3.40.0`, the project version will be updated to `3.40.0.0`.
174192

175-
## Hint for maven-shade-plugin
193+
=== Hint for maven-shade-plugin
176194

177195
You may need to add shade plugin transformer to solve `No suitable driver found for jdbc:sqlite:` issue.
178196

179-
```xml
197+
[source,xml]
198+
----
180199
<transformer
181200
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
182201
<resource>META-INF/services/java.sql.Driver</resource>
183202
</transformer>
184-
```
203+
----
185204

186-
```xml
205+
[source,xml,subs="attributes+"]
206+
----
187207
<dependency>
188208
<groupId>org.xerial</groupId>
189209
<artifactId>sqlite-jdbc</artifactId>
190-
<version>(version)</version>
210+
<version>{project-version}</version>
191211
</dependency>
192-
```
212+
----
193213

194-
# How can I help?
214+
== How can I help?
195215

196216
We are always looking for:
197-
- **Reviewers** for issues or PRs, you can check https://github.com/xerial/sqlite-jdbc/labels/review%20wanted
198-
- **Contributors** to submit PRs, you can check https://github.com/xerial/sqlite-jdbc/labels/help%20wanted and https://github.com/xerial/sqlite-jdbc/labels/good%20first%20issue
199217

200-
Please read our [contribution](./CONTRIBUTING.md) guide.
218+
- *Reviewers* for issues or PRs, you can check image:https://img.shields.io/github/labels/xerial/sqlite-jdbc/review%20wanted[GitHub labels,link=https://github.com/xerial/sqlite-jdbc/labels/review%20wanted]
219+
- *Contributors* to submit PRs, you can check image:https://img.shields.io/github/labels/xerial/sqlite-jdbc/help%20wanted[GitHub labels,link=https://github.com/xerial/sqlite-jdbc/labels/help%20wanted] and image:https://img.shields.io/github/labels/xerial/sqlite-jdbc/good%20first%20issue[GitHub labels,link=https://github.com/xerial/sqlite-jdbc/labels/good%20first%20issue]
220+
221+
Please read our link:./CONTRIBUTING.md[contribution] guide.

SECURITY.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
= Security Policy
2+
:sqlite-version: 3.41.2
3+
4+
== Supported Versions
5+
6+
|===
7+
|Version |Supported
8+
9+
|{sqlite-version}.x |:white_check_mark:
10+
|&lt; {sqlite-version}.x |:x:
11+
|===
12+
13+
== Reporting a Vulnerability
14+
15+
See https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability

SECURITY.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)