drizzle-orm-best-practices
/drizzle-orm-best-practices
Dostarcza konwencje Drizzle ORM zależne od dialektu dla bezpiecznych granic zapytań, mutacji i transakcji, przy pisaniu i przeglądzie schematów, zapytań, transakcji i surowego SQL.
- Autor
- bastidood ↗
- Repozytorium
- skills ↗
- Licencja
- MPL-2.0
- Ostatnia zmiana repozytorium
- 13.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 9
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.
MPL-2.0, otwarta.
Co robi i kiedy
Dostarcza konwencje Drizzle ORM zależne od dialektu dla bezpiecznych granic zapytań, mutacji i transakcji, przy pisaniu i przeglądzie schematów, zapytań, transakcji i surowego SQL.
Oryginalny opis (EN)
Dialect-aware Drizzle ORM conventions for safe query, mutation, and transaction boundaries. Use when writing, debugging, or reviewing schemas, queries, transactions, or raw SQL.
Jak działa
- Library Sources
- Effective Strategies for Drizzle ORM
Podgląd SKILL.md
--- name: drizzle-orm-best-practices description: Dialect-aware Drizzle ORM conventions for safe query, mutation, and transaction boundaries. Use when writing, debugging, or reviewing schemas, queries, transactions, or raw SQL. --- # Drizzle ORM Best Practices Treat Drizzle as a typed SQL builder over SQL dialect and driver contracts. Search its builders, operators, and helpers before writing `sql`. Keep data scope and invariants in SQL, read mutation metadata from the configured driver, let the database own persisted current time, and decode every unavoidable raw result at runtime. ## Library Sources - GitHub repository ID: `drizzle-team/drizzle-orm` - Context7 library ID: `/drizzle-team/drizzle-orm-docs` - DeepWiki repository ID: `drizzle-team/drizzle-orm` Use Context7 for current documentation and DeepWiki when documentation is insufficient or conflicts with implementation. ## Effective Strategies for Drizzle ORM Read the linked guidance that governs the current task before writing or reviewing Drizzle code. 1. Keep SQL construction, data scope, and write contracts in the database boundary. - Before introducing any raw SQL, exhaust the [built-in query builders and helpers](./references/built-in-query-helpers.md) so Drizzle keeps ownership of SQL generation, parameterization, and result decoding. - When a read exposes more data than its caller needs or checks access after retrieval, enforce [query scope at the database boundary](./references/query-scope.md). - When behavior depends on whether a write changed zero, one, or many rows, interpret [mutation cardinality from the driver result](./references/mutation-cardinality.md) without returning row data solely to count it. - When several statements preserve one invariant, define a [transaction boundary](./references/transaction-boundaries.md) that passes the transaction through every participating helper. - When persisted timestamps mean the database's current time, use [database-generated timestamps](./references/database-timestamps.md) instead of an application clock. 2. Treat every raw result as untrusted at the ORM boundary. - When an unavoidable `sql` expression returns a value, apply [runtime expression decoding](./references/sql-expression-decoding.md) and ban compile-time-only result annotations. - When a builder cannot represent a result-bearing operation, contain it behind [complete raw-result validation](./references/raw-query-results.md) rather than trusting a generic result type.
Pliki w paczce (9)
- SKILL.md 2 KB
- agents/openai.yaml 1 KB
- references/built-in-query-helpers.md 4 KB
- references/database-timestamps.md 1 KB
- references/mutation-cardinality.md 2 KB
- references/query-scope.md 1 KB
- references/raw-query-results.md 1 KB
- references/sql-expression-decoding.md 2 KB
- references/transaction-boundaries.md 2 KB
Wersje
W bazie nie ma innych skilli o nazwie drizzle-orm-best-practices.
Migawka bazy z 13.11.2026 · wersja paczki 20e91d7a1523 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100drizzle-orm
Stosuje wzorce Drizzle ORM dla schematów, migracji, zapytań, typów brandowanych i granic między Postgres a D1. - 100drizzle-orm-patterns
Dostarcza wzorce Drizzle ORM dla schematów, operacji CRUD, relacji, zapytań, transakcji i migracji w Drizzle Kit, z PostgreSQL, MySQL, SQLite, MSSQL i CockroachDB. - 100drizzle-orm-sql-first-schema
Pomaga pisać lekkie, relacyjne schematy i zapytania w Drizzle ORM, z minimalnym narzutem i podejściem SQL-first. - 100drizzle-orm-expert
Wspiera projektowanie warstwy bazodanowej w Drizzle ORM dla TypeScripta: schematy, zapytania relacyjne, migracje i integracja z bazami serverless. - 85Drizzle ORM
Prowadzi przez Drizzle ORM: schematy, zapytania, relacje, migracje, integrację z TypeScript dla SQLite i PostgreSQL oraz Drizzle Studio. - 100drizzle-orm-d1
Obsługuje Drizzle ORM dla baz Cloudflare D1: schematy, typowane zapytania, migracje Drizzle Kit, relacje, prepared statements, batch API oraz błędy D1_ERROR.