peewee Documentation
Release 3.5.0Pet.select().where(Pet.owner == uncle_bob): print(pet.name) Sorting Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob) text columns. To ensure that comparisons work correctly, the dates need to be formatted so they are sorted lexicographically. That is why they are stored, by default, as YYYY-MM-DD HH:MM:SS. BitField and field to use for value. Defaults to PickleField. ordered (bool) – data should be returned in key-sorted order. database (Database) – database where key/value data is stored. If not specified, an in-memory0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation Release 3.4.0Pet.select().where(Pet.owner == uncle_bob): print(pet.name) Sorting Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob) Select(columns=(maxq, 'Spa', 20, 30, 100000, 800)) query = Facility.insert_from(subq, Facility._meta.sorted_fields) Update some existing data We made a mistake when entering the data for the second tennis slots booked per facility. For now, just produce an output table consisting of facility id and slots, sorted by facility id. SELECT facid, SUM(slots) FROM bookings GROUP BY facid ORDER BY facid; query = (Booking0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation
Release 3.5.0Pet.select().where(Pet.owner == uncle_bob): print(pet.name) Sorting Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob) text columns. To ensure that comparisons work correctly, the dates need to be formatted so they are sorted lexicographically. That is why they are stored, by default, as YYYY-MM-DD HH:MM:SS. BitField and field to use for value. Defaults to PickleField. • ordered (bool) – data should be returned in key-sorted order. • database (Database) – database where key/value data is stored. If not specified, an in-memory0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.3.0Pet.select().where(Pet.owner == uncle_bob): print(pet.name) Sorting Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob) Select(columns=(maxq, 'Spa', 20, 30, 100000, 800)) query = Facility.insert_from(subq, Facility._meta.sorted_fields) Update some existing data We made a mistake when entering the data for the second tennis slots booked per facility. For now, just produce an output table consisting of facility id and slots, sorted by facility id. SELECT facid, SUM(slots) FROM bookings GROUP BY facid ORDER BY facid; query = (Booking0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0Pet.select().where(Pet.owner == uncle_bob): print(pet.name) Sorting Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob) Select(columns=(maxq, 'Spa', 20, 30, 100000, 800)) query = Facility.insert_from(subq, Facility._meta.sorted_fields) Update some existing data We made a mistake when entering the data for the second tennis slots booked per facility. For now, just produce an output table consisting of facility id and slots, sorted by facility id. SELECT facid, SUM(slots) FROM bookings GROUP BY facid ORDER BY facid; query = (Booking0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation Release 3.0.0Pet.select().where(Pet.owner == uncle_bob): print pet.name Sorting Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob) Select(columns=(maxq, 'Spa', 20, 30, 100000, 800)) query = Facility.insert_from(subq, Facility._meta.sorted_fields) Update some existing data We made a mistake when entering the data for the second tennis slots booked per facility. For now, just produce an output table consisting of facility id and slots, sorted by facility id. SELECT facid, SUM(slots) FROM bookings GROUP BY facid ORDER BY facid; query = (Booking0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation Release 3.1.0Pet.select().where(Pet.owner == uncle_bob): print(pet.name) Sorting Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob) Select(columns=(maxq, 'Spa', 20, 30, 100000, 800)) query = Facility.insert_from(subq, Facility._meta.sorted_fields) Update some existing data We made a mistake when entering the data for the second tennis slots booked per facility. For now, just produce an output table consisting of facility id and slots, sorted by facility id. SELECT facid, SUM(slots) FROM bookings GROUP BY facid ORDER BY facid; query = (Booking0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation Release 3.6.0Pet.select().where(Pet.owner == uncle_bob): print(pet.name) Sorting Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob) text columns. To ensure that comparisons work correctly, the dates need to be formatted so they are sorted lexicographically. That is why they are stored, by default, as YYYY-MM-DD HH:MM:SS. BitField and field to use for value. Defaults to PickleField. ordered (bool) – data should be returned in key-sorted order. database (Database) – database where key/value data is stored. If not specified, an in-memory0 码力 | 377 页 | 399.12 KB | 1 年前3
peewee Documentation
Release 3.6.0Pet.select().where(Pet.owner == uncle_bob): print(pet.name) Sorting Let’s make sure these are sorted alphabetically by adding an order_by() clause: for pet in Pet.select().where(Pet.owner == uncle_bob) text columns. To ensure that comparisons work correctly, the dates need to be formatted so they are sorted lexicographically. That is why they are stored, by default, as YYYY-MM-DD HH:MM:SS. BitField and field to use for value. Defaults to PickleField. • ordered (bool) – data should be returned in key-sorted order. • database (Database) – database where key/value data is stored. If not specified, an in-memory0 码力 | 302 页 | 1.02 MB | 1 年前3
peewee Documentation Release 2.10.2in Pet.select().where(Pet.owner == uncle_bob): ... print pet.name Let’s make sure these are sorted alphabetically by adding an order_by() clause: >>> for pet in Pet.select().where(Pet.owner == uncle_bob) text columns. To ensure that comparisons work correctly, the dates need to be formatted so they are sorted lexicographically. That is why they are stored, by default, as YYYY-MM-DD HH:MM:SS. BareField The value field, e.g. an instance of TextField. ordered (boolean) – Whether the keys should be returned i sorted order database (Database) – Database class to use for the storag backend. If none is supplied, an0 码力 | 275 页 | 276.96 KB | 1 年前3
共 14 条
- 1
- 2













