Skip to content

Commit 643e27c

Browse files
committed
Update Exqlite.Connection.connection_opt type spec and documentation.
1 parent 834c05a commit 643e27c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/exqlite/connection.ex

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ defmodule Exqlite.Connection do
5858

5959
@type connection_opt() ::
6060
{:database, String.t()}
61+
| {:mode, :readwrite | :readonly | :readonly_nomutex}
6162
| {:journal_mode, journal_mode()}
6263
| {:temp_store, temp_store()}
6364
| {:synchronous, synchronous()}
@@ -91,7 +92,8 @@ defmodule Exqlite.Connection do
9192
* `:database` - The path to the database. In memory is allowed. You can use
9293
`:memory` or `":memory:"` to designate that.
9394
* `:mode` - use `:readwrite` to open the database for reading and writing
94-
or `:readonly` to open it in read-only mode. `:readwrite` will also create
95+
, `:readonly` to open it in read-only mode or `:readonly_nomutex` to open
96+
it in read-only with nomutex mode. `:readwrite` will also create
9597
the database if it doesn't already exist. Defaults to `:readwrite`.
9698
* `:journal_mode` - Sets the journal mode for the sqlite connection. Can be
9799
one of the following `:delete`, `:truncate`, `:persist`, `:memory`,
@@ -159,8 +161,8 @@ defmodule Exqlite.Connection do
159161
"./priv/sqlite/\#{arch_dir}/vss0"
160162
]
161163
```
162-
* `:before_disconnect` - A function to run before disconnect, either a
163-
2-arity fun or `{module, function, args}` with the close reason and
164+
* `:before_disconnect` - A function to run before disconnect, either a
165+
2-arity fun or `{module, function, args}` with the close reason and
164166
`t:Exqlite.Connection.t/0` prepended to `args` or `nil` (default: `nil`)
165167
166168
For more information about the options above, see [sqlite documentation][1]

0 commit comments

Comments
 (0)