peewee Documentation Release 3.6.0# prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Now let’s list all the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re 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.Substr(Person.name, 1, 1)) == Meta: # `indexes` is a tuple of 2-tuples, where the 2-tuples are # a tuple of column names to index and a boolean indicating # whether the index is unique or not. indexes = (0 码力 | 377 页 | 399.12 KB | 1 年前3
peewee Documentation
Release 3.6.0pets 1.2. Quickstart 9 peewee Documentation, Release 3.6.0 Now let’s list all the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re 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.Substr(Person.name, 1, 1)) == backref='related_to') class Meta: # `indexes` is a tuple of 2-tuples, where the 2-tuples are # a tuple of column names to index and a boolean indicating # whether the index is unique or not. indexes = ( # Specify a unique0 码力 | 302 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.5.0# prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Now let’s list all the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re 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.Substr(Person.name, 1, 1)) == Meta: # `indexes` is a tuple of 2-tuples, where the 2-tuples are # a tuple of column names to index and a boolean indicating # whether the index is unique or not. indexes = (0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation
Release 3.5.0# prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Now let’s list all the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re 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.Substr(Person.name, 1, 1)) == backref='related_to') class Meta: # `indexes` is a tuple of 2-tuples, where the 2-tuples are # a tuple of column names to index and a boolean indicating # whether the index is unique or not. indexes = ( # Specify a unique0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation Release 3.4.0# prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Now let’s list all the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re 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.Substr(Person.name, 1, 1)) == Meta: # `indexes` is a tuple of 2-tuples, where the 2-tuples are # a tuple of column names to index and a boolean indicating # whether the index is unique or not. indexes = (0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation
Release 3.3.0# prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Now let’s list all the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re 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.Substr(Person.name, 1, 1)) == backref='related_to') class Meta: # `indexes` is a tuple of 2-tuples, where the 2-tuples are # a tuple of column names to index and a boolean indicating # whether the index is unique or not. indexes = ( # Specify a unique0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0# prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Now let’s list all the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re 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.Substr(Person.name, 1, 1)) == backref='related_to') class Meta: # `indexes` is a tuple of 2-tuples, where the 2-tuples are # a tuple of column names to index and a boolean indicating # whether the index is unique or not. indexes = ( # Specify a unique0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation Release 2.10.2birthday ... 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.Lower(fn.Substr(Person.name, 1, code to connect to an in-memory SQLite database, as well as blank model definitions for the model names specified on the command line. Here is a more complete example, which will use the PostgresqlExtDatabase specify a default ordering, the syntax is similar to that of Django. Meta.order_by is a tuple of field names, and to indicate descending ordering, the field name is prefixed by a '-'. class Person(Model):0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation
Release 2.10.2birthday ... 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.Lower(fn.Substr(Person.name, 1, code to connect to an in-memory SQLite database, as well as blank model definitions for the model names specified on the command line. Here is a more complete example, which will use the PostgresqlExtDatabase specify a default ordering, the syntax is similar to that of Django. Meta.order_by is a tuple of field names, and to indicate descending ordering, the field name is prefixed by a '-'. class Person(Model): first_name0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation Release 3.0.0# prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Now let’s list all the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re 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.Substr(Person.name, 1, 1)) == Meta: # `indexes` is a tuple of 2-tuples, where the 2-tuples are # a tuple of column names to index and a boolean indicating # whether the index is unique or not. indexes = (0 码力 | 319 页 | 361.50 KB | 1 年前3
共 16 条
- 1
- 2













