peewee Documentation Release 0.9.7at least 5 photos associated with them: >>> Tag.select().join(PhotoTag).join(Photo).group_by(Tag).ha ving('count(*) > 5').sql() SELECT t1."id", t1."name" FROM "tag" AS t1 INNER JOIN "phototag" AS t20 码力 | 78 页 | 143.68 KB | 1 年前3
peewee Documentation Release 1.0.0at least 5 photos associated with them: >>> Tag.select().join(PhotoTag).join(Photo).group_by(Tag).ha ving('count(*) > 5').sql() SELECT t1."id", t1."name" FROM "tag" AS t1 INNER JOIN "phototag" AS t20 码力 | 101 页 | 163.20 KB | 1 年前3
peewee Documentation Release 3.6.0peewee import * # SQLite database using WAL journal mode and 64MB cache. sqlite_db = SqliteDatabase('/path/to/app.db', pragmas={ 'journal_mode': 'wal', 'cache_size': -1024 * 64}) # Connect to SqliteExtDatabase('/path/to/app.db', regexp_function=True, timeout=3, pragmas={'journal_mode': 'wal'}) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register org/2/library/sqlite3.html#sqlite3.connect]. sqlite_db = SqliteDatabase('my_app.db', pragmas={'journal_mode': 'wal'}) class BaseModel(Model): """A base model that will use our Sqlite database.""" class0 码力 | 377 页 | 399.12 KB | 1 年前3
peewee Documentation
Release 3.6.0database- specific configuration options. from peewee import * # SQLite database using WAL journal mode and 64MB cache. sqlite_db = SqliteDatabase('/path/to/app.db', pragmas={ (continues on next page) Chapter 1. Contents: peewee Documentation, Release 3.6.0 (continued from previous page) 'journal_mode': 'wal', 'cache_size': -1024 * 64}) # Connect to a MySQL database on network. mysql_db = MySQLDatabase('my_app' 3s). db = SqliteExtDatabase('/path/to/app.db', regexp_function=True, timeout=3, pragmas={'journal_mode': 'wal'}) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register0 码力 | 302 页 | 1.02 MB | 1 年前3
peewee Documentation Release 3.0.0Inserts Transactions Context manager Decorator Nesting Transactions Explicit transaction Autocommit Mode Changes in 3.0 Backwards-incompatible New stuff API Documentation Database Query-builder Fields peewee import * # SQLite database using WAL journal mode and 64MB cache. sqlite_db = SqliteDatabase('/path/to/app.db', pragmas=( ('journal_mode', 'wal'), ('cache_size', -1024 * 64))) # Connect SqliteExtDatabase('/path/to/app.db', regexp_function=True, timeout=3, pragmas=(('journal_mode', 'wal'),)) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation
Release 3.5.0peewee import * # SQLite database using WAL journal mode and 64MB cache. sqlite_db = SqliteDatabase('/path/to/app.db', pragmas={ 'journal_mode': 'wal', 'cache_size': -1024 * 64}) # Connect to SqliteExtDatabase('/path/to/app.db', regexp_function=True, timeout=3, pragmas={'journal_mode': 'wal'}) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register org/2/library/sqlite3.html#sqlite3.connect]. sqlite_db = SqliteDatabase('my_app.db', pragmas={'journal_mode': 'wal'}) class BaseModel(Model): """A base model that will use our Sqlite database.""" class0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation Release 3.4.0Inserts Transactions Context manager Decorator Nesting Transactions Explicit transaction Autocommit Mode Changes in 3.0 Backwards-incompatible New stuff API Documentation Database Query-builder Fields peewee import * # SQLite database using WAL journal mode and 64MB cache. sqlite_db = SqliteDatabase('/path/to/app.db', pragmas=( ('journal_mode', 'wal'), ('cache_size', -1024 * 64))) # Connect SqliteExtDatabase('/path/to/app.db', regexp_function=True, timeout=3, pragmas=(('journal_mode', 'wal'),)) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation
Release 3.5.0from peewee import * # SQLite database using WAL journal mode and 64MB cache. sqlite_db = SqliteDatabase('/path/to/app.db', pragmas={ 'journal_mode': 'wal', 'cache_size': -1024 * 64}) # Connect to a MySQL 3s). db = SqliteExtDatabase('/path/to/app.db', regexp_function=True, timeout=3, pragmas={'journal_mode': 'wal'}) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register any other arbitrary sqlite3 parameters. sqlite_db = SqliteDatabase('my_app.db', pragmas={'journal_mode': 'wal'}) class BaseModel(Model): """A base model that will use our Sqlite database.""" class Meta:0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation Release 3.1.0Inserts Transactions Context manager Decorator Nesting Transactions Explicit transaction Autocommit Mode Changes in 3.0 Backwards-incompatible New stuff API Documentation Database Query-builder Fields peewee import * # SQLite database using WAL journal mode and 64MB cache. sqlite_db = SqliteDatabase('/path/to/app.db', pragmas=( ('journal_mode', 'wal'), ('cache_size', -1024 * 64))) # Connect SqliteExtDatabase('/path/to/app.db', regexp_function=True, timeout=3, pragmas=(('journal_mode', 'wal'),)) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation
Release 3.3.0from peewee import * # SQLite database using WAL journal mode and 64MB cache. sqlite_db = SqliteDatabase('/path/to/app.db', pragmas=( ('journal_mode', 'wal'), ('cache_size', -1024 * 64))) # Connect to a 3s). db = SqliteExtDatabase('/path/to/app.db', regexp_function=True, timeout=3, pragmas=(('journal_mode', 'wal'),)) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register playhouse.sqlite_ext import SqliteExtDatabase sqlite_db = SqliteExtDatabase('my_app.db', journal_mode='WAL') PRAGMA statements SQLite allows run-time configuration of a number of parameters through0 码力 | 280 页 | 1.02 MB | 1 年前3
共 13 条
- 1
- 2













