SQLite best practices for Python -- PRAGMAs per connection, context manager transactions, parameterized queries, row_factory, executemany, FK indexes
92
90%
Does it follow best practices?
Impact
97%
1.73xAverage score across 5 eval scenarios
Passed
No known issues
WAL mode enabled
0%
100%
Foreign keys ON
0%
100%
Busy timeout set
0%
100%
Row factory configured
0%
100%
Checkout uses atomic transaction
71%
57%
Return uses atomic transaction
70%
100%
Bulk add uses transaction
87%
100%
Parameterized queries throughout
100%
100%
Indexes on FK columns
0%
100%
UNIQUE constraints on ISBN and email
100%
100%
Dates as ISO TEXT strings
60%
100%
Connection properly managed
100%
100%
CHECK constraint on status columns
100%
100%
WAL mode enabled
100%
100%
Foreign keys ON
100%
100%
Busy timeout set
0%
100%
Row factory configured
100%
100%
Registration uses atomic transaction
92%
100%
Cancel-and-promote uses transaction
91%
100%
Bulk create uses transaction
100%
100%
Parameterized queries throughout
100%
90%
UNIQUE constraint on member+event
100%
100%
Indexes on FK columns
16%
66%
Connection properly managed
100%
100%
CHECK constraint on status
0%
100%
WAL mode enabled
0%
100%
Foreign keys ON
0%
100%
Busy timeout set
0%
100%
Row factory configured
0%
100%
Receive shipment uses context manager transaction
33%
100%
Record sale uses context manager with validation
33%
100%
Parameterized queries throughout
100%
100%
executemany for bulk inserts
0%
0%
Indexes on FK columns
0%
100%
Money as INTEGER cents
0%
100%
Connection properly closed
100%
100%
Dates as ISO TEXT strings
50%
100%
WAL mode enabled
100%
100%
Foreign keys ON
100%
100%
Busy timeout set
0%
100%
Row factory configured
100%
100%
Money stored as INTEGER cents
0%
100%
Transfer uses context manager transaction
100%
100%
Record transaction uses context manager
100%
100%
CSV import uses transaction
80%
100%
Parameterized queries throughout
100%
100%
Indexes on FK and query columns
0%
100%
Connection properly closed
100%
100%
CHECK constraints on types
100%
100%
WAL mode enabled
0%
100%
Foreign keys ON
100%
100%
Busy timeout set
0%
100%
Row factory configured
100%
100%
Context manager for recipe creation
0%
100%
Context manager for recipe update
0%
100%
Parameterized queries throughout
100%
100%
ON DELETE CASCADE on ingredients FK
100%
100%
Indexes on FK and search columns
0%
100%
Many-to-many via junction table
100%
100%
Connection properly closed
100%
100%
executemany for bulk ingredient inserts
0%
100%