peewee Documentation Release 2.10.2we will use SqliteDatabase. The first parameter is the filename containing the database, or the string :memory: to create an in-memory database. After the database filename, you can specify arbitrary BerkeleyDatabase. Like SqliteDatabase, the first parameter is the filename containing the database or the string :memory: to create an in-memory database. from playhouse.berkeleydb import BerkeleyDatabase berkeley_db verbose_name = None – string representing the “user-friendly” name of this field help_text = None – string representing any helpful text for this field db_column = None – string representing the underlying0 码力 | 275 页 | 276.96 KB | 1 年前3
 peewee Documentation
Release 2.10.2we will use SqliteDatabase. The first parameter is the filename containing the database, or the string :memory: to create an in-memory database. After the database filename, you can specify arbitrary BerkeleyDatabase. Like SqliteDatabase, the first pa- rameter is the filename containing the database or the string :memory: to create an in-memory database. from playhouse.berkeleydb import BerkeleyDatabase berkeley_db verbose_name = None – string representing the “user-friendly” name of this field • help_text = None – string representing any helpful text for this field • db_column = None – string representing the underlying0 码力 | 221 页 | 844.06 KB | 1 年前3
 peewee Documentation Release 1.0.0verbose_name = None – string representing the “user-friendly” name of this field help_text = None – string representing any helpful text for this field db_column = None – string representing the underlying another model __init__(to[, related_name=None[, ...]]) Parameters: to – related Model class or the string ‘self’ if declaring a self-referential foreign key related_name – attribute to expose on related case-insensitive check for substring __startswith: case-sensitive check for string prefix __istartswith: case-insensitive check for string prefix __in: x IN y, where y is either a list of values or a SelectQuery0 码力 | 101 页 | 163.20 KB | 1 年前3
 peewee Documentation
Release 1.0.0verbose_name = None – string representing the “user-friendly” name of this field • help_text = None – string representing any helpful text for this field • db_column = None – string representing the underlying another model __init__(to[, related_name=None[, ...]]) Parameters • to – related Model class or the string ‘self’ if declaring a self-referential foreign key • related_name – attribute to expose on related case-insensitive check for substring __startswith: case-sensitive check for string prefix __istartswith: case-insensitive check for string prefix __in: x IN y, where y is either a list of values or a SelectQuery0 码力 | 71 页 | 405.29 KB | 1 年前3
 peewee Documentation Release 3.4.0membercost > 0) & (Facility.membercost < (Facility.monthlymaintenance / 50)))) Basic string searches How can you produce a list of all facilities with the word ‘Tennis’ in their name? SELECT we will use SqliteDatabase. The first parameter is the filename containing the database, or the string :memory: to create an in-memory database. After the database filename, you can specify arbitrary to create a unique index on this column. See also adding composite indexes. column_name = None – string representing the underlying column to use if different, useful for legacy databases default = None0 码力 | 349 页 | 382.34 KB | 1 年前3
 peewee Documentation
Release 3.4.0where( (Facility.membercost > 0) & (Facility.membercost < (Facility.monthlymaintenance / 50)))) Basic string searches How can you produce a list of all facilities with the word ‘Tennis’ in their name? SELECT we will use SqliteDatabase. The first parameter is the filename containing the database, or the string :memory: to create an in-memory database. After the database filename, you can specify arbitrary create a unique index on this column. See also adding composite indexes. • column_name = None – string representing the underlying column to use if different, useful for legacy databases 64 Chapter 10 码力 | 284 页 | 1.03 MB | 1 年前3
 peewee Documentation Release 3.0.0membercost > 0) & (Facility.membercost < (Facility.monthlymaintenance / 50)))) Basic string searches How can you produce a list of all facilities with the word ‘Tennis’ in their name? SELECT we will use SqliteDatabase. The first parameter is the filename containing the database, or the string :memory: to create an in-memory database. After the database filename, you can specify arbitrary to create a unique index on this column. See also adding composite indexes. column_name = None – string representing the underlying column to use if different, useful for legacy databases default = None0 码力 | 319 页 | 361.50 KB | 1 年前3
 peewee Documentation
Release 3.5.0we will use SqliteDatabase. The first parameter is the filename containing the database, or the string ':memory:' to create an in- memory database. After the database filename, you can specify a list iterable containing 2-tuples of value, display help_text = None – string representing any helpful text for this field verbose_name = None – string representing the “user-friendly” name of this field Some fields database = db # Store multiple data-types in the Junk.anything column: Junk.create(anything='a string') Junk.create(anything=12345) Junk.create(anything=3.14159) Creating a custom field It is easy0 码力 | 347 页 | 380.80 KB | 1 年前3
 peewee Documentation Release 3.1.0membercost > 0) & (Facility.membercost < (Facility.monthlymaintenance / 50)))) Basic string searches How can you produce a list of all facilities with the word ‘Tennis’ in their name? SELECT we will use SqliteDatabase. The first parameter is the filename containing the database, or the string :memory: to create an in-memory database. After the database filename, you can specify arbitrary to create a unique index on this column. See also adding composite indexes. column_name = None – string representing the underlying column to use if different, useful for legacy databases default = None0 码力 | 332 页 | 370.77 KB | 1 年前3
 peewee Documentation
Release 3.5.0we will use SqliteDatabase. The first parameter is the filename containing the database, or the string ':memory:' to create an in-memory database. After the database filename, you can specify a list or containing 2-tuples of value, display • help_text = None – string representing any helpful text for this field • verbose_name = None – string representing the “user-friendly” name of this field Some fields Meta: database = db # Store multiple data-types in the Junk.anything column: Junk.create(anything='a string') Junk.create(anything=12345) Junk.create(anything=3.14159) 1.6. Models and Fields 49 peewee Documentation0 码力 | 282 页 | 1.02 MB | 1 年前3
共 16 条
- 1
 - 2
 













