From aj-geddes-useful-ai-prompts-4
Manages database transactions for ACID compliance, concurrency control, isolation levels, explicit locking, and deadlock prevention in PostgreSQL and MySQL.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4This skill uses the workspace's default tool permissions.
- [Overview](#overview)
references/deadlock-prevention.mdreferences/mysql-isolation-levels.mdreferences/mysql-locking.mdreferences/mysql-transactions.mdreferences/postgresql-explicit-locking.mdreferences/postgresql-isolation-levels.mdreferences/postgresql-transactions.mdscripts/validate-schema.shtemplates/migration-template.sqlSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Implement robust transaction management with ACID compliance, concurrency control, and error handling. Covers isolation levels, locking strategies, and deadlock resolution.
Simple Transaction:
-- Start transaction
BEGIN;
-- Multiple statements
UPDATE accounts SET balance = balance - 100 WHERE id = 1;
UPDATE accounts SET balance = balance + 100 WHERE id = 2;
-- Commit changes
COMMIT;
-- Or rollback
ROLLBACK;
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| PostgreSQL Transactions | PostgreSQL Transactions |
| MySQL Transactions | MySQL Transactions |
| PostgreSQL Isolation Levels | PostgreSQL Isolation Levels |
| MySQL Isolation Levels | MySQL Isolation Levels |
| PostgreSQL Explicit Locking | PostgreSQL Explicit Locking |
| MySQL Locking | MySQL Locking |
| Deadlock Prevention | PostgreSQL - Deadlock Detection: |