摘要: 1. equal 2. not equal 3. like, ilike 4.in 5. not in 6. is null 7. is not null 8. and 9. or #### 如果想查看orm底层查询sql可以在filter函数后面不写人物的函数如: 阅读全文
posted @ 2018-03-23 23:28 小小易拉罐 阅读(7345) 评论(0) 推荐(0) 编辑
摘要: ### query可用参数:1. 模型对象。指定查找这个模型中所有的对象。2. 模型中的属性。可以指定只查找某个模型的其中几个属性。3. 聚合函数。 * func.count:统计行的数量。 * func.avg:求平均值。 * func.max:求最大值。 * func.min:求最小值。 * f 阅读全文
posted @ 2018-03-23 22:54 小小易拉罐 阅读(1065) 评论(0) 推荐(0) 编辑
摘要: ### Column常用参数:1. primary_key:设置某个字段为主键。2. autoincrement:设置这个字段为自动增长的。3. default:设置某个字段的默认值。在发表时间这些字段上面经常用。4. nullable:指定某个字段是否为空。默认值是True,就是可以为空。5. u 阅读全文
posted @ 2018-03-23 22:32 小小易拉罐 阅读(1074) 评论(0) 推荐(0) 编辑