Skip to content

Commit

Permalink
docs: mention temporary databases
Browse files Browse the repository at this point in the history
  • Loading branch information
gotson authored Jul 23, 2024
1 parent c375a40 commit 0035ec4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Opening a UNIX (Linux, maxOS, etc.) file `/home/leo/work/mydatabase.db`
try (Connection connection = DriverManager.getConnection("jdbc:sqlite:/home/leo/work/mydatabase.db")) { /*...*/ }
```

## How to Use Memory Databases
SQLite supports on-memory database management, which does not create any database files. To use a memory database in your Java code, get the database connection as follows:
## How to Use Memory or Temporary Databases
SQLite supports in-memory databases, which do not create any database files. To use a memory database in your Java code, get the database connection as follows:

```java
try (Connection connection = DriverManager.getConnection("jdbc:sqlite::memory:")) { /*...*/ }
```

And also, you can create memory database as follows:
You can create temporary database as follows:
```java
try (Connection connection = DriverManager.getConnection("jdbc:sqlite:")) { /*...*/ }
```
Expand Down

0 comments on commit 0035ec4

Please sign in to comment.