peewee Documentation Release 3.6.0
Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob).order_by(Pet.name): print(pet.name) # prints: # Fido # Kitty Kitty Let’s list all the people now, youngest to oldest: for person in Person.select().order_by(Person.birthday.desc()): print(person.name, person.birthday) # prints: # Bob 1960-01-15 # Herb 1950-05-05 .join(Pet, JOIN.LEFT_OUTER) # include people without pets. .group_by(Person) .order_by(Person.name)) for person in query: # "pet_count" becomes an attribute on the returned model0 码力 | 377 页 | 399.12 KB | 1 年前3peewee Documentation Release 3.0.0
Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob).order_by(Pet.name): print pet.name # prints: # Fido # Kitty Let’s list all the people now, youngest to oldest: for person in Person.select().order_by(Person.birthday.desc()): print person.name, person.birthday # prints: # Bob 1960-01-15 # Herb 1950-05-05 .join(Pet, JOIN.LEFT_OUTER) # include people without pets. .group_by(Person) .order_by(Person.name)) for person in query: # "pet_count" becomes an attribute on the returned model0 码力 | 319 页 | 361.50 KB | 1 年前3peewee Documentation Release 3.5.0
Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob).order_by(Pet.name): print(pet.name) # prints: # Fido # Kitty Kitty Let’s list all the people now, youngest to oldest: for person in Person.select().order_by(Person.birthday.desc()): print(person.name, person.birthday) # prints: # Bob 1960-01-15 # Herb 1950-05-05 .join(Pet, JOIN.LEFT_OUTER) # include people without pets. .group_by(Person) .order_by(Person.name)) for person in query: # "pet_count" becomes an attribute on the returned model0 码力 | 347 页 | 380.80 KB | 1 年前3peewee Documentation Release 3.4.0
Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob).order_by(Pet.name): print(pet.name) # prints: # Fido # Kitty Kitty Let’s list all the people now, youngest to oldest: for person in Person.select().order_by(Person.birthday.desc()): print(person.name, person.birthday) # prints: # Bob 1960-01-15 # Herb 1950-05-05 .join(Pet, JOIN.LEFT_OUTER) # include people without pets. .group_by(Person) .order_by(Person.name)) for person in query: # "pet_count" becomes an attribute on the returned model0 码力 | 349 页 | 382.34 KB | 1 年前3peewee Documentation Release 3.1.0
Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob).order_by(Pet.name): print(pet.name) # prints: # Fido # Kitty Kitty Let’s list all the people now, youngest to oldest: for person in Person.select().order_by(Person.birthday.desc()): print(person.name, person.birthday) # prints: # Bob 1960-01-15 # Herb 1950-05-05 .join(Pet, JOIN.LEFT_OUTER) # include people without pets. .group_by(Person) .order_by(Person.name)) for person in query: # "pet_count" becomes an attribute on the returned model0 码力 | 332 页 | 370.77 KB | 1 年前3peewee Documentation Release 2.10.2
Let’s make sure these are sorted alphabetically by adding an order_by() clause: >>> for pet in Pet.select().where(Pet.owner == uncle_bob).order_by(Pet.name): ... print pet.name ... Fido Kitty Let’s Let’s list all the people now, youngest to oldest: >>> for person in Person.select().order_by(Person.birthday.desc()): ... print person.name, person.birthday ... Bob 1960-01-15 Herb 1950-05-05 Grandma select(Person, Pet, subquery.alias('pet_count')) ... .join(Pet, JOIN.LEFT_OUTER) ... .order_by(Person.name)) >>> for person in query.aggregate_rows(): # Note the `aggregate_rows()` call.0 码力 | 275 页 | 276.96 KB | 1 年前3peewee Documentation Release 0.9.7
show me page 3 (users 41- 60) User.select().order_by(('username', 'asc')).paginate(3, 20) # order users by number of tweets User.select().annotate(Tweet).order_by(('count', 'desc')) # another way of expressing same User.select({ User: ['*'], Tweet: [Count('id', 'count')] }).group_by('id').join(Tweet).order_by(('count', 'desc')) # do an atomic update TweetCount.update(count=F('count') + 1).where(user=charlie) select query and any methods available to SelectQuery are available: >>> for entry in blog.entry_set.order_by(('pub_date', 'desc')): ... print entry.title ... entry 4 entry 3 entry 2 entry 1 Filtering0 码力 | 78 页 | 143.68 KB | 1 年前3peewee Documentation Release 1.0.0
show me page 3 (users 41- 60) User.select().order_by(('username', 'asc')).paginate(3, 20) # order users by number of tweets User.select().annotate(Tweet).order_by(('count', 'desc')) # another way of expressing same User.select({ User: ['*'], Tweet: [Count('id', 'count')] }).group_by('id').join(Tweet).order_by(('count', 'desc')) # do an atomic update TweetCount.update(count=F('count') + 1).where(user=charlie) select query and any methods available to SelectQuery are available: >>> for entry in blog.entry_set.order_by(('pub_date', 'desc')): ... print entry.title ... entry 4 entry 3 entry 2 entry 1 Filtering0 码力 | 101 页 | 163.20 KB | 1 年前3httpd 2.2.31 中文文档
Server Version 2.2 Apache > HTTP Server > Documentation > Version 2.2 Upgrading to 2.2 from 2.0 In order to assist folks upgrading, we maintain a document describing information critical to existing Apache directives as parsed by Apache, including their file name and line number. The module also shows the order of all request hooks and additional build information, similar to httpd -V. mod_ssl Added a support is default of 80 (or any other port below 1024), then it is necessary to have root privileges in order to start apache, so that it can bind to this privileged port. Once the server has started and performed0 码力 | 1860 页 | 1.48 MB | 1 年前3httpd 2.2.29 中文文档
Server Version 2.2 Apache > HTTP Server > Documentation > Version 2.2 Upgrading to 2.2 from 2.0 In order to assist folks upgrading, we maintain a document describing information critical to existing Apache directives as parsed by Apache, including their file name and line number. The module also shows the order of all request hooks and additional build information, similar to httpd -V. mod_ssl Added a support is default of 80 (or any other port below 1024), then it is necessary to have root privileges in order to start apache, so that it can bind to this privileged port. Once the server has started and performed0 码力 | 1854 页 | 1.48 MB | 1 年前3
共 583 条
- 1
- 2
- 3
- 4
- 5
- 6
- 59