per page, with , order by , clip by
Results of 1 - 10 of about 39 for aggregate (0.003 sec.)
アグリゲーション (集計) 15490
アグリゲーション (集計) Djangoのデータベース抽象API のトピックガイドでは、個別のオブジェクトの作成、取得、削除を行うDjangoのクエリの使い方を説明しました。しかし、オブジェクトのコレクションを 集計 (アグリゲーション) した値や、集計することによ ... vide default to be returned instead # of None if no books exist. >>> from django.db.models import Avg >>> Book . objects . aggregate ( Avg ( "price" , default = 0 )) {'price__avg': 34.35} # Max price across all books, provide default to be returned instea ... d of # None if no books exist. >>> from django.db.models import Max >>> Book . objects . aggregate ( Max ( "price" , default = 0 )) {'price__max': Decimal('81.20')} # Difference between the highest priced book and the ave ... rage price of all books. >>> from django.db.models import FloatField >>> Book . objects . aggregate ( ... price_diff = Max ( "price" , output_field = FloatField ()) - Avg ( "price" ) ... ) {'price_diff': 46.85} # All the f ...
https://man.mtool.work/django/6.1/topics/db/aggregation.html
PostgreSQL 固有の集計関数 10666
PostgreSQL 固有の集計関数 これらの機能は、 django.contrib.postgres.aggregates モジュールから利用可能です。これらについての詳細は、 PostgreSQLドキュメント に記載されています。 注釈 すべての関数はデフォルトのエイリアスを持たないので、明示的に ... エイリアスを指定する必要があります。例えば: >>> SomeModel . objects . aggregate ( arr = ArrayAgg ( "somefield" )) {'arr': [0, 1, 2]} 一般的な集計オプション すべての集計関数は、 filter キーワード引数を持 ... dels . BooleanField () rank = models . IntegerField () >>> from django.db.models import Q >>> from django.contrib.postgres.aggregates import BoolAnd >>> Comment . objects . aggregate ( booland = BoolAnd ( "published" )) {'booland': False} >>> Comment . ob ... jects . aggregate ( booland = BoolAnd ( Q ( rank__lt = 100 ))) {'booland': True} BoolOr class BoolOr ( expression , filter = None , default ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/aggregates.html
クエリ式 (Query Expression) 9397
クエリ式 (Query Expression) クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値または計算を記述します。式が真偽値を出力する場合、フィルタで直接使用できます。クエリの記述に使用 ... cts . 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 = Count ( "products" )) >>> Com ... pany . objects . annotate ( num_products = Count ( F ( "products" ))) # Aggregates can contain complex computations also >>> Company . objects . annotate ( num_offerings = Count ( F ( "products" ) + F ( " ... oyees" ), F ( "num_chairs" )), ... ) 組み込みのクエリ式 注釈 これらの式は django.db.models.expressions と django.db.models.aggregates で定義されていますが、利便性のために django.db.models からインポートできます。 F() 式 class F [ソース] F() オブジェクトは ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
Django 2.2.28 リリースノート 9099
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 column aliases, using a suitably crafted dictionary, with diction ...
https://man.mtool.work/django/6.1/releases/2.2.28.html
Django 3.2.13 リリースノート 8896
Django 3.2.13 リリースノート 2022年4月11日 Django 3.2.13 では 3.2.12 における深刻度 "high" のセキュリティの問題2件と 3.2.4 におけるリグレッションを修正しました。 CVE-2022-28346: Potential SQL injection in QuerySet.annotate() , aggregate() , ... and extra() QuerySet.annotate() , aggregate() , and extra() methods were subject to SQL injection in column aliases, using a suitably crafted dictionary, with diction ...
https://man.mtool.work/django/6.1/releases/3.2.13.html
Django 6.0 release notes 8896
Django 6.0 release notes December 3, 2025 Welcome to Django 6.0! These release notes cover the new features , as well as some backwards incompatible changes you should be aware of when upgrading from Django 5.2 or earlier. We've begun the d ... straints now implement a check() method that is already registered with the check framework. The new order_by argument for Aggregate allows specifying the ordering of the elements in the result. The new Aggregate.allow_order_by class attribute determines ... whether the aggregate function allows passing an order_by keyword argument. The new StringAgg aggregate returns the input values concatenated in ... to a string, separated by the delimiter string. This aggregate was previously supported only for PostgreSQL. The save() method now raises a specialized Model.NotUpdated exception, when ...
https://man.mtool.work/django/6.1/releases/6.0.html
Django 1.1 リリースノート 8802
Django 1.1 リリースノート July 29, 2009 Django 1.1 へようこそ! Django 1.1 includes a number of nifty new features , lots of bug fixes, and an easy upgrade path from Django 1.0. Backwards-incompatible changes in 1.1 Django has a policy of AP ... res in Django 1.1 are: ORM improvements Two major enhancements have been added to Django's object-relational mapper (ORM): aggregate support, and query expressions. Aggregate support It's now possible to run SQL aggregate queries (i.e. COUNT() , MAX() , M ... IN() , etc.) from within Django's ORM. You can choose to either return the results of the aggregate directly, or else annotate the objects in a QuerySet with the results of the aggregate query. This feature is available as ... new aggregate() and annotate() methods, and is covered in detail in the ORM aggregation documentation . Query expressions Queries can no ...
https://man.mtool.work/django/6.1/releases/1.1.html
Django 4.0.4 リリースノート 8802
Django 4.0.4 リリースノート 2022年4月11日 Django 4.0.4 では 4.0.3 における深刻度 "high" のセキュリティの問題2件とバグ2件を修正しました。 CVE-2022-28346: Potential SQL injection in QuerySet.annotate() , aggregate() , and extra() QuerySet.ann ... otate() , aggregate() , and extra() methods were subject to SQL injection in column aliases, using a suitably crafted dictionary, with diction ...
https://man.mtool.work/django/6.1/releases/4.0.4.html
Django 4.2.25 リリースノート 8410
Django 4.2.25 リリースノート 2025年10月1日 Django 4.2.25 では 4.2.24 におけるセキュリティの問題のうち 深刻度 "high" 1件と深刻度 "low" 1件を修正しました。 CVE-2025-59681: MySQL および MariaDB における QuerySet.annotate() , alias() , aggregate ... e() , および extra() 利用時の SQL インジェクションの可能性 QuerySet.annotate() , alias() , aggregate() , および extra() メソッドには、列エイリアスにおける SQL インジェクションの脆弱性が存在していました。これらのメソッドに渡 ...
https://man.mtool.work/django/6.1/releases/4.2.25.html
Django 5.1.13 リリースノート 8410
Django 5.1.13 リリースノート 2025年10月1日 Django 5.1.13 では 5.1.12 におけるセキュリティの問題のうち 深刻度 "high" 1件と深刻度 "low" 1件を修正しました。 CVE-2025-59681: MySQL および MariaDB における QuerySet.annotate() , alias() , aggregate ... e() , および extra() 利用時の SQL インジェクションの可能性 QuerySet.annotate() , alias() , aggregate() , および extra() メソッドには、列エイリアスにおける SQL インジェクションの脆弱性が存在していました。これらのメソッドに渡 ...
https://man.mtool.work/django/6.1/releases/5.1.13.html
PREV 1 2 3 4 NEXT