DrizzleORM v0.28.3 发布
Aug 22, 2023
修复
- 修复了当结果为空时,sqlite-proxy 和 SQL.js 的 ‘.get()’ 响应的问题
新功能
🎉 添加了 SQLite 简化查询 API
🎉 为列构建器添加了 $defaultFn()
/ $default()
方法
更多信息请参考 PostgreSQL、MySQL 和 SQLite 的文档。
您可以为运行时默认值的函数(如 cuid()
)指定任何逻辑和任何实现。Drizzle 不限制您可以添加的实现数量。
注意:该值不影响
drizzle-kit
的行为,它只在drizzle-orm
的运行时使用。
🎉 添加了更方便的表模型类型推断的 table.$inferSelect
/ table._.inferSelect
和 table.$inferInsert
/ table._.inferInsert
- 🛠 将
InferModel
类型废弃,推荐使用更明确的InferSelectModel
和InferInsertModel
- 🛠 禁用了
.d.ts
文件的绑定。