orm docs update

This commit is contained in:
slene
2013-08-13 18:06:01 +08:00
parent 27b84841a7
commit c6a436ed5d
5 changed files with 165 additions and 27 deletions

View File

@@ -15,7 +15,7 @@ qs = o.QueryTable(user) // 返回 QuerySeter
```
## expr
QuerySeter 中用于描述字段和 sql 操作符使用简单的 expr 查询方法
QuerySeter 中用于描述字段和 sql 操作符使用简单的 expr 查询方法
字段组合的前后顺序依照表的关系,比如 User 表拥有 Profile 的外键,那么对 User 表查询对应的 Profile.Age 为条件,则使用 `Profile__Age` 注意,字段的分隔符号使用双下划线 `__`,除了描述字段, expr 的尾部可以增加操作符以执行对应的 sql 操作。比如 `Profile__Age__gt` 代表 Profile.Age > 18 的条件查询。