peewee Documentation Release 2.10.2records Counting records Aggregating records Retrieving Scalar Values SQL Functions, Subqueries and “Raw expressions” Security and SQL Injection Window functions Retrieving raw tuples / dictionaries Returning query: ... print person.name, person.birthday ... Herb 1950-05-05 One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case G: >>> expression close() This is just the basics! You can make your queries as complex as you like. All the other SQL clauses are available as well, such as: group_by() having() limit() and offset() Check the documentation0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation Release 3.0.0records Counting records Aggregating records Retrieving Scalar Values SQL Functions, Subqueries and “Raw expressions” Security and SQL Injection Window functions Retrieving row tuples / dictionaries / namedtuples every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) prints: # Bob # * Kitty # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation
Release 3.5.0Query operators Three valued logic Adding user-defined operators Expressions SQL Functions SQL Helper Security and SQL Injection API Documentation Database Query-builder Fields Schema Manager Model every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) prints: # Bob # * Kitty # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation Release 3.4.0records Counting records Aggregating records Retrieving Scalar Values SQL Functions, Subqueries and “Raw expressions” Security and SQL Injection Window functions Retrieving row tuples / dictionaries / namedtuples every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) prints: # Bob # * Kitty # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation Release 3.1.0records Counting records Aggregating records Retrieving Scalar Values SQL Functions, Subqueries and “Raw expressions” Security and SQL Injection Window functions Retrieving row tuples / dictionaries / namedtuples every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) prints: # Bob # * Kitty # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation Release 3.6.0Query operators Three valued logic Adding user-defined operators Expressions SQL Functions SQL Helper Security and SQL Injection Relationships and Joins Model definitions Performing simple joins Joining for every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) prints: # Bob # * Kitty # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case0 码力 | 377 页 | 399.12 KB | 1 年前3
Django 5.1 DocumentationDjango code Models and databases Models Making queries Aggregation Search Managers Performing raw SQL queries Database transactions Multiple databases Tablespaces Database access optimization Database Security in Django Cross site scripting (XSS) protection Cross site request forgery (CSRF) protection SQL injection protection Clickjacking protection SSL/HTTPS Host header validation Referrer policy Cross-origin I’ve found a security problem! What should I do? FAQ: Databases and models How can I see the raw SQL queries Django is running? Can I use Django with a preexisting database? If I make changes to a model0 码力 | 3513 页 | 3.17 MB | 1 年前3
Django 5.1.2 DocumentationDjango code Models and databases Models Making queries Aggregation Search Managers Performing raw SQL queries Database transactions Multiple databases Tablespaces Database access optimization Database Security in Django Cross site scripting (XSS) protection Cross site request forgery (CSRF) protection SQL injection protection Clickjacking protection SSL/HTTPS Host header validation Referrer policy Cross-origin I’ve found a security problem! What should I do? FAQ: Databases and models How can I see the raw SQL queries Django is running? Can I use Django with a preexisting database? If I make changes to a model0 码力 | 3519 页 | 3.17 MB | 1 年前3
Django 5.0.x DocumentationDjango code Models and databases Models Making queries Aggregation Search Managers Performing raw SQL queries Database transactions Multiple databases Tablespaces Database access optimization Database Security in Django Cross site scripting (XSS) protection Cross site request forgery (CSRF) protection SQL injection protection Clickjacking protection SSL/HTTPS Host header validation Referrer policy Cross-origin I’ve found a security problem! What should I do? FAQ: Databases and models How can I see the raw SQL queries Django is running? Can I use Django with a preexisting database? If I make changes to a model0 码力 | 3407 页 | 3.21 MB | 1 年前3
Django 1.8.x DocumentationInstall the Django code Models and databases Models Making queries Aggregation Managers Performing raw SQL queries Database transactions Multiple databases Tablespaces Database access optimization Examples Security in Django Cross site scripting (XSS) protection Cross site request forgery (CSRF) protection SQL injection protection Clickjacking protection SSL/HTTPS Host header validation Session security User-uploaded reports Providing initial data for models Providing initial data with fixtures Providing initial SQL data Running Django on Jython Installing Jython Creating a servlet container Installing Django Installing0 码力 | 2454 页 | 2.85 MB | 1 年前3
共 438 条
- 1
- 2
- 3
- 4
- 5
- 6
- 44













