peewee Documentation Release 2.10.2Existing Databases Adding Request Hooks Additional connection initialization Advanced Connection Management Using multiple databases Database Errors Automatic Reconnect Logging queries Generating skeleton see the Adding Request Hooks section. Note For advanced connection management techniques, see the advanced connection management section. To use this database with your models, set the database attribute initialize_connection(self, conn): self.execute_sql('PRAGMA foreign_keys=ON;') Advanced Connection Management Managing your database connections is as simple as calling connect() when you need to open a connection0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation Release 3.0.0using a Database URL Run-time database configuration Dynamically defining a database Connection Management Connection Pooling Framework Integration Executing Queries Managing Transactions Database Errors instead use Database.init(). See Run-time database configuration for more details. Connection Management To open a connection to a database, use the Database.connect() method: >>> db = SqliteDatabase(':memory:') cover all use-cases, but in the unlikely event you want to temporarily disable Peewee’s transaction management completely, you can use the Database.manual_commit() context-manager/decorator. Here is how you0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation Release 3.4.0using a Database URL Run-time database configuration Dynamically defining a database Connection Management Connection Pooling Testing Peewee Applications Async with Gevent Framework Integration Executing instead use Database.init(). See Run-time database configuration for more details. Connection Management To open a connection to a database, use the Database.connect() method: >>> db = SqliteDatabase(':memory:') cover all use-cases, but in the unlikely event you want to temporarily disable Peewee’s transaction management completely, you can use the Database.manual_commit() context-manager/decorator. Here is how you0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation Release 3.1.0using a Database URL Run-time database configuration Dynamically defining a database Connection Management Connection Pooling Testing Peewee Applications Framework Integration Executing Queries Managing instead use Database.init(). See Run-time database configuration for more details. Connection Management To open a connection to a database, use the Database.connect() method: >>> db = SqliteDatabase(':memory:') cover all use-cases, but in the unlikely event you want to temporarily disable Peewee’s transaction management completely, you can use the Database.manual_commit() context-manager/decorator. Here is how you0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation
Release 2.10.2see the Adding Request Hooks section. Note: For advanced connection management techniques, see the advanced connection management section. To use this database with your models, set the database attribute initialize_connection(self, conn): self.execute_sql('PRAGMA foreign_keys=ON;') 1.6.16 Advanced Connection Management Managing your database connections is as simple as calling connect() when you need to open a connection foreign keys 82 Chapter 1. Contents: peewee Documentation, Release 2.10.2 • CSV Utils Database management and framework integration • pwiz, a model generator • Schema Migrations • Connection pool •0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation
Release 3.5.0using a Database URL Run-time database configuration Dynamically defining a database Connection Management Connection Pooling Testing Peewee Applications Async with Gevent Framework Integration Executing instead use Database.init(). See Run-time database configuration for more details. Connection Management To open a connection to a database, use the Database.connect() method: >>> db = SqliteDatabase(':memory:') cover all use-cases, but in the unlikely event you want to temporarily disable Peewee’s transaction management completely, you can use the Database.manual_commit() context-manager/decorator. Here is how you0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation
Release 3.3.0instead use Database.init(). See Run-time database configuration for more details. 1.6.8 Connection Management To open a connection to a database, use the Database.connect() method: >>> db = SqliteDatabase(':memory:') cover all use-cases, but in the unlikely event you want to temporarily disable Peewee’s transaction management completely, you can use the Database.manual_commit() context-manager/decorator. Here is how you cover all use-cases, but in the unlikely event you want to temporarily disable Peewee’s transaction management completely, you can use the Database.manual_commit() context-manager/decorator. Here is how you0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0configuration for more details. 1.6. Database 47 peewee Documentation, Release 3.4.0 1.6.8 Connection Management To open a connection to a database, use the Database.connect() method: >>> db = SqliteDatabase(':memory:') cover all use-cases, but in the unlikely event you want to temporarily disable Peewee’s transaction management completely, you can use the Database.manual_commit() context-manager/decorator. Here is how you cover all use-cases, but in the unlikely event you want to temporarily disable Peewee’s transaction management completely, you can use the Database.manual_commit() context-manager/decorator. Here is how you0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation Release 3.6.0using a Database URL Run-time database configuration Dynamically defining a database Connection Management Connection Pooling Testing Peewee Applications Async with Gevent Framework Integration Executing instead use Database.init(). See Run-time database configuration for more details. Connection Management To open a connection to a database, use the Database.connect() method: >>> db = SqliteDatabase(':memory:') cover all use-cases, but in the unlikely event you want to temporarily disable Peewee’s transaction management completely, you can use the Database.manual_commit() context-manager/decorator. Here is how you0 码力 | 377 页 | 399.12 KB | 1 年前3
peewee Documentation
Release 3.5.0instead use Database.init(). See Run-time database configuration for more details. 1.5.8 Connection Management To open a connection to a database, use the Database.connect() method: >>> db = SqliteDatabase(':memory:') cover all use-cases, but in the unlikely event you want to temporarily disable Peewee’s transaction management completely, you can use the Database.manual_commit() context-manager/decorator. Here is how you ["mickey", "zaizee"] manual_commit() Create a context-manager which disables all transaction management for the duration of the wrapped block. Example: with db.manual_commit(): db.begin() # Begin transaction0 码力 | 282 页 | 1.02 MB | 1 年前3
共 11 条
- 1
- 2













