什么是 drizzle-orm?
Drizzle ORM 用于 PostgreSQL、MySQL 和 SQLite 的类型安全 SQL。在定义模式、编写查询、管理关系、运行迁移或使用 drizzle-kit 时使用。用于 drizzle、orm、schema、查询、迁移、pgTable、关系、drizzle-kit、drizzle-zod。 来源:oakoss/agent-skills。
Drizzle ORM 用于 PostgreSQL、MySQL 和 SQLite 的类型安全 SQL。在定义模式、编写查询、管理关系、运行迁移或使用 drizzle-kit 时使用。用于 drizzle、orm、schema、查询、迁移、pgTable、关系、drizzle-kit、drizzle-zod。
通过命令行快速安装 drizzle-orm AI 技能到你的开发环境
来源:oakoss/agent-skills。
Drizzle ORM is a lightweight, type-safe TypeScript ORM that maps directly to SQL for PostgreSQL, MySQL, and SQLite. It provides both a SQL-like query builder and a relational queries API, with zero dependencies and full serverless compatibility. Use Drizzle when you need compile-time type safety with SQL-level control; avoid it when you need a full active-record ORM with automatic migrations (use Prisma) or when w...
| Schema definition | pgTable('name', { columns }, (t) => [indexes]) | Third arg returns array of indexes/constraints | | Column types | text(), integer(), boolean(), timestamp() | Import from drizzle-orm/pg-core | | Type inference | typeof table.$inferSelect, $inferInsert | Derive TS types directly from schema |
| Relational queries | db.query.table.findMany({ with, where }) | Requires schema passed to drizzle() client | | SQL-like queries | db.select().from(table).where() | Chainable, returns array of rows | | Insert | db.insert(table).values({}).returning() | .returning() for getting inserted rows |
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/oakoss/agent-skills --skill drizzle-ormDrizzle ORM 用于 PostgreSQL、MySQL 和 SQLite 的类型安全 SQL。在定义模式、编写查询、管理关系、运行迁移或使用 drizzle-kit 时使用。用于 drizzle、orm、schema、查询、迁移、pgTable、关系、drizzle-kit、drizzle-zod。 来源:oakoss/agent-skills。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/oakoss/agent-skills --skill drizzle-orm 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/oakoss/agent-skills