peewee Documentation
Release 3.5.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.5 Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . https://groups.google.com/group/peewee-orm 18 Chapter 1. Contents: peewee Documentation, Release 3.5.0 1.5 Database The Peewee Database object represents a connection to a database. The Database class is instantiated Extensions • SQLite Extensions • Sqlcipher backend • apsw, an advanced sqlite driver • SqliteQ 1.5. Database 19 peewee Documentation, Release 3.5.0 1.5.1 Initializing a Database The Database initialization0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.6.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.5 Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . for other people to find. • Ask on the mailing list, https://groups.google.com/group/peewee-orm 1.5 Database The Peewee Database object represents a connection to a database. The Database class is instantiated Peewee Database parameter. To set this value, simply pass in charset alongside your other values: 1.5. Database 19 peewee Documentation, Release 3.6.0 db = MySQLDatabase('database_name', user='www-data'0 码力 | 302 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.3.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.5 Query Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . for other people to find. • Ask on the mailing list, https://groups.google.com/group/peewee-orm 1.5 Query Examples These query examples are taken from the site PostgreSQL Exercises. A sample data-set membercost = MoneyField() guestcost = MoneyField() initialoutlay = MoneyField() (continues on next page) 1.5. Query Examples 19 peewee Documentation, Release 3.3.0 (continued from previous page) monthlymaintenance0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.5 Query Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . for other people to find. • Ask on the mailing list, https://groups.google.com/group/peewee-orm 1.5 Query Examples These query examples are taken from the site PostgreSQL Exercises. A sample data-set membercost = MoneyField() guestcost = MoneyField() initialoutlay = MoneyField() (continues on next page) 1.5. Query Examples 19 peewee Documentation, Release 3.4.0 (continued from previous page) monthlymaintenance0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation
Release 0.9.7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.5 Model API (smells like django) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . provides a django-like Admin interface, RESTful API, Authentication and more for your peewee models. 1.5 Model API (smells like django) Models and their fields map directly to database tables and columns CharField() # <-- VARCHAR class Entry(BaseModel): headline = CharField() content = TextField() # <-- TEXT 1.5. Model API (smells like django) 19 peewee Documentation, Release 0.9.7 pub_date = DateTimeField()0 码力 | 53 页 | 347.03 KB | 1 年前3
peewee Documentation
Release 2.0.2support for automatic schema migrations. 18 Chapter 1. Contents: peewee Documentation, Release 2.0.0 1.5 Example app peewee ships with an example web app that runs on the Flask microframework. If you already and who posted it (foreign key to User). If you like UML, this is basically what it looks like: 1.5. Example app 19 peewee Documentation, Release 2.0.0 Here is what the code looks like: # create a use instead write User.create_table(True) and it will fail silently if the table already exists. 1.5. Example app 21 peewee Documentation, Release 2.0.0 Connecting to the database You may have noticed0 码力 | 65 页 | 315.33 KB | 1 年前3
peewee Documentation
Release 1.0.0provides a django-like Admin interface, RESTful API, Authentication and more for your peewee models. 1.5 Model API (smells like django) Models and their fields map directly to database tables and columns content=’http://www.youtube.com/watch?v=xdhLQCYQ-nQ’, ... pub_date=datetime.datetime.now(), ... blog=blog 1.5. Model API (smells like django) 21 peewee Documentation, Release 1.0.0 ... ) >>> entry.blog.name database again since it will be inherited from # the BaseModel 1.5.4 Model methods class Model 1.5. Model API (smells like django) 23 peewee Documentation, Release 1.0.0 save([force_insert=False])0 码力 | 71 页 | 405.29 KB | 1 年前3
peewee Documentation
Release 2.10.2Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.5 Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . an Encrypted Command-Line Diary. 16 Chapter 1. Contents: peewee Documentation, Release 2.10.2 1.5 Contributing In order to continually improve, Peewee needs the help of developers like you. Whether database-related tasks with peewee. Throughout this document we will use the following example models: 1.5. Contributing 17 peewee Documentation, Release 2.10.2 from peewee import * class User(Model): username0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation Release 3.6.0data: class Sample(Model): key = TextField() value = FloatField() data = ( ('a', (1.25, 1.5, 1.75)), ('b', (2.1, 2.3, 2.5, 2.7, 2.9)), ('c', (3.5, 3.5))) # Populate data. for key, values0 码力 | 377 页 | 399.12 KB | 1 年前3
共 9 条
- 1













