peewee Documentation
Release 3.6.0every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case G: expression = fn.Lower(fn operation and can be done quickly using the interactive interpreter. We can create a small helper function to accomplish this: def create_tables(): with database: database.create_tables([User, Relationship0 码力 | 302 页 | 1.02 MB | 1 年前3
peewee Documentation Release 3.6.0every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case G: expression = fn.Lower(fn operation and can be done quickly using the interactive interpreter. We can create a small helper function to accomplish this: def create_tables(): with database: database.create_tables([User0 码力 | 377 页 | 399.12 KB | 1 年前3
peewee Documentation
Release 3.5.0Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case G: expression = fn.Lower(fn operation and can be done quickly using the interactive interpreter. We can create a small helper function to accomplish this: def create_tables(): with database: database.create_tables([User0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation
Release 3.5.0every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case G: expression = fn.Lower(fn operation and can be done quickly using the interactive interpreter. We can create a small helper function to accomplish this: def create_tables(): with database: database.create_tables([User, Relationship0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation Release 3.4.0Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case G: expression = fn.Lower(fn operation and can be done quickly using the interactive interpreter. We can create a small helper function to accomplish this: def create_tables(): with database: database.create_tables([User0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation
Release 3.4.0every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case G: expression = fn.Lower(fn operation and can be done quickly using the interactive interpreter. We can create a small helper function to accomplish this: def create_tables(): with database: database.create_tables([User, Relationship0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation
Release 3.3.0every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case G: expression = fn.Lower(fn operation and can be done quickly using the interactive interpreter. We can create a small helper function to accomplish this: def create_tables(): with database: database.create_tables([User, Relationship0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation Release 3.1.0Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case G: expression = fn.Lower(fn operation and can be done quickly using the interactive interpreter. We can create a small helper function to accomplish this: def create_tables(): with database: database.create_tables([User0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation Release 3.0.0Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case G: expression = fn.Lower(fn operation and can be done quickly using the interactive interpreter. We can create a small helper function to accomplish this: def create_tables(): with database: database.create_tables([User0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation Release 2.10.2print person.name, person.birthday ... Herb 1950-05-05 One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case G: >>> expression = (fn operation and can be done quickly using the interactive interpreter. We can create a small helper function to accomplish this: def create_tables(): database.connect() database.create_tables([User Support for paginating lists of results is implemented in a simple function called object_list (after it’s corollary in Django). This function is used by all the views that return lists of objects. def ob0 码力 | 275 页 | 276.96 KB | 1 年前3
共 16 条
- 1
- 2













