From d34a293113da91056879d7b5042e90ccf819d4c7 Mon Sep 17 00:00:00 2001 From: jay817 Date: Sun, 22 Sep 2024 23:47:41 -0400 Subject: [PATCH] Update sqlite3-python/README.md --- sqlite3-python/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sqlite3-python/README.md b/sqlite3-python/README.md index c9facc3..3e07cbe 100644 --- a/sqlite3-python/README.md +++ b/sqlite3-python/README.md @@ -1,3 +1,12 @@ +# Simple +```python +import sqlite3 +conn = sqlite3.connect('db.sqlite', isolation_level=None) +conn.row_factory = lambda *args: dict(sqlite3.Row(*args)) +sql = lambda *args: list(conn.execute(*args)) +sql('PRAGMA journal_mode=WAL') +``` +# Class ```python class SQL: def __init__(self, filename='db.sqlite'):