peewee Documentation Release 0.9.7
evaluated here [u'admin', u'staff', u'editor'] We can build up the query by adding some clauses to it: >>> user_q = user_q.where(username__in=['admin', 'editor']) >>> user_q = user_q.order_by(('username' order_by(('username', 'desc')) >>> [u.username for u in user_q] # <-- query is re- evaluated here [u'editor', u'admin'] Django-style queries If you are already familiar with the Django ORM, you can construct SelectQuery0 码力 | 78 页 | 143.68 KB | 1 年前3peewee Documentation Release 0.9.7
u’staff’, u’editor’] 1.7. Querying API 29 peewee Documentation, Release 0.9.7 We can build up the query by adding some clauses to it: >>> user_q = user_q.where(username__in=[’admin’, ’editor’]) >>> user_q order_by((’username’, ’desc’)) >>> [u.username for u in user_q] # <-- query is re-evaluated here [u’editor’, u’admin’] Django-style queries If you are already familiar with the Django ORM, you can construct0 码力 | 53 页 | 347.03 KB | 1 年前3peewee Documentation Release 2.0.2
evaluated here [u’admin’, u’staff’, u’editor’] We can build up the query by adding some clauses to it: >>> user_q = user_q.where(User.username << [’admin’, ’editor’]) >>> user_q = user_q.order_by(User order_by(User.username.desc()) >>> [u.username for u in user_q] # <-- query is re-evaluated here [u’editor’, u’admin’] Looking at some simple queries Get active users: User.select().where(User.active==True) Get0 码力 | 65 页 | 315.33 KB | 1 年前3peewee Documentation Release 1.0.0
evaluated here [u'admin', u'staff', u'editor'] We can build up the query by adding some clauses to it: >>> user_q = user_q.where(username__in=['admin', 'editor']) >>> user_q = user_q.order_by(('username' order_by(('username', 'desc')) >>> [u.username for u in user_q] # <-- query is re- evaluated here [u'editor', u'admin'] Django-style queries If you are already familiar with the Django ORM, you can construct SelectQuery0 码力 | 101 页 | 163.20 KB | 1 年前3peewee Documentation Release 1.0.0
evaluated here [u’admin’, u’staff’, u’editor’] We can build up the query by adding some clauses to it: >>> user_q = user_q.where(username__in=[’admin’, ’editor’]) >>> user_q = user_q.order_by((’username’ order_by((’username’, ’desc’)) >>> [u.username for u in user_q] # <-- query is re-evaluated here [u’editor’, u’admin’] Django-style queries If you are already familiar with the Django ORM, you can construct SelectQuery0 码力 | 71 页 | 405.29 KB | 1 年前3peewee Documentation Release 2.10.2
who are either editors or administrators: sq = SelectQuery(Tweet).join(User).where( (User.is_editor == True) | (User.is_admin == True)) Parameters: Return type: Parameters: Return type: Parameters:0 码力 | 275 页 | 276.96 KB | 1 年前3peewee Documentation Release 2.10.2
users who are either editors or administrators: sq = SelectQuery(Tweet).join(User).where( (User.is_editor == True) | (User.is_admin == True)) 1.14. API Reference 165 peewee Documentation, Release 2.100 码力 | 221 页 | 844.06 KB | 1 年前3peewee Documentation Release 3.0.0
users who are either editors or administrators: sq = Tweet.select().join(User).where( (User.is_editor == True) | (User.is_admin == True)) Example of deleting tweets by users who are no longer active:0 码力 | 319 页 | 361.50 KB | 1 年前3peewee Documentation Release 3.5.0
users who are either editors or administrators: sq = Tweet.select().join(User).where( (User.is_editor == True) | (User.is_admin == True)) Example of deleting tweets by users who are no longer active:0 码力 | 347 页 | 380.80 KB | 1 年前3peewee Documentation Release 3.4.0
users who are either editors or administrators: sq = Tweet.select().join(User).where( (User.is_editor == True) | (User.is_admin == True)) Example of deleting tweets by users who are no longer active:0 码力 | 349 页 | 382.34 KB | 1 年前3
共 16 条
- 1
- 2