peewee Documentation
Release 3.5.0Reflection Database URL Connection pool Test Utils Flask Utils Query Examples Model Definitions Schema Creation Basic Exercises Joins and Subqueries Modifying Data Aggregation Recursion Query Builder Declaring alias to use for the table in queries no depends_on indicate this table depends on another for creation no without_rowid indicate table should not have rowid (SQLite only) no Here is an example showing (('first_name', 'last_name'), True), # Note the trailing comma! ) Advanced Index Creation Peewee supports a more structured API for declaring indexes on a model using the Model.add_index()0 码力 | 347 页 | 380.80 KB | 1 年前3
 peewee Documentation Release 3.4.0code More examples Contributing Patches Bugs Questions Query Examples Model Definitions Schema Creation Basic Exercises Joins and Subqueries Modifying Data Aggregation Recursion Database Initializing DateTimeField() slots = IntegerField() class Meta: table_name = 'bookings' Schema Creation If you downloaded the SQL file from the PostgreSQL Exercises site, then you can load the data into alias to use for the table in queries no depends_on indicate this table depends on another for creation no without_rowid indicate table should not have rowid (SQLite only) no Here is an example showing0 码力 | 349 页 | 382.34 KB | 1 年前3
 peewee Documentation Release 3.0.0code More examples Contributing Patches Bugs Questions Query Examples Model Definitions Schema Creation Basic Exercises Joins and Subqueries Modifying Data Aggregation Recursion Database Initializing DateTimeField() slots = IntegerField() class Meta: table_name = 'bookings' Schema Creation If you downloaded the SQL file from the PostgreSQL Exercises site, then you can load the data into alias to use for the table in queries no depends_on indicate this table depends on another for creation no options dictionary of options for create table extensions no without_rowid indicate table should0 码力 | 319 页 | 361.50 KB | 1 年前3
 peewee Documentation Release 3.1.0code More examples Contributing Patches Bugs Questions Query Examples Model Definitions Schema Creation Basic Exercises Joins and Subqueries Modifying Data Aggregation Recursion Database Initializing DateTimeField() slots = IntegerField() class Meta: table_name = 'bookings' Schema Creation If you downloaded the SQL file from the PostgreSQL Exercises site, then you can load the data into alias to use for the table in queries no depends_on indicate this table depends on another for creation no without_rowid indicate table should not have rowid (SQLite only) no Here is an example showing0 码力 | 332 页 | 370.77 KB | 1 年前3
 peewee Documentation
Release 3.5.0alias to use for the table in queries no depends_on indicate this table depends on another for creation no without_rowid indicate table should not have rowid (SQLite only) no Here is an example showing Meta: indexes = ( (('first_name', 'last_name'), True), # Note the trailing comma! ) Advanced Index Creation Peewee supports a more structured API for declaring indexes on a model using the Model.add_index() field names: >>> today = datetime.today() >>> query = Tweet.update(is_published=True).where(Tweet.creation_date < today) >>> query.execute() # Returns the number of rows that were updated. 4 For more information0 码力 | 282 页 | 1.02 MB | 1 年前3
 peewee Documentation
Release 3.3.0starttime = DateTimeField() slots = IntegerField() class Meta: table_name = 'bookings' 1.5.2 Schema Creation If you downloaded the SQL file from the PostgreSQL Exercises site, then you can load the data into alias to use for the table in queries no depends_on indicate this table depends on another for creation no without_rowid indicate table should not have rowid (SQLite only) no Here is an example showing Meta: indexes = ( (('first_name', 'last_name'), True), # Note the trailing comma! ) Advanced Index Creation Peewee supports a more structured API for declaring indexes on a model using the Model.add_index()0 码力 | 280 页 | 1.02 MB | 1 年前3
 peewee Documentation
Release 3.4.0starttime = DateTimeField() slots = IntegerField() class Meta: table_name = 'bookings' 1.5.2 Schema Creation If you downloaded the SQL file from the PostgreSQL Exercises site, then you can load the data into alias to use for the table in queries no depends_on indicate this table depends on another for creation no without_rowid indicate table should not have rowid (SQLite only) no Here is an example showing Meta: indexes = ( (('first_name', 'last_name'), True), # Note the trailing comma! ) Advanced Index Creation Peewee supports a more structured API for declaring indexes on a model using the Model.add_index()0 码力 | 284 页 | 1.03 MB | 1 年前3
 peewee Documentation Release 3.6.0Reflection Database URL Connection pool Test Utils Flask Utils Query Examples Model Definitions Schema Creation Basic Exercises Joins and Subqueries Modifying Data Aggregation Recursion Query Builder Declaring (('first_name', 'last_name'), True), # Note the trailing comma! ) Advanced Index Creation Peewee supports a more structured API for declaring indexes on a model using the Model.add_index() field names: >>> today = datetime.today() >>> query = Tweet.update(is_published=True).where(Tweet.creation_date < today) >>> query.execute() # Returns the number of rows that were updated. 4 For more0 码力 | 377 页 | 399.12 KB | 1 年前3
 peewee Documentation
Release 3.6.0Meta: indexes = ( (('first_name', 'last_name'), True), # Note the trailing comma! ) Advanced Index Creation Peewee supports a more structured API for declaring indexes on a model using the Model.add_index() field names: >>> today = datetime.today() >>> query = Tweet.update(is_published=True).where(Tweet.creation_date < today) >>> query.execute() # Returns the number of rows that were updated. 4 For more information will delete all Tweet objects that are over one year old: >>> query = Tweet.delete().where(Tweet.creation_date < one_year_ago) >>> query.execute() # Returns the number of rows deleted. 7 For more information0 码力 | 302 页 | 1.02 MB | 1 年前3
 peewee Documentation Release 2.10.2field names: >>> today = datetime.today() >>> query = Tweet.update(is_published=True).where(Tweet.creation_date < today) >>> query.execute() # Returns the number of rows that were updated. 4 For more will delete all Tweet objects that are over one year old: >>> query = Tweet.delete().where(Tweet.creation_date < one_year_ago) >>> query.execute() # Returns the number of rows deleted. 7 For more information or get” type logic, typically one would rely on a unique constraint or primary key to prevent the creation of duplicate objects. As an example, let’s say we wish to implement registering a new user account0 码力 | 275 页 | 276.96 KB | 1 年前3
共 16 条
- 1
 - 2
 













