重构:清理项目结构和完善文档

- 添加完整的 DOCS.md 文档(1376 行)
- 更新 README.md,增强项目说明
- 清理临时示例和测试数据
- 删除诊断工具(已完成测试)
- 为 webui 示例准备测试数据
- 优化 .gitignore 配置
- 增强 Query 和 Schema 功能
- 改进 SSTable 编码处理
This commit is contained in:
2025-10-10 16:38:19 +08:00
parent 8d750505fb
commit 7d2bb4745c
76 changed files with 1865 additions and 3587 deletions

View File

@@ -142,13 +142,14 @@ table, _ := db.CreateTable("users", schema)
- Schema `Insert()` 时强制验证类型和必填字段
- 索引字段`Indexed: true`自动创建二级索引
- Schema 持久化到 `table_dir/schema.json`包含校验和防篡改
- **支持的类型** (17 精确映射到 Go 基础类型):
- **支持的类型** (21 精确映射到 Go 基础类型):
- **有符号整数** (5种): `Int`, `Int8`, `Int16`, `Int32`, `Int64`
- **无符号整数** (5种): `Uint`, `Uint8`, `Uint16`, `Uint32`, `Uint64`
- **浮点数** (2种): `Float32`, `Float64`
- **字符串** (1种): `String`
- **布尔** (1种): `Bool`
- **特殊类型** (3): `Byte` (独立类型底层=uint8), `Rune` (独立类型底层=int32), `Decimal` (高精度十进制使用 shopspring/decimal)
- **特殊类型** (5): `Byte` (独立类型底层=uint8), `Rune` (独立类型底层=int32), `Decimal` (高精度十进制使用 shopspring/decimal), `Time` (time.Time), `Duration` (time.Duration)
- **复杂类型** (2种): `Object` (map[string]xxxstruct{}、*struct{}使用 JSON 编码), `Array` ([]xxx 切片使用 JSON 编码)
- **Nullable 支持**: 字段可标记为 `Nullable: true`允许 NULL
### 类型系统详解