peewee Documentation
Release 3.5.0keeps 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’s own connection, and as a result any given if your tables already exist, and conditionally create them. If you want to disable this, specify safe=False. After you have created your tables, if you choose to modify your database schema (by adding IntegrityError: # `username` is a unique column, so this username already exists, # making it safe to call .get(). return User.get(User.username == username) You can easily encapsulate this type0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation Release 3.4.0keeps 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’s own connection, and conversely, any given if your tables already exist, and conditionally create them. If you want to disable this, specify safe=False. After you have created your tables, if you choose to modify your database schema (by adding IntegrityError: # `username` is a unique column, so this username already exists, # making it safe to call .get(). return User.get(User.username == username) You can easily encapsulate this type0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation Release 3.1.0keeps 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’s own connection, and conversely, any given conditionally create them: # Only create the tables if they do not exist. db.create_tables([User, Tweet], safe=True) After you have created your tables, if you choose to modify your database schema (by adding IntegrityError: # `username` is a unique column, so this username already exists, # making it safe to call .get(). return User.get(User.username == username) You can easily encapsulate this type0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation
Release 3.5.0keeps 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’s own connection, and as a result any given if your tables already exist, and conditionally create them. If you want to disable this, specify safe=False. After you have created your tables, if you choose to modify your database schema (by adding peewee.IntegrityError: # `username` is a unique column, so this username already exists, # making it safe to call .get(). return User.get(User.username == username) You can easily encapsulate this type of0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.3.0keeps 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’s own connection, and conversely, any given if your tables already exist, and conditionally create them. If you want to disable this, specify safe=False. After you have created your tables, if you choose to modify your database schema (by adding peewee.IntegrityError: # `username` is a unique column, so this username already exists, # making it safe to call .get(). return User.get(User.username == username) You can easily encapsulate this type of0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0keeps 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’s own connection, and conversely, any given if your tables already exist, and conditionally create them. If you want to disable this, specify safe=False. After you have created your tables, if you choose to modify your database schema (by adding peewee.IntegrityError: # `username` is a unique column, so this username already exists, # making it safe to call .get(). return User.get(User.username == username) You can easily encapsulate this type of0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation Release 3.0.0keeps 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’s own connection, and conversely, any given conditionally create them: # Only create the tables if they do not exist. db.create_tables([User, Tweet], safe=True) After you have created your tables, if you choose to modify your database schema (by adding IntegrityError: # `username` is a unique column, so this username already exists, # making it safe to call .get(). return User.get(User.username == username) You can easily encapsulate this type0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation Release 3.6.0keeps 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’s own connection, and as a result any given Peewee includes an IF NOT EXISTS clause when creating tables. If you want to disable this, specify safe=False. After you have created your tables, if you choose to modify your database schema (by adding IntegrityError: # `username` is a unique column, so this username already exists, # making it safe to call .get(). return User.get(User.username == username) You can easily encapsulate this type0 码力 | 377 页 | 399.12 KB | 1 年前3
peewee Documentation
Release 3.6.0keeps 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’s own connection, and as a result any given Peewee includes an IF NOT EXISTS clause when creating tables. If you want to disable this, specify safe=False. After you have created your tables, if you choose to modify your database schema (by adding peewee.IntegrityError: # `username` is a unique column, so this username already exists, # making it safe to call .get(). return User.get(User.username == username) You can easily encapsulate this type of0 码力 | 302 页 | 1.02 MB | 1 年前3
peewee Documentation Release 2.10.2conditionally create them: # Only create the tables if they do not exist. db.create_tables([User, Tweet], safe=True) After you have created your tables, if you choose to modify your database schema (by adding IntegrityError: # `username` is a unique column, so this username already exists, # making it safe to call .get(). return User.get(User.username == username) You can easily encapsulate this type essentially. Note The module gets its name from the fact that all write queries get put into a thread- safe queue. A single worker thread listens to the queue and executes all queries that are sent to it.0 码力 | 275 页 | 276.96 KB | 1 年前3
共 15 条
- 1
- 2













