peewee Documentation
Release 3.3.0. . . . . . . . . . . . . . . . . . . . . 18 1.5 Query Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.6 Database . . . . . . . . . . . . . . on the getting started page. Here is a visual representation of the schema used in these examples: 18 Chapter 1. Contents: peewee Documentation, Release 3.3.0 1.5.1 Model Definitions To begin working Documentation, Release 3.3.0 (continued from previous page) tweet 14 tweet 15 tweet 16 tweet 17 tweet 18 tweet 19 If you would like more granular control, you can always use limit() and offset(). 1.8.130 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0. . . . . . . . . . . . . . . . . . . . . 18 1.5 Query Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.6 Database . . . . . . . . . . . . . . on the getting started page. Here is a visual representation of the schema used in these examples: 18 Chapter 1. Contents: peewee Documentation, Release 3.4.0 1.5.1 Model Definitions To begin working print(tweet.message) ... tweet 10 tweet 11 tweet 12 tweet 13 tweet 14 tweet 15 tweet 16 tweet 17 tweet 18 tweet 19 If you would like more granular control, you can always use limit() and offset(). 1.8.130 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation
Release 3.5.0Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.5 Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . answer for other people to find. • Ask on the mailing list, https://groups.google.com/group/peewee-orm 18 Chapter 1. Contents: peewee Documentation, Release 3.5.0 1.5 Database The Peewee Database object print(tweet.message) ... tweet 10 tweet 11 tweet 12 tweet 13 tweet 14 tweet 15 tweet 16 tweet 17 tweet 18 tweet 19 If you would like more granular control, you can always use limit() and offset(). 1.7.130 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 0.9.7print entry.title ... entry 10 entry 11 entry 12 entry 13 entry 14 entry 15 entry 16 entry 17 entry 18 entry 19 Counting records You can count the number of rows in any select query: >>> Entry.select() ame, qr, var_name=’object_list’, **kwargs): kwargs.update( page=int(request.args.get(’page’, 1)), 18 Chapter 1. Contents: peewee Documentation, Release 0.9.7 pages=qr.count() / 20 + 1 ) kwargs[var_name]0 码力 | 53 页 | 347.03 KB | 1 年前3
peewee Documentation
Release 3.6.0Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.6 Models and Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . and 64MB cache. sqlite_db = SqliteDatabase('/path/to/app.db', pragmas={ (continues on next page) 18 Chapter 1. Contents: peewee Documentation, Release 3.6.0 (continued from previous page) 'journal_mode': Documentation, Release 3.6.0 (continued from previous page) tweet 14 tweet 15 tweet 16 tweet 17 tweet 18 tweet 19 If you would like more granular control, you can always use limit() and offset(). 1.7.130 码力 | 302 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 2.0.2print tweet.message ... tweet 10 tweet 11 tweet 12 tweet 13 tweet 14 tweet 15 tweet 16 tweet 17 tweet 18 tweet 19 Counting records You can count the number of rows in any select query: >>> Tweet.select() 1.4.6 Schema migrations Currently peewee does not have support for automatic schema migrations. 18 Chapter 1. Contents: peewee Documentation, Release 2.0.0 1.5 Example app peewee ships with an example0 码力 | 65 页 | 315.33 KB | 1 年前3
peewee Documentation
Release 1.0.0Contents: peewee Documentation, Release 1.0.0 entry 12 entry 13 entry 14 entry 15 entry 16 entry 17 entry 18 entry 19 Counting records You can count the number of rows in any select query: >>> Entry.select() is taken, and if not executes a create(). try: user = User.get(username=request.form[’username’]) 18 Chapter 1. Contents: peewee Documentation, Release 1.0.0 flash(’That username is already taken’)0 码力 | 71 页 | 405.29 KB | 1 年前3
peewee Documentation
Release 2.10.2BaseModel(Model): class Meta: database = database class User(BaseModel): username = CharField() 18 Chapter 1. Contents: peewee Documentation, Release 2.10.2 class Tweet(BaseModel): user = ForeignKeyField(User print tweet.message ... tweet 10 tweet 11 tweet 12 tweet 13 tweet 14 tweet 15 tweet 16 tweet 17 tweet 18 tweet 19 If you would like more granular control, you can always use limit() and offset(). 1.8. Querying save_optimistic() Traceback (most recent call last): File "", line 1, in File "x.py", line 18, in save_optimistic raise ValueError('No changes have been made.') ValueError: No changes have been 0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation Release 3.0.0print(tweet.message) ... tweet 10 tweet 11 tweet 12 tweet 13 tweet 14 tweet 15 tweet 16 tweet 17 tweet 18 tweet 19 If you would like more granular control, you can always use limit() and offset(). Counting slices or expressions: >>> del KV['k1'] >>> del KV['k3x':'k8'] >>> del KV[KV.key.between('k10', 'k18')] >>> list(KV[:]) [Row(key='k0', value='v0'), Row(key='k19', value='v19'), Row(key='k2', value='v2') save_optimistic() Traceback (most recent call last): File "", line 1, in File "x.py", line 18, in save_optimistic raise ValueError('No changes have been made.') ValueError: No changes have 0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation
Release 3.5.0print(tweet.message) ... tweet 10 tweet 11 tweet 12 tweet 13 tweet 14 tweet 15 tweet 16 tweet 17 tweet 18 tweet 19 If you would like more granular control, you can always use limit() and offset(). Counting slices or expressions: >>> del KV['k1'] >>> del KV['k3x':'k8'] >>> del KV[KV.key.between('k10', 'k18')] >>> list(KV[:]) [Row(key='k0', value='v0'), Row(key='k19', value='v19'), Row(key='k2', value='v2') save_optimistic() Traceback (most recent call last): File "", line 1, in File "x.py", line 18, in save_optimistic raise ValueError('No changes have been made.') ValueError: No changes have 0 码力 | 347 页 | 380.80 KB | 1 年前3
共 16 条
- 1
- 2













