Files
core/lib/doc/dever-database.md
T
2026-11-03 03:32:07 +00:00

20 lines
721 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 数据库错误
数据库错误不暴露 SQL、绑定值或连接凭据。
## dever.database.Error
数据库的连接、约束、超时和解码错误。
分支:
- `error Pool(message: Text)`:连接池不可用
- `error PoolExhausted(message: Text)`:等待连接超过期限
- `error Connection(message: Text)`:连接失败
- `error Timeout(message: Text)`:操作超时
- `error Cancelled(message: Text)`:操作取消
- `error Database(message: Text)`:数据库执行失败
- `error Constraint(message: Text)`:违反约束
- `error NotFound(message: Text)`:记录不存在
- `error InvalidData(message: Text)`:存储值不符合类型
- `error Migration(message: Text)`:schema 与迁移失败