per page, with , order by , clip by
Results of 1 - 10 of about 96 for annotate (0.007 sec.)
アグリゲーション (集計) — Django 6.1 ドキュメント 12226
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » アグリゲーション (集計) ¶ Djangoのデータベース抽象API のトピックガイドでは、個別のオブジェクトの作成、取得、削除を行うDjangoのクエリの使い方を説明し ... with a count of books as a "num_books" attribute. >>> from django.db.models import Count >>> pubs = Publisher . objects . annotate ( num_books = Count ( "book" )) >>> pubs <QuerySet [<Publisher: BaloneyPress>, <Publisher: SalamiPress>, ...]> >>> pubs [ ... k__rating__gt = 5 )) >>> below_5 = Count ( "book" , filter = Q ( book__rating__lte = 5 )) >>> pubs = Publisher . objects . annotate ( below_5 = below_5 ) . annotate ( above_5 = above_5 ) >>> pubs [ 0 ] . above_5 23 >>> pubs [ 0 ] . below_5 12 # The top 5 ... publishers, in order by number of books. >>> pubs = Publisher . objects . annotate ( num_books = Count ( "book" )) . order_by ( "-num_books" )[: 5 ] >>> pubs [ 0 ] . num_books 1323 QuerySet に対して集計を生 ...
https://man.mtool.work/django/6.1/topics/db/aggregation.html
アグリゲーション (集計) — Django 6.1 ドキュメント 12226
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » アグリゲーション (集計) ¶ Djangoのデータベース抽象API のトピックガイドでは、個別のオブジェクトの作成、取得、削除を行うDjangoのクエリの使い方を説明し ... with a count of books as a "num_books" attribute. >>> from django.db.models import Count >>> pubs = Publisher . objects . annotate ( num_books = Count ( "book" )) >>> pubs <QuerySet [<Publisher: BaloneyPress>, <Publisher: SalamiPress>, ...]> >>> pubs [ ... k__rating__gt = 5 )) >>> below_5 = Count ( "book" , filter = Q ( book__rating__lte = 5 )) >>> pubs = Publisher . objects . annotate ( below_5 = below_5 ) . annotate ( above_5 = above_5 ) >>> pubs [ 0 ] . above_5 23 >>> pubs [ 0 ] . below_5 12 # The top 5 ... publishers, in order by number of books. >>> pubs = Publisher . objects . annotate ( num_books = Count ( "book" )) . order_by ( "-num_books" )[: 5 ] >>> pubs [ 0 ] . num_books 1323 QuerySet に対して集計を生 ...
https://man.mtool.work/django/6.1/topics/db/aggregation.html
データベース関数 — Django 6.1 ドキュメント 11267
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベース関数 ¶ The classes documented below provide a way for users to use functions provided by the underlying database as annotations, aggrega ... functions import Cast >>> Author . objects . create ( age = 25 , name = "Margaret Smith" ) >>> author = Author . objects . annotate ( ... age_as_float = Cast ( "age" , output_field = FloatField ()), ... ) . get () >>> print ( author . age_as_float ) 25.0 ... rt Coalesce >>> Author . objects . create ( name = "Margaret Smith" , goes_by = "Maggie" ) >>> author = Author . objects . annotate ( screen_name = Coalesce ( "alias" , "goes_by" , "name" )) . get () >>> print ( author . screen_name ) Maggie >>> # Preven ... >> comment = Comment . objects . create ( body = "No, Least is better." , blog = blog ) >>> comments = Comment . objects . annotate ( last_updated = Greatest ( "modified" , "blog__modified" )) >>> annotated_comment = comments . get () annotated_comment.l ...
https://man.mtool.work/django/6.1/ref/models/database-functions.html
データベース関数 — Django 6.1 ドキュメント 11162
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベース関数 ¶ The classes documented below provide a way for users to use functions provided by the underlying database as annotations, aggrega ... functions import Cast >>> Author . objects . create ( age = 25 , name = "Margaret Smith" ) >>> author = Author . objects . annotate ( ... age_as_float = Cast ( "age" , output_field = FloatField ()), ... ) . get () >>> print ( author . age_as_float ) 25.0 ... rt Coalesce >>> Author . objects . create ( name = "Margaret Smith" , goes_by = "Maggie" ) >>> author = Author . objects . annotate ( screen_name = Coalesce ( "alias" , "goes_by" , "name" )) . get () >>> print ( author . screen_name ) Maggie >>> # Preven ... >> comment = Comment . objects . create ( body = "No, Least is better." , blog = blog ) >>> comments = Comment . objects . annotate ( last_updated = Greatest ( "modified" , "blog__modified" )) >>> annotated_comment = comments . get () annotated_comment.l ...
https://man.mtool.work/django/6.1/ref/models/database-functions.html
全文検索 — Django 6.1 ドキュメント 8943
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 全文検索 ¶ django.contrib.postgres.search モジュールのデータベース関数は PostgreSQL の 全文検索エンジン を利用しやすくしています。 このドキュメントの ... リを行うには、 SearchVector を使用します: >>> from django.contrib.postgres.search import SearchVector >>> Entry . objects . annotate ( ... search = SearchVector ( "body_text" , "blog__tagline" ), ... ) . filter ( search = "Cheese" ) <QuerySet [<Entry: Che ... 検索ドキュメントにすべて含まれます。 SearchVector オブジェクトは組み合わせて再利用できます。たとえば: >>> Entry . objects . annotate ( ... search = SearchVector ( "body_text" ) + SearchVector ( "blog__tagline" ), ... ) . filter ( search = "Cheese" ) <Quer ... chRank , SearchVector >>> vector = SearchVector ( "body_text" ) >>> query = SearchQuery ( "cheese" ) >>> Entry . objects . annotate ( rank = SearchRank ( vector , query )) . order_by ( "-rank" ) <QuerySet [<Entry: Cheese on Toast recipes>, <Entry: Pizza ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/search.html
全文検索 — Django 6.1 ドキュメント 8943
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 全文検索 ¶ django.contrib.postgres.search モジュールのデータベース関数は PostgreSQL の 全文検索エンジン を利用しやすくしています。 このドキュメントの ... リを行うには、 SearchVector を使用します: >>> from django.contrib.postgres.search import SearchVector >>> Entry . objects . annotate ( ... search = SearchVector ( "body_text" , "blog__tagline" ), ... ) . filter ( search = "Cheese" ) <QuerySet [<Entry: Che ... 検索ドキュメントにすべて含まれます。 SearchVector オブジェクトは組み合わせて再利用できます。たとえば: >>> Entry . objects . annotate ( ... search = SearchVector ( "body_text" ) + SearchVector ( "blog__tagline" ), ... ) . filter ( search = "Cheese" ) <Quer ... chRank , SearchVector >>> vector = SearchVector ( "body_text" ) >>> query = SearchQuery ( "cheese" ) >>> Entry . objects . annotate ( rank = SearchRank ( vector , query )) . order_by ( "-rank" ) <QuerySet [<Entry: Cheese on Toast recipes>, <Entry: Pizza ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/search.html
クエリ式 (Query Expression) — Django 6.1 ドキュメント 8286
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリ式 (Query Expression) ¶ クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値ま ... pany to seat all employees? >>> company = ( ... Company . objects . filter ( num_employees__gt = F ( "num_chairs" )) ... . annotate ( chairs_needed = F ( "num_employees" ) - F ( "num_chairs" )) ... . first () ... ) >>> company . num_employees 120 >>> com ... company = Company . objects . create ( name = "Google" , ticker = Upper ( Value ( "goog" ))) >>> company . ticker 'GOOG' # Annotate models with an aggregated value. Both forms # below are equivalent. >>> Company . objects . annotate ( num_products = Coun ... t ( "products" )) >>> Company . objects . annotate ( num_products = Count ( F ( "products" ))) # Aggregates can contain complex computations also >>> Company . objects . ann ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
クエリ式 (Query Expression) — Django 6.1 ドキュメント 8181
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリ式 (Query Expression) ¶ クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値ま ... pany to seat all employees? >>> company = ( ... Company . objects . filter ( num_employees__gt = F ( "num_chairs" )) ... . annotate ( chairs_needed = F ( "num_employees" ) - F ( "num_chairs" )) ... . first () ... ) >>> company . num_employees 120 >>> com ... company = Company . objects . create ( name = "Google" , ticker = Upper ( Value ( "goog" ))) >>> company . ticker 'GOOG' # Annotate models with an aggregated value. Both forms # below are equivalent. >>> Company . objects . annotate ( num_products = Coun ... t ( "products" )) >>> Company . objects . annotate ( num_products = Count ( F ( "products" ))) # Aggregates can contain complex computations also >>> Company . objects . ann ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
Django 2.2.28 リリースノート — Django 6.1 ドキュメント 7932
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 2.2.28 リリースノート ¶ 2022年4月11日 Django 2.2.28 では 2.2.27 における深刻度 "high" のセキュリティの問題2件を修正しました。 CVE-2022-28346: ... Potential SQL injection in QuerySet.annotate() , aggregate() , and extra() ¶ QuerySet.annotate() , aggregate() , and extra() methods were subject to SQL injection in c ... xpansion, as the **options argument. 目次 Django 2.2.28 リリースノート CVE-2022-28346: Potential SQL injection in QuerySet.annotate() , aggregate() , and extra() CVE-2022-28347: Potential SQL injection via QuerySet.explain(**options) on PostgreSQL 前のト ... ango 3.0 リリースノート 次のトピックへ Django 2.2.27 リリースノート 関連キーワード injection QuerySet dictionary Potential annotate aggregate extra methods subject using suitably crafted expansion explain options リリースノート high セキュリティ 問題 修正 ...
https://man.mtool.work/django/6.1/releases/2.2.28.html
Django 2.2.28 リリースノート — Django 6.1 ドキュメント 7787
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 2.2.28 リリースノート ¶ 2022年4月11日 Django 2.2.28 では 2.2.27 における深刻度 "high" のセキュリティの問題2件を修正しました。 CVE-2022-28346: ... Potential SQL injection in QuerySet.annotate() , aggregate() , and extra() ¶ QuerySet.annotate() , aggregate() , and extra() methods were subject to SQL injection in c ... xpansion, as the **options argument. 目次 Django 2.2.28 リリースノート CVE-2022-28346: Potential SQL injection in QuerySet.annotate() , aggregate() , and extra() CVE-2022-28347: Potential SQL injection via QuerySet.explain(**options) on PostgreSQL 前のト ... 0 リリースノート 次のトピックへ Django 2.2.27 リリースノート 関連キーワード injection QuerySet dictionary Django Potential annotate aggregate extra methods subject using suitably crafted expansion explain options リリースノート high セキュリティ 問題 関連 ...
https://man.mtool.work/django/6.1/releases/2.2.28.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT