peewee Documentation Release 3.6.0
Relationships and Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 1.10 API Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . so, please leave a comment on this GitHub issue: https://github.com/coleifer/peewee/issues/1640 1.10 API Documentation This document specifies Peewee’s APIs. 1.10.1 Database class Database(database[ block. Additionally, any SQL executed within the wrapped block will be executed in a transaction. 1.10. API Documentation 107 peewee Documentation, Release 3.6.0 connection_context() Create a context-manager0 码力 | 302 页 | 1.02 MB | 1 年前3peewee Documentation Release 3.5.0
Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 1.10 SQLite Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . parameter, the bound object. Returns self Add a callback to be executed when the proxy is initialized. 1.10 SQLite Extensions The default SqliteDatabase already includes many SQLite-specific features: • General extension – these features will be noted in the documentation. Instantiating a SqliteExtDatabase: 1.10. SQLite Extensions 155 peewee Documentation, Release 3.5.0 from playhouse.sqlite_ext import SqliteExtDatabase0 码力 | 282 页 | 1.02 MB | 1 年前3peewee Documentation Release 2.0.2
class PostgresqlDatabase(Database) Database subclass that communicates to the “psycopg2” driver 1.10 Playhouse, a collection of addons Peewee comes with numerous extras which I didn’t really feel like key/value pairs in your database alongside structured relational data. hstore is great for storing JSON. 1.10. Playhouse, a collection of addons 55 peewee Documentation, Release 2.0.0 Currently the postgres_ext >>> from mymodels import Blog, Entry, Tag, Whatever >>> print [blog.name for blog in Blog.select()] 1.10. Playhouse, a collection of addons 57 peewee Documentation, Release 2.0.0 Option Meaning Example0 码力 | 65 页 | 315.33 KB | 1 年前3peewee Documentation Release 3.4.0
operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 1.10 Foreign Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . login_count + 1).where(User.id == user_id) Expressions can be used in all parts of a query, so experiment! 1.10 Foreign Keys Foreign keys are created using a special field class ForeignKeyField. Each foreign key (and almost certainly unwanted) behaviour where if you delete a record in table A referenced by a 1.10. Foreign Keys 99 peewee Documentation, Release 3.4.0 foreign key in table B, and then create a new0 码力 | 284 页 | 1.03 MB | 1 年前3peewee Documentation Release 2.10.2
operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 1.10 Foreign Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . login_count + 1).where(User.id == user_id) Expressions can be used in all parts of a query, so experiment! 1.10 Foreign Keys Foreign keys are created using a special field class ForeignKeyField. Each foreign key ForeignKeyField(User, related_name='relationships') to_user = ForeignKeyField(User, related_name='related_to') 1.10. Foreign Keys 69 peewee Documentation, Release 2.10.2 class Meta: indexes = ( # Specify a unique0 码力 | 221 页 | 844.06 KB | 1 年前3peewee Documentation Release 3.3.0
operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 1.10 Foreign Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . login_count + 1).where(User.id == user_id) Expressions can be used in all parts of a query, so experiment! 1.10 Foreign Keys Foreign keys are created using a special field class ForeignKeyField. Each foreign key -- Returns rows like -- "Meow I'm a tweet" | 2017-01-17 13:37:00 | huey (continues on next page) 1.10. Foreign Keys 99 peewee Documentation, Release 3.3.0 (continued from previous page) -- "Woof woof"0 码力 | 280 页 | 1.02 MB | 1 年前3
共 6 条
- 1