per page, with , order by , clip by
Results of 1 - 10 of about 61 for expressions (0.003 sec.)
クエリ式 (Query Expression) 15669
クエリ式 (Query Expression) クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値または計算を記述します。式が真偽値を出力する場合、フィルタで直接使用できます。クエリの記述に使用 ... ) >>> company . num_employees 120 >>> company . num_chairs 50 >>> company . chairs_needed 70 # Create a new company using expressions. >>> company = Company . objects . create ( name = "Google" , ticker = Upper ( Value ( "goog" ))) >>> company . ticker 'GO ... mplex computations also >>> Company . objects . annotate ( num_offerings = Count ( F ( "products" ) + F ( "services" ))) # Expressions can also be used in order_by(), either directly >>> Company . objects . order_by ( Length ( "name" ) . asc ()) >>> Company ... jects . filter ( ... Exists ( Employee . objects . filter ( company = OuterRef ( "pk" ), salary__gt = 10 )) ... ) # Lookup expressions can also be used directly in filters >>> Company . objects . filter ( GreaterThan ( F ( "num_employees" ), F ( "num_chairs ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
PostgreSQL 固有のデータベース制約 10857
PostgreSQL 固有のデータベース制約 PostgreSQL は django.contrib.postgres.constraints モジュールから利用できる追加のデータ整合性制約をサポートしています。これらはモデル Meta.constraints オプションで追加されます。 ExclusionConstraint class Exc ... lusionConstraint ( * , name , expressions , index_type = None , condition = None , deferrable = None , include = None , violation_error_code = None , violation_erro ... です。 排他制約は モデル バリデーション の間にチェックされます。 name ExclusionConstraint. name BaseConstraint.name を参照。 expressions ExclusionConstraint. expressions 2値タプルのイテラブル。最初の要素は式または文字列。2番目の要素は文字列で表現された SQL 演 ... 算子です。タイプミスを避けるために、演算子を文字列でマップする RangeOperators を使用できます。たとえば: expressions = [ ( "timespan" , RangeOperators . ADJACENT_TO ), ( F ( "room" ), RangeOperators . EQUAL ), ] 演算子の制約 排他制約には可 ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/constraints.html
PostgreSQL 固有のモデルインデックス 10480
PostgreSQL 固有のモデルインデックス 以下はPostgreSQL固有の django.contrib.postgres.indexes モジュールから利用可能な インデックス です。 BloomIndex class BloomIndex ( * expressions , length = None , columns = () , ** options ) [ソース] bloom ... olumns 引数は、1から4095までの整数ビットで、最大32個の値を持つタプルまたはリストを取ります。 BrinIndex class BrinIndex ( * expressions , autosummarize = None , pages_per_range = None , ** options ) [ソース] BRIN index を作成します。 autosummarize パラメータ ... による automatic summarization を有効にできます。 pages_per_range 引数は正の整数を取ります。 BTreeIndex class BTreeIndex ( * expressions , fillfactor = None , deduplicate_items = None , ** options ) [ソース] B-Tree インデックスを作成します。 fillfactor パラメ ... 、重複排除が有効かどうかを制御します。PostgreSQLでは、重複排除はデフォルトで有効になっています。 GinIndex class GinIndex ( * expressions , fastupdate = None , gin_pending_list_limit = None , ** options ) [ソース] gin インデックス を作成します。 組み込みの演算 ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/indexes.html
制約 (Constraint) リファレンス 8784
制約 (Constraint) リファレンス このモジュールで定義されたクラスはデータベース制約を作成します。これらはモデルの Meta.constraints オプションで追加されます。 組み込みの制約への参照について 制約は django.db.models.constraints で定義されています ... dition = Q ( age__gte = 18 ) | Q ( age__isnull = True ), name = "age_gte_18" ) UniqueConstraint class UniqueConstraint ( * expressions , fields = () , name , condition = None , deferrable = None , include = None , opclasses = () , nulls_distinct = None , vi ... iqueConstraint.fields creates a true database constraint ( ADD CONSTRAINT ... UNIQUE ). Specifying any of UniqueConstraint.expressions , UniqueConstraint.opclasses , UniqueConstraint.condition , or UniqueConstraint.include creates a unique index ( CREATE UN ... ocumentation, the term "unique constraint" is used for both cases to mean a uniqueness guarantee enforced by the database. expressions UniqueConstraint. expressions 位置引数 *expressions により、式やデータベース関数に対する関数的なユニーク制約を作成できます ...
https://man.mtool.work/django/6.1/ref/models/constraints.html
Django 3.2 リリースノート 8784
Django 3.2 リリースノート April 6, 2021 Django 3.2 へようこそ! このリリースノートでは、 バージョン 3.2 の新機能 と、Django 3.1 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... be generated currently. See the DEFAULT_AUTO_FIELD docs for details on migrating such tables. Functional indexes The new *expressions positional argument of Index() enables creating functional indexes on expressions and database functions. For example: fro ... ンを使って照合順序 (collation) を管理する for more details. Lookups for ArrayField now allow (non-nested) arrays containing expressions as right-hand sides. The new OpClass() expression allows creating functional indexes on expressions with a custom operator ... decimal.Decimal , and uuid.UUID instances. As a consequence, resolving an output_field for database functions and combined expressions may now crash with mixed types when using Value() . You will need to explicitly set the output_field in such cases. The ne ...
https://man.mtool.work/django/6.1/releases/3.2.html
Django 1.8.3 リリースノート 8595
Django 1.8.3 リリースノート July 8, 2015 Django 1.8.3 fixes several security issues and bugs in 1.8.2. Also, django.utils.deprecation.RemovedInDjango20Warning was renamed to RemovedInDjango110Warning as the version roadmap was revised to 1. ... ( EmailValidator , most seriously) didn't prohibit newline characters (due to the usage of $ instead of \Z in the regular expressions). If you use values with newlines in HTTP response or email headers, you can suffer from header injection attacks. Django ... d recording of applied status for squashed (replacement) migrations ( #24628 ). Fixed queryset annotations when using Case expressions with exclude() ( #24833 ). Corrected join promotion for multiple Case expressions. Annotating a query with multiple Case e ...
https://man.mtool.work/django/6.1/releases/1.8.3.html
Django 1.11.11 リリースノート 8305
Django 1.11.11 リリースノート 2018年3月6日 Django 1.11.11 では、1.11.10 にあった2つのセキュリティの問題を修正しました。 CVE-2018-7536: urlize と urlizetrunc テンプレートフィルタにおける DoS 攻撃の可能性 The django.utils.html.urlize() functi ... on was extremely slow to evaluate certain inputs due to catastrophic backtracking vulnerabilities in two regular expressions. The urlize() function is used to implement the urlize and urlizetrunc template filters, which were thus vulnerable. The p ... roblematic regular expressions are replaced with parsing logic that behaves similarly. CVE-2018-7537: Denial-of-service possibility in truncatechars_html ...
https://man.mtool.work/django/6.1/releases/1.11.11.html
モデル index リファレンス 8117
モデル index リファレンス Index クラスを利用すると、データベースのインデックスの作成が簡単になります。インデックスは、 Meta.indexes オプションを使用して追加できます。このドキュメントでは、 index options を含む Index の API リファレンスを説明 ... rt models を使用して、indexes を models.<IndexClass> として参照するのが標準的な慣習です。 Index オプション class Index ( * expressions , fields = () , name = None , db_tablespace = None , opclasses = () , condition = None , include = None ) [ソース] データベ ... ース内にインデックス (B-Tree) を作成します。 expressions Index. expressions 位置引数 *expressions を使用すると、式およびデータベース関数に対して関数インデックスを作成できます。 例 ... x" ) この例は、 height および weight フィールドの積の結果と、 weight を直近の整数に丸めた値で、インデックスを作成します。 *expressions を使用する場合、 Index.name は必須です。 Oracle の制限 Oracle はインデックスから参照される関数を DETERMINISTIC とマークする ...
https://man.mtool.work/django/6.1/ref/models/indexes.html
PostgreSQL 固有のクエリ式 8030
PostgreSQL 固有のクエリ式 これらの式は django.contrib.postgres.expressions モジュールから利用できます。 ArraySubquery() 式 class ArraySubquery ( queryset ) [ソース] ArraySubquery は、PostgreSQL の ARRAY コンストラクタを使用してクエリセットか ... om django.db.models import OuterRef >>> from django.db.models.functions import JSONObject >>> from django.contrib.postgres.expressions import ArraySubquery >>> books = Book . objects . filter ( author = OuterRef ( "pk" )) . values ( ... json = JSONObject ( ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/expressions.html
条件式 8030
条件式 Conditional expressions let you use if ... elif ... else logic within filters, annotations, aggregations, and updates. A conditional expression evaluates a series of conditions for each row of a table and returns the matching result ... expression. Conditional expressions can also be combined and nested like other expressions . 条件式クラス このページの例では、以下のモデルを使用します: from d ... ame__startswith = "John" ) | Q ( name__startswith = "Paul" ), then = "name" ) >>> # Condition can be created using boolean expressions. >>> from django.db.models import Exists , OuterRef >>> non_unique_account_type = ( ... Client . objects . filter ( ... ac ... >>> When ( Exists ( non_unique_account_type ), then = Value ( "non unique" )) >>> # Condition can be created using lookup expressions. >>> from django.db.models.lookups import GreaterThan , LessThan >>> When ( ... GreaterThan ( F ( "registered_on" ), date ...
https://man.mtool.work/django/6.1/ref/models/conditional-expressions.html
PREV 1 2 3 4 5 6 7 NEXT