Update sqlite3-python/README.md

This commit is contained in:
2024-09-22 23:47:41 -04:00
parent 4f9df9a777
commit d34a293113

View File

@@ -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'):