Skip to content

Commit 191ed54

Browse files
committed
add foreign_keys and other pragmas to the readme
1 parent 390ad76 commit 191ed54

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ The `Exqlite` module usage is fairly straight forward.
112112
```elixir
113113
# We'll just keep it in memory right now
114114
{:ok, conn} = Exqlite.open(":memory:")
115+
:ok = Exqlite.execute(conn, "pragma foreign_keys=on")
116+
:ok = Exqlite.execute(conn, "pragma journal_mode=wal")
117+
:ok = Exqlite.execute(conn, "pragma busy_timeout=5000")
115118

116119
# Create the table
117120
:ok = Exqlite.execute(conn, "create table test (id integer primary key, stuff text)")
@@ -152,6 +155,8 @@ A selection of precompiled extensions for popular CPU types / architectures is a
152155

153156
```elixir
154157
{:ok, conn} = Exqlite.open(":memory:")
158+
:ok = Exqlite.execute(conn, "pragma foreign_keys=on")
159+
155160
:ok = Exqlite.enable_load_extension(conn)
156161

157162
# load the regexp extension - https://github.com/nalgeon/sqlean/blob/main/docs/re.md

0 commit comments

Comments
 (0)