peewee Documentation Release 3.0.0Context manager Decorator Nesting Transactions Explicit transaction Autocommit Mode Changes in 3.0 Backwards-incompatible New stuff API Documentation Database Query-builder Fields Schema Manager Model connection open at a given time. Context managers The database object itself can be used as a context-manager, which opens a connection for the duration of the wrapped block of code. Additionally, a transaction inside context manager. ... False >>> db.is_closed() # db is closed. True If you want to manage transactions separately, you can use the Database.connection_context() context manager. >>> with db.0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation Release 3.4.0Context manager Decorator Nesting Transactions Explicit transaction Autocommit Mode Changes in 3.0 Backwards-incompatible New stuff API Documentation Database Query-builder Fields Schema Manager Model connection open at a given time. Context managers The database object itself can be used as a context-manager, which opens a connection for the duration of the wrapped block of code. Additionally, a transaction inside context manager. ... False >>> db.is_closed() # db is closed. True If you want to manage transactions separately, you can use the Database.connection_context() context manager. >>> with db.c0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation Release 3.1.0Context manager Decorator Nesting Transactions Explicit transaction Autocommit Mode Changes in 3.0 Backwards-incompatible New stuff API Documentation Database Query-builder Fields Schema Manager Model connection open at a given time. Context managers The database object itself can be used as a context-manager, which opens a connection for the duration of the wrapped block of code. Additionally, a transaction inside context manager. ... False >>> db.is_closed() # db is closed. True If you want to manage transactions separately, you can use the Database.connection_context() context manager. >>> with db.c0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation
Release 3.3.0connection open at a given time. Context managers The database object itself can be used as a context-manager, which opens a connection for the duration of the wrapped block of code. Additionally, a transaction inside context manager. ... False >>> db.is_closed() # db is closed. True If you want to manage transactions separately, you can use the Database.connection_context() context manager. >>> with db. returns a context-manager that will bind the given models to the database instance for the duration of the wrapped block. • Model.bind_ctx(), which likewise returns a context-manager that binds the model0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0connection open at a given time. Context managers The database object itself can be used as a context-manager, which opens a connection for the duration of the wrapped block of code. Additionally, a transaction inside context manager. ... False >>> db.is_closed() # db is closed. True If you want to manage transactions separately, you can use the Database.connection_context() context manager. >>> with db. returns a context-manager that will bind the given models to the database instance for the duration of the wrapped block. • Model.bind_ctx(), which likewise returns a context-manager that binds the model0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation Release 2.10.2Avoiding N+1 queries Iterating over lots of rows Speeding up Bulk Inserts Transactions Context manager Decorator Nesting Transactions Explicit transaction Autocommit Mode Playhouse, extensions to Peewee and Peewee [http://charlesleifer.com/blog/creating-a- personal-password-manager/]. Building a web-based encrypted file manager with Flask, peewee and S3 [http://charlesleifer.com/blog/web-based-encr multiple connections to the database. When an execution context is initialized (either as a context manager or as a decorated function), a separate connection will be used for the duration of the wrapped block0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation
Release 3.5.0Functions SQL Helper Security and SQL Injection API Documentation Database Query-builder Fields Schema Manager Model Query-builder Internals Constants and Helpers SQLite Extensions Getting started APIs Additional connection open at a given time. Context managers The database object itself can be used as a context-manager, which opens a connection for the duration of the wrapped block of code. Additionally, a transaction inside context manager. ... False >>> db.is_closed() # db is closed. True If you want to manage transactions separately, you can use the Database.connection_context() context manager. >>> with db.c0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation
Release 2.10.2Peewee. • Creating a lastpass clone with Flask and Peewee. • Building a web-based encrypted file manager with Flask, peewee and S3. • Creating a bookmarking web-service that takes screenshots of your bookmarks multiple connections to the database. When an execu- tion context is initialized (either as a context manager or as a decorated function), a separate connection will be used for the duration of the wrapped block copies, check out the Read Slave extension. For finer-grained control, check out the Using context manager / decorator. This allows you to specify the database to use with a given list of models for the duration0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation
Release 3.5.0Documentation, Release 3.5.0 Context managers The database object itself can be used as a context-manager, which opens a connection for the duration of the wrapped block of code. Additionally, a transaction inside context manager. ... False >>> db.is_closed() # db is closed. True If you want to manage transactions separately, you can use the Database.connection_context() context manager. >>> with db. returns a context-manager that will bind the given models to the database instance for the duration of the wrapped block. • Model.bind_ctx(), which likewise returns a context-manager that binds the model0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation Release 3.6.0Implementing Many to Many Avoiding the N+1 problem API Documentation Database Query-builder Fields Schema Manager Model Query-builder Internals Constants and Helpers SQLite Extensions Getting started APIs Additional connection open at a given time. Context managers The database object itself can be used as a context-manager, which opens a connection for the duration of the wrapped block of code. Additionally, a transaction inside context manager. ... False >>> db.is_closed() # db is closed. True If you want to manage transactions separately, you can use the Database.connection_context() context manager. >>> with db.0 码力 | 377 页 | 399.12 KB | 1 年前3
共 16 条
- 1
- 2













