Skip to content

Commit de546a9

Browse files
committed
docs: document how to enable load extension
1 parent 751cd07 commit de546a9

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

USAGE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,26 @@ The name of directories in our jar and in Android Studio differ, here is a mappi
201201
| arm | armeabi |
202202
| x86 | x86 |
203203
| x86_64 | x86_64 |
204+
205+
## How to load Run-Time Loadable Extensions
206+
207+
### Enable loadable extensions
208+
209+
- If you use `DriverManager`, configure the `Properties`:
210+
211+
```java
212+
prop.setProperty("enable_load_extension", "true");
213+
```
214+
215+
- If you use `SQLiteConfig`:
216+
217+
```java
218+
SQLiteConfig config = new SQLiteConfig();
219+
config.enableLoadExtension(true);
220+
```
221+
222+
- You can also specify the pragma in the connection string: `"jdbc:sqlite::memory:?enable_load_extension=true"`
223+
224+
### Load an extension
225+
226+
Use the `load_extension` [SQL function](https://sqlite.org/lang_corefunc.html#load_extension).

0 commit comments

Comments
 (0)