peewee Documentation Release 3.6.0charset alongside your other values: db = MySQLDatabase('database_name', user='www-data', charset='utf8mb4') Consult your database driver’s documentation for the available parameters: Postgres: psycopg2 [http://initd html#some-mysql-examples] MySQL: pymysql [https://github.com/PyMySQL/PyMySQL/blob/f08f01fe8a59e8acfb5f5add4a8fe874bec2a196/pymysql/co nnections.py#L494-L513] SQLite: sqlite3 [https://docs.python.org/2/library/sqlite3 execute_sql('SELECT * FROM series(?, ?, ?)', (0, 5, 2)) for value, in cursor: print(value) # Prints: # 0 # 2 # 4 For more information, see: SqliteDatabase.func() SqliteDatabase.aggregate() SqliteDatabase.collation()0 码力 | 377 页 | 399.12 KB | 1 年前3
peewee Documentation
Release 3.6.0Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Example app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . brief, high-level overview of Peewee’s primary features. This guide will cover: • Model Definition 4 Chapter 1. Contents: peewee Documentation, Release 3.6.0 • Storing data • Retrieving Data Note: peewee Documentation, Release 3.6.0 db = MySQLDatabase('database_name', user='www-data', charset='utf8mb4') Consult your database driver’s documentation for the available parameters: • Postgres: psycopg20 码力 | 302 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.5.0charset alongside your other values: db = MySQLDatabase('database_name', user='www-data', charset='utf8mb4') Consult your database driver’s documentation for the available parameters: Postgres: psycopg2 [http://initd html#some-mysql-examples] MySQL: pymysql [https://github.com/PyMySQL/PyMySQL/blob/f08f01fe8a59e8acfb5f5add4a8fe874bec2a196/pymysql/co nnections.py#L494-L513] SQLite: sqlite3 [https://docs.python.org/2/library/sqlite3 execute_sql('SELECT * FROM series(?, ?, ?)', (0, 5, 2)) for value, in cursor: print(value) # Prints: # 0 # 2 # 4 For more information, see: SqliteDatabase.func() SqliteDatabase.aggregate() SqliteDatabase.collation()0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation
Release 3.5.0Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Example app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . brief, high-level overview of Peewee’s primary features. This guide will cover: • Model Definition 4 Chapter 1. Contents: peewee Documentation, Release 3.5.0 • Storing data • Retrieving Data Note: charset alongside your other values: db = MySQLDatabase('database_name', user='www-data', charset='utf8mb4') Consult your database driver’s documentation for the available parameters: • Postgres: psycopg20 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation Release 3.4.0charset alongside your other values: db = MySQLDatabase('database_name', user='www-data', charset='utf8mb4') Consult your database driver’s documentation for the available parameters: Postgres: psycopg2 [http://initd html#some-mysql-examples] MySQL: pymysql [https://github.com/PyMySQL/PyMySQL/blob/f08f01fe8a59e8acfb5f5add4a8fe874bec2a196/pymysql/co nnections.py#L494-L513] SQLite: sqlite3 [https://docs.python.org/2/library/sqlite3 execute_sql('SELECT * FROM series(?, ?, ?)', (0, 5, 2)) for value, in cursor: print(value) # Prints: # 0 # 2 # 4 For more information, see: SqliteDatabase.func() SqliteDatabase.aggregate() SqliteDatabase.collation()0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation
Release 3.4.0Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Example app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . brief, high-level overview of Peewee’s primary features. This guide will cover: • Model Definition 4 Chapter 1. Contents: peewee Documentation, Release 3.4.0 • Storing data • Retrieving Data Note: charset alongside your other values: db = MySQLDatabase('database_name', user='www-data', charset='utf8mb4') Consult your database driver’s documentation for the available parameters: • Postgres: psycopg20 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation
Release 3.3.0Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Example app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . brief, high-level overview of Peewee’s primary features. This guide will cover: • Model Definition 4 Chapter 1. Contents: peewee Documentation, Release 3.3.0 • Storing data • Retrieving Data Note: charset alongside your other values: db = MySQLDatabase('database_name', user='www-data', charset='utf8mb4') Consult your database driver’s documentation for the available parameters: • Postgres: psycopg20 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation Release 3.1.0charset alongside your other values: db = MySQLDatabase('database_name', user='www-data', charset='utf8mb4') Consult your database driver’s documentation for the available parameters: Postgres: psycopg2 [http://initd html#some-mysql-examples] MySQL: pymysql [https://github.com/PyMySQL/PyMySQL/blob/f08f01fe8a59e8acfb5f5add4a8fe874bec2a196/pymysql/co nnections.py#L494-L513] SQLite: sqlite3 [https://docs.python.org/2/library/sqlite3 execute_sql('SELECT * FROM series(?, ?, ?)', (0, 5, 2)) for value, in cursor: print(value) # Prints: # 0 # 2 # 4 For more information, see: SqliteDatabase.func() SqliteDatabase.aggregate() SqliteDatabase.collation()0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation
Release 0.9.7. . . . . . . . . . . . . . . . . . . . . . 4 1.3 Peewee Cookbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 Example app . . . . . . . . . . . . . peewee.TextField() pub_date = peewee.DateTimeField() published = peewee.BooleanField(default=True) 4 Chapter 1. Contents: peewee Documentation, Release 0.9.7 1.3.1 Database and Connection Recipes Creating update_query = Entry.update(published=True).where(pub_date__lt=datetime.today()) >>> update_query.execute() 4 # <--- number of rows updated For more information, see the documentation on UpdateQuery. Deleting0 码力 | 53 页 | 347.03 KB | 1 年前3
peewee Documentation Release 3.0.0charset alongside your other values: db = MySQLDatabase('database_name', user='www-data', charset='utf8mb4') Consult your database driver’s documentation for the available parameters: Postgres: psycopg2 [http://initd html#some-mysql-examples] MySQL: pymysql [https://github.com/PyMySQL/PyMySQL/blob/f08f01fe8a59e8acfb5f5add4a8fe874bec2a196/pymysql/co nnections.py#L494-L513] SQLite: sqlite3 [https://docs.python.org/2/library/sqlite3 Create a unique index on timestamp desc, status & 4. idx = ModelIndex(Article, (Article.timestamp.desc(), Article.flags.bin_and(4)), unique=True) Article.add_index(idx) For more0 码力 | 319 页 | 361.50 KB | 1 年前3
共 16 条
- 1
- 2













