peewee Documentation Release 1.0.0database columns. Each field type has a corresponding SQL storage class (i.e. varchar, int), and conversion between python data types and underlying storage is handled transparently. When creating a Model class of all, let me say that I do not think using non-integer primary keys is a good idea. The cost in storage is higher, the index lookups will be slower, and foreign key joins will be more expensive. That being underlying storage default – a value to use as an uninitialized default choices – an iterable of 2-tuples mapping value to display db_value(value) Parameters: value – python data type to prep for storage in0 码力 | 101 页 | 163.20 KB | 1 年前3
peewee Documentation
Release 1.0.0database columns. Each field type has a corresponding SQL storage class (i.e. varchar, int), and conversion between python data types and underlying storage is handled transparently. When creating a Model class of all, let me say that I do not think using non-integer primary keys is a good idea. The cost in storage is higher, the index lookups will be slower, and foreign key joins will be more expensive. That being instruction text for the usage/meaning of this field • db_column – column class to use for underlying storage • default – a value to use as an uninitialized default • choices – an iterable of 2-tuples mapping0 码力 | 71 页 | 405.29 KB | 1 年前3
peewee Documentation Release 3.4.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its after_request(response): database.close() return response Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making recycled properly. Thread Safety Peewee keeps track of the connection state using thread-local storage, making the Peewee Database object safe to use with multiple threads. Each thread will have it’s0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation
Release 3.3.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its fields after_request def after_request(response): database.close() return response Note: Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making recycled properly. Thread Safety Peewee keeps track of the connection state using thread-local storage, making the Peewee Database object safe to use with multiple threads. Each thread will have it’s0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its fields after_request def after_request(response): database.close() return response Note: Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making Documentation, Release 3.4.0 Thread Safety Peewee keeps track of the connection state using thread-local storage, making the Peewee Database object safe to use with multiple threads. Each thread will have it’s0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation Release 3.0.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its after_request(response): database.close() return response Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making recycled properly. Thread Safety Peewee keeps track of the connection state using thread-local storage, making the Peewee Database object safe to use with multiple threads. Each thread will have it’s0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation Release 3.1.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its after_request(response): database.close() return response Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making recycled properly. Thread Safety Peewee keeps track of the connection state using thread-local storage, making the Peewee Database object safe to use with multiple threads. Each thread will have it’s0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation
Release 3.5.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its after_request(response): database.close() return response Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making recycled properly. Thread Safety Peewee keeps track of the connection state using thread-local storage, making the Peewee Database object safe to use with multiple threads. Each thread will have it’s0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation
Release 3.5.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its fields after_request def after_request(response): database.close() return response Note: Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making recycled properly. Thread Safety Peewee keeps track of the connection state using thread-local storage, making the Peewee Database object safe to use with multiple threads. Each thread will have it’s0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation Release 3.6.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its after_request(response): database.close() return response Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making recycled properly. Thread Safety Peewee keeps track of the connection state using thread-local storage, making the Peewee Database object safe to use with multiple threads. Each thread will have it’s0 码力 | 377 页 | 399.12 KB | 1 年前3
共 16 条
- 1
- 2













