hit9/CURD.py — pull request #12 by PeerXu (2014-02-07 10:09:27+00:00)
Title: fix bug: select statement with where syntax without priority

当执行查询时, 查询条件中存在优先级的情况下, 无法处理优先级的情况.

import CURD
CURD.Database.config(user='root',passwd='asd',db='curdtest')
import models
User=models.User
User(name='Peer.Xu',email='just.for.fun@gmail.com').save()
assert len(list(User.where((User.id<0)&((User.name=='Peer.Xu')|(User.email=='just.for.fun@gmail.com'))).getall())) == 0