peewee Documentation Release 3.6.0Exercises Joins and Subqueries Modifying Data Aggregation Recursion Query Builder Declaring tables Select queries Insert queries Update queries Delete queries Query Objects More Hacks Optimistic Locking Grandma’s record from the database. To get a single record from the database, use Select.get(): grandma = Person.select().where(Person.name == 'Grandma L.').get() We can also use the equivalent shorthand database: for person in Person.select(): print(person.name) # prints: # Bob # Grandma L. # Herb Let’s list all the cats and their owner’s name: query = Pet.select().where(Pet.animal_type == 'cat')0 码力 | 377 页 | 399.12 KB | 1 年前3
peewee Documentation
Release 3.5.0Exercises Joins and Subqueries Modifying Data Aggregation Recursion Query Builder Declaring tables Select queries Insert queries Update queries Delete queries Query Objects More Hacks Optimistic Locking Grandma’s record from the database. To get a single record from the database, use Select.get(): grandma = Person.select().where(Person.name == 'Grandma L.').get() We can also use the equivalent shorthand person in Person.select(): print(person.name, person.is_relative) # prints: # Bob True # Grandma L. True # Herb False Let’s list all the cats and their owner’s name: query = Pet.select().where(Pet.animal_type0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation Release 3.4.0Migrations Reflection Database URL Connection pool Test Utils Flask Utils Query Builder Declaring tables Select queries Insert queries Update queries Delete queries Query Objects More Hacks Optimistic Locking Grandma’s record from the database. To get a single record from the database, use Select.get(): grandma = Person.select().where(Person.name == 'Grandma L.').get() We can also use the equivalent shorthand person in Person.select(): print(person.name, person.is_relative) # prints: # Bob True # Grandma L. True # Herb False Let’s list all the cats and their owner’s name: query = Pet.select().where(Pet.animal_type0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation Release 3.1.0Reflection Database URL Connection pool Test Utils Flask Utils Query Builder Declaring tables Select queries Insert queries Update queries Delete queries Query Objects More Hacks Optimistic Locking Grandma’s record from the database. To get a single record from the database, use Select.get(): grandma = Person.select().where(Person.name == 'Grandma L.').get() We can also use the equivalent shorthand person in Person.select(): print(person.name, person.is_relative) # prints: # Bob True # Grandma L. True # Herb False Let’s list all the cats and their owner’s name: query = Pet.select().where(Pet.animal_type0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation Release 3.0.0Migrations Reflection Database URL Connection pool Test Utils Flask Utils Query Builder Declaring tables Select queries Insert queries Update queries Delete queries More Hacks Optimistic Locking Top object per the database. To get a single record from the database, use SelectQuery.get(): grandma = Person.select().where(Person.name == 'Grandma L.').get() We can also use the equivalent shorthand Model.get(): person in Person.select(): print person.name, person.is_relative # prints: # Bob True # Grandma L. True # Herb False Let’s list all the cats and their owner’s name: query = Pet.select().where(Pet.animal_type0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation Release 2.10.2database. To get a single record from the database, use SelectQuery.get(): >>> grandma = Person.select().where(Person.name == 'Grandma L.').get() We can also use the equivalent shorthand Model.get(): person in Person.select(): ... print person.name, person.is_relative ... Bob True Grandma L. True Herb False Let’s list all the cats and their owner’s name: >>> query = Pet.select().where(Pet.animal_type is a big problem with the previous query: because we are accessing pet.owner.name and we did not select this value in our original query, peewee will have to perform an additional query to retrieve the0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation Release 1.0.0users editors = User.select().where(Q(is_staff=True) | Q(is_superuser=True)) # get tweets by editors Tweet.select().where(user__in=editors) # how many active users are there? User.select().where(active=True) user table and show me page 3 (users 41- 60) User.select().order_by(('username', 'asc')).paginate(3, 20) # order users by number of tweets User.select().annotate(Tweet).order_by(('count', 'desc')) # # another way of expressing the same User.select({ User: ['*'], Tweet: [Count('id', 'count')] }).group_by('id').join(Tweet).order_by(('count', 'desc')) # do an atomic update TweetCount.update(count=F('count')0 码力 | 101 页 | 163.20 KB | 1 年前3
peewee Documentation Release 0.9.7users editors = User.select().where(Q(is_staff=True) | Q(is_superuser=True)) # get tweets by editors Tweet.select().where(user__in=editors) # how many active users are there? User.select().where(active=True) user table and show me page 3 (users 41- 60) User.select().order_by(('username', 'asc')).paginate(3, 20) # order users by number of tweets User.select().annotate(Tweet).order_by(('count', 'desc')) # # another way of expressing the same User.select({ User: ['*'], Tweet: [Count('id', 'count')] }).group_by('id').join(Tweet).order_by(('count', 'desc')) # do an atomic update TweetCount.update(count=F('count')0 码力 | 78 页 | 143.68 KB | 1 年前3
Inkscape Beginners’ Guide latest32-bit or 64-bit version, read the section about first. Identifying Your System Architecture 2. Select an installation method from the available choices ( , , archive) and wait for it to download. You hidden behind a blue circle. If need be, go to your file explorer, open your downloads folder and select the file from there. It should be the first file at the top of the folder. exe msi OR 4. If you than English. Click Next on the following welcome screen. 6. On the Custom Setup screen you can select which features you want to install or not install. In most cases the default options should provide0 码力 | 240 页 | 15.19 MB | 1 年前3
Inkscape Beginners’ Guide 1.1org/releases/] and select the best download for your system. If you are unsure if you need the 32-bit or 64-bit version, read the section about first. Identifying Your System Architecture 2. Select an installation hidden behind a blue circle. If need be, go to your file explorer, open your downloads folder and select the file from there. It should be the first file at the top of the folder. OR 4. If you get a User make a new folder for Inkscape and select it or select the destination folder you want Inkscape to be installed to. 8. On the Choose Components screen you can select which features you want to install0 码力 | 241 页 | 14.61 MB | 1 年前3
共 606 条
- 1
- 2
- 3
- 4
- 5
- 6
- 61













