peewee Documentation Release 2.10.2tables Using Postgresql Using SQLite Using BerkeleyDB Using MySQL Connecting using a Database URL Multi-threaded applications Run-time database configuration Dynamically defining a database Connection Pooling ForeignKeyField(User, related_name='related_to') class Meta: indexes = ( # Specify a unique multi-column index on from/to-user. (('from_user', 'to_user'), True), ) # a dead simple Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making queries In the User model there are a few instance methods that encapsulate0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation
Release 2.10.2to_user = ForeignKeyField(User, related_name='related_to') class Meta: indexes = ( # Specify a unique multi-column index on from/to-user. (('from_user', 'to_user'), True), ) # a dead simple one-to-many relationship: Note: Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. 1.3. Example app 13 peewee Documentation, Release 2.10.2 Making queries instance for the local MySQL database my_db. • More examples in the db_url documentation. 1.6.7 Multi-threaded applications peewee stores the connection state in a thread local, so each thread gets its0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation
Release 3.5.0indicating # whether the index is unique or not. indexes = ( # Specify a unique multi-column index on from/to-user. (('from_user', 'to_user'), True), ) # a dead simple Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making queries In the User model there are a few instance methods that encapsulate 10000')]) created = DateTimeField( constraints=[SQL("DEFAULT (datetime('now'))")]) Multi-column indexes Multi-column indexes may be defined as Meta attributes using a nested tuple. Each database index0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation Release 3.4.0indicating # whether the index is unique or not. indexes = ( # Specify a unique multi-column index on from/to-user. (('from_user', 'to_user'), True), ) # a dead simple Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making queries In the User model there are a few instance methods that encapsulate 10000')]) created = DateTimeField( constraints=[SQL("DEFAULT (datetime('now'))")]) Multi-column indexes Multi-column indexes may be defined as Meta attributes using a nested tuple. Each database index0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation
Release 3.5.0index and a boolean indicating # whether the index is unique or not. indexes = ( # Specify a unique multi-column index on from/to-user. (('from_user', 'to_user'), True), ) # a dead simple one-to-many relationship: Note: Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making queries In the User model there are a few instance methods that encapsulate < 10000')]) created = DateTimeField( constraints=[SQL("DEFAULT (datetime('now'))")]) Multi-column indexes Multi-column indexes may be defined as Meta attributes using a nested tuple. Each database index0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.3.0index and a boolean indicating # whether the index is unique or not. indexes = ( # Specify a unique multi-column index on from/to-user. (('from_user', 'to_user'), True), ) # a dead simple one-to-many relationship: Note: Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making queries In the User model there are a few instance methods that encapsulate < 10000')]) created = DateTimeField( constraints=[SQL("DEFAULT (datetime('now'))")]) Multi-column indexes Multi-column indexes may be defined as Meta attributes using a nested tuple. Each database index0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0index and a boolean indicating # whether the index is unique or not. indexes = ( # Specify a unique multi-column index on from/to-user. (('from_user', 'to_user'), True), ) # a dead simple one-to-many relationship: Note: Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making queries In the User model there are a few instance methods that encapsulate < 10000')]) created = DateTimeField( constraints=[SQL("DEFAULT (datetime('now'))")]) Multi-column indexes Multi-column indexes may be defined as Meta attributes using a nested tuple. Each database index0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation Release 3.0.0indicating # whether the index is unique or not. indexes = ( # Specify a unique multi-column index on from/to-user. (('from_user', 'to_user'), True), ) # a dead simple Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making queries In the User model there are a few instance methods that encapsulate 10000')]) created = DateTimeField( constraints=[SQL("DEFAULT (datetime('now'))")]) Multi-column indexes Multi-column indexes may be defined as Meta attributes using a nested tuple. Each database index0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation Release 3.6.0indicating # whether the index is unique or not. indexes = ( # Specify a unique multi-column index on from/to-user. (('from_user', 'to_user'), True), ) # a dead simple Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making queries In the User model there are a few instance methods that encapsulate 10000')]) created = DateTimeField( constraints=[SQL("DEFAULT (datetime('now'))")]) Multi-column indexes Multi-column indexes may be defined as Meta attributes using a nested tuple. Each database index0 码力 | 377 页 | 399.12 KB | 1 年前3
peewee Documentation
Release 3.6.0index and a boolean indicating # whether the index is unique or not. indexes = ( # Specify a unique multi-column index on from/to-user. (('from_user', 'to_user'), True), ) # a dead simple one-to-many relationship: Note: Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making queries In the User model there are a few instance methods that encapsulate < 10000')]) created = DateTimeField( constraints=[SQL("DEFAULT (datetime('now'))")]) Multi-column indexes Multi-column indexes may be defined as Meta attributes using a nested tuple. Each database index0 码力 | 302 页 | 1.02 MB | 1 年前3
共 16 条
- 1
- 2













