peewee Documentation
Release 2.0.2database – the Database subclass and an Adapter. The adapter’s job was to say what features a database backend provided, what operations were valid, what column types were supported, and how to open a connection to a model with a non-integer primary key will have the ForeignKeyField use the same underlying storage type as the primary key they are related to. See full documentation on non-integer primary keys that specifies which database to use. then, any subclasses will automatically # use the correct storage. for more information, see: # http://charlesleifer.com/docs/peewee/peewee/models.html#model-api-smells-like-django0 码力 | 65 页 | 315.33 KB | 1 年前3
peewee Documentation Release 2.10.2Extensions SqliteQ Sqlite User-Defined Functions apsw, an advanced sqlite driver BerkeleyDB backend Sqlcipher backend Postgresql Extensions DataSet Django Integration Fields Generic foreign keys Hybrid Attributes that 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. Making0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation
Release 2.10.2that 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. 1.3. Example database 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 class0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation Release 1.0.0of sequence to create for the primary key (peewee will autogenerate one if not provided and the backend supports sequences). Specifying indexes: class Transaction(Model): from_acct = CharField() database 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 being0 码力 | 101 页 | 163.20 KB | 1 年前3
peewee Documentation
Release 1.0.0of sequence to create for the primary key (peewee will autogenerate one if not pro- vided and the backend supports sequences). Specifying indexes: class Transaction(Model): from_acct = CharField() to_acct database 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 being0 码力 | 71 页 | 405.29 KB | 1 年前3
peewee Documentation
Release 3.5.0extensions to Peewee SqliteQ Sqlite User-Defined Functions apsw, an advanced sqlite driver Sqlcipher backend Postgresql Extensions MySQL Extensions DataSet Fields Hybrid Attributes Key/Value Store Shortcuts that 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. Making0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation Release 3.4.0extensions to Peewee SqliteQ Sqlite User-Defined Functions apsw, an advanced sqlite driver Sqlcipher backend Postgresql Extensions MySQL Extensions DataSet Fields Hybrid Attributes Key/Value Store Shortcuts that 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. Making0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation Release 3.1.0extensions to Peewee SqliteQ Sqlite User-Defined Functions apsw, an advanced sqlite driver Sqlcipher backend Postgresql Extensions DataSet Fields Hybrid Attributes Shortcuts Signal support pwiz, a model generator that 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. Making0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation Release 3.0.0extensions to Peewee SqliteQ Sqlite User-Defined Functions apsw, an advanced sqlite driver Sqlcipher backend Postgresql Extensions DataSet Fields Hybrid Attributes Shortcuts Signal support pwiz, a model generator that 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. Making0 码力 | 319 页 | 361.50 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 information on database extensions, see: • Postgresql Extensions • SQLite Extensions • Sqlcipher backend • apsw, an advanced sqlite driver • SqliteQ 1.5. Database 19 peewee Documentation, Release 30 码力 | 282 页 | 1.02 MB | 1 年前3
共 16 条
- 1
- 2













