Skip to content

feat: add 8 v1.6.x feature recipes#27

Merged
yeongseon merged 2 commits into
mainfrom
feat/v1.6-cookbook-recipes
Jul 18, 2026
Merged

feat: add 8 v1.6.x feature recipes#27
yeongseon merged 2 commits into
mainfrom
feat/v1.6-cookbook-recipes

Conversation

@yeongseon

Copy link
Copy Markdown
Contributor

Summary

Adds 8 new cookbook recipes covering pycubrid v1.6.0/v1.6.1 and sqlalchemy-cubrid v1.6.0 features that previously had zero examples. Oracle design review: `ses_08a7adf25ffecqa4sT46tsBhdw`. Post-implementation review in progress (`bg_1d24302f`).

Recipes Added

New topic folders (4 recipes)

Recipe Covers
`fundamentals/async/01_async_pycubrid.py` `pycubrid.aio.connect()`, async CRUD, async context managers
`fundamentals/async/02_async_sqlalchemy.py` `cubrid+aiopycubrid://` AsyncEngine, async_sessionmaker
`fundamentals/alembic/01_alembic_programmatic.py` `alembic.command` API, CubridImpl auto-discovery, autogenerate
`fundamentals/json/01_json_crud.py` Native JSON columns, JSON_EXTRACT/UNQUOTE gotcha
`fundamentals/isolation-levels/01_isolation_levels.py` 6 numeric levels + dirty-read demonstration

Extended driver folders (3 recipes)

Recipe Covers
`fundamentals/sqlalchemy/07_collection_types.py` SET/MULTISET/SEQUENCE ORM types
`fundamentals/pycubrid/15_cursor_memory_bound.py` `fetch_size` + tracemalloc peak-memory comparison
`fundamentals/pycubrid/16_batch_error_handling.py` `executemany_batch` error paths (#186 fix), retry-after-failure

Key Patterns Documented

  • JSON gotcha: `JSON_EXTRACT` returns JSON-typed values (strings double-quoted). Must wrap with `JSON_UNQUOTE` for raw scalar.
  • fetch_size vs arraysize: `fetch_size` = server page size (connection-level); `arraysize` = client batch size for `fetchmany()`. They are independent.
  • Isolation levels: CUBRID uses numeric levels 1-6 (`SET TRANSACTION ISOLATION LEVEL 4`), each combining SCHEMA + INSTANCES stability.
  • Batch errors: `executemany_batch` takes `list[str]` of complete SQL statements and raises the first per-statement error (fixed in v1.6.1, issue #186).

Static Checks

  • ✅ All 8 recipes pass `ast.parse` (syntax valid)
  • ✅ All 8 pass `ruff check` (0 errors after auto-fix)
  • ✅ All 8 pass `ruff format`
  • ⚠️ No live CUBRID available for runtime verification (CI will validate)

Docs Updated

  • README.md, fundamentals/README.md, fundamentals/pycubrid/README.md
  • llms.txt, SUPPORT_MATRIX.md, CHANGELOG.md

Ultraworked with Sisyphus

Adds 8 new cookbook recipes covering features shipped in pycubrid
v1.6.0/v1.6.1 and sqlalchemy-cubrid v1.6.0 that previously had zero
examples:

New topic folders:
- fundamentals/async/          — pycubrid.aio + SQLAlchemy async engine
- fundamentals/alembic/        — programmatic Alembic migrations
- fundamentals/json/           — native JSON columns + JSON_EXTRACT/UNQUOTE
- fundamentals/isolation-levels/ — 6 numeric levels + dirty-read demo

Extended driver folders:
- fundamentals/sqlalchemy/07_collection_types.py — SET/MULTISET/SEQUENCE ORM
- fundamentals/pycubrid/15_cursor_memory_bound.py — fetch_size + tracemalloc
- fundamentals/pycubrid/16_batch_error_handling.py — executemany_batch errors

Docs updated: README.md, fundamentals/README.md, fundamentals/pycubrid/README.md,
llms.txt, SUPPORT_MATRIX.md, CHANGELOG.md.

All 8 scripts pass ruff check, ruff format, and ast.parse static checks.

Oracle design review: ses_08a7adf25ffecqa4sT46tsBhdw

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@yeongseon yeongseon added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 18, 2026
3 fixes from Oracle review (session ses_08a7544c2ffev6MH10xHzTpMRa):

MANDATORY:
- Rename 01_alembic_programmatic.py → alembic_programmatic.py
  Module names starting with digits are invalid Python identifiers.
  Updated docstring, run command, and env.py import line.

RECOMMENDED:
- Add CUBRID 11.2+ ->/->> JSON operator shorthand to cheat sheet
- Add time.sleep(0.1) before writer_done.set() in dirty-read demo
  to eliminate theoretical startup race condition

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@yeongseon
yeongseon merged commit ff24a77 into main Jul 18, 2026
1 check failed
@yeongseon
yeongseon deleted the feat/v1.6-cookbook-recipes branch July 18, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants