Description
Three quality gaps found across the cookbook.
1. Duplicate Recipe — fundamentals/parameterized-queries/04_parameterized.py
This file is an exact copy of fundamentals/pycubrid/04_prepared.py. Changes to one won't propagate to the other.
Fix: Make it a thin wrapper that imports from the canonical location, or delete it and add a cross-reference in the README.
2. Benchmark Missing executemany Strategy — performance/bulk-insert/benchmark.py
The benchmark compares per-row commit vs batch commit vs single commit, but never tests cursor.executemany() — the primary bulk insert pattern taught in fundamentals.
Fix: Add Strategy 4 using executemany in chunks (e.g., 500 rows per call).
3. Async Recipe Missing Error Handling — fundamentals/async/01_async_pycubrid.py
The async recipe has only a top-level catch. Given that error handling is a dedicated fundamentals topic, the async recipe should demonstrate async error recovery (try/except within operations).
Fix: Add one operation wrapped in try/except showing async error recovery:
try:
await cursor.execute("INSERT ...")
except pycubrid.InterfaceError as e:
print(f"Connection error: {e}, reconnecting...")
await conn.connect()
Context
Found during line-by-line code review (2025-07-23).
Description
Three quality gaps found across the cookbook.
1. Duplicate Recipe —
fundamentals/parameterized-queries/04_parameterized.pyThis file is an exact copy of
fundamentals/pycubrid/04_prepared.py. Changes to one won't propagate to the other.Fix: Make it a thin wrapper that imports from the canonical location, or delete it and add a cross-reference in the README.
2. Benchmark Missing
executemanyStrategy —performance/bulk-insert/benchmark.pyThe benchmark compares per-row commit vs batch commit vs single commit, but never tests
cursor.executemany()— the primary bulk insert pattern taught in fundamentals.Fix: Add Strategy 4 using
executemanyin chunks (e.g., 500 rows per call).3. Async Recipe Missing Error Handling —
fundamentals/async/01_async_pycubrid.pyThe async recipe has only a top-level catch. Given that error handling is a dedicated fundamentals topic, the async recipe should demonstrate async error recovery (try/except within operations).
Fix: Add one operation wrapped in try/except showing async error recovery:
Context
Found during line-by-line code review (2025-07-23).