peewee Documentation Release 3.6.0
from 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 th/to/app.db', regexp_function=True, timeout=3, pragmas={'journal_mode': 'wal'}) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register hstore extension) 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.""" class Meta:0 码力 | 377 页 | 399.12 KB | 1 年前3peewee Documentation Release 3.6.0
some basic, database- 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 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' = SqliteExtDatabase('/path/to/app.db', regexp_function=True, timeout=3, pragmas={'journal_mode': 'wal'}) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register hstore extension)0 码力 | 302 页 | 1.02 MB | 1 年前3peewee Documentation Release 3.5.0
from 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 th/to/app.db', regexp_function=True, timeout=3, pragmas={'journal_mode': 'wal'}) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register hstore extension) 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.""" class Meta:0 码力 | 347 页 | 380.80 KB | 1 年前3peewee Documentation Release 3.5.0
from 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 = SqliteExtDatabase('/path/to/app.db', regexp_function=True, timeout=3, pragmas={'journal_mode': 'wal'}) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register hstore extension) 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: database0 码力 | 282 页 | 1.02 MB | 1 年前3peewee Documentation Release 3.0.0
from 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 h/to/app.db', regexp_function=True, timeout=3, pragmas=(('journal_mode', 'wal'),)) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register hstore 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 through PRAGMA0 码力 | 319 页 | 361.50 KB | 1 年前3peewee Documentation Release 3.4.0
from 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 h/to/app.db', regexp_function=True, timeout=3, pragmas=(('journal_mode', 'wal'),)) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register hstore 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 through PRAGMA0 码力 | 349 页 | 382.34 KB | 1 年前3peewee Documentation Release 3.1.0
from 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 h/to/app.db', regexp_function=True, timeout=3, pragmas=(('journal_mode', 'wal'),)) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register hstore 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 through PRAGMA0 码力 | 332 页 | 370.77 KB | 1 年前3peewee Documentation Release 3.3.0
from 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 = SqliteExtDatabase('/path/to/app.db', regexp_function=True, timeout=3, pragmas=(('journal_mode', 'wal'),)) from playhouse.postgres_ext import PostgresqlExtDatabase # Use Postgres (and register hstore 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 through PRAGMA0 码力 | 280 页 | 1.02 MB | 1 年前3peewee Documentation Release 3.4.0
from 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 = SqliteExtDatabase('/path/to/app.db', regexp_function=True, timeout=3, pragmas=(('journal_mode', 'wal'),)) (continues on next page) 1.6. Database 39 peewee Documentation, Release 3.4.0 (continued from 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 through PRAGMA0 码力 | 284 页 | 1.03 MB | 1 年前3peewee Documentation Release 2.10.2
playhouse.sqlite_ext import SqliteExtDatabase sqlite_db = SqliteExtDatabase('my_app.db', journal_mode='WAL') PRAGMA statements New in version 2.6.4. SQLite allows run-time configuration of a number of parameters containing the pragma name and value: db = SqliteDatabase('my_app.db', pragmas=( ('journal_mode', 'WAL'), ('cache_size', 10000), ('mmap_size', 1024 * 1024 * 32), )) SQLite and Autocommit Changed containing the pragma name and value: db = SqliteDatabase('my_app.db', pragmas=( ('journal_mode', 'WAL'), ('cache_size', 10000), ('mmap_size', 1024 * 1024 * 32), )) insert_many = True *if* using0 码力 | 275 页 | 276.96 KB | 1 年前3
共 11 条
- 1
- 2