per page, with , order by , clip by
Results of 1 - 10 of about 14 for desc (0.007 sec.)
Django 2.0.7 リリースノート 12743
Django 2.0.7 リリースノート 2018年7月2日 Django 2.0.7 では、2.0.6 にあったいくつかのバグを修正しました。 バグ修正 Fixed admin changelist crash when using a query expression without asc() or desc() in the page's ordering ( #29428 ). Fixed ad ...
https://man.mtool.work/django/6.1/releases/2.0.7.html
クエリ式 (Query Expression) 11955
クエリ式 (Query Expression) クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値または計算を記述します。式が真偽値を出力する場合、フィルタで直接使用できます。クエリの記述に使用 ... ctly >>> Company . objects . order_by ( Length ( "name" ) . asc ()) >>> Company . objects . order_by ( Length ( "name" ) . desc ()) # or using the double underscore lookup syntax. >>> from django.db.models import CharField >>> from django.db.models.f ... car . manufacturer <Manufacturer: Toyota> >>> car . built_by 3 NULL 値のソートに F() を使う F() と Expression.asc() または desc() のキーワード引数 nulls_first または nulls_last を使用して、フィールドの null 値のソートの順序を制御します。デフォルトでは ... 企業の後に並べるには次のようにします: from django.db.models import F Company . objects . order_by ( F ( "last_contacted" ) . desc ( nulls_last = True )) 論理演算で F() を使う BooleanField を出力する F() 式は反転演算子 ~F() で論理的に否定することができま ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
モデル index リファレンス 9960
モデル index リファレンス Index クラスを利用すると、データベースのインデックスの作成が簡単になります。インデックスは、 Meta.indexes オプションを使用して追加できます。このドキュメントでは、 index options を含む Index の API リファレンスを説明 ... expressions を使用すると、式およびデータベース関数に対して関数インデックスを作成できます。 例: Index ( Lower ( "title" ) . desc (), "pub_date" , name = "lower_title_date_idx" ) この例は、 title フィールドを小文字にした値の降順と、 pub_date フィールド ... するには、フィールド名の前にハイフンを追加します。 たとえば、 Index(fields=['headline', '-pub_date']) は (headline, pub_date DESC) を持つ SQL を作成します。 name Index. name インデックスの名前。 name が与えられなかった場合、Django は名前を自動生成します ...
https://man.mtool.work/django/6.1/ref/models/indexes.html
QuerySet API リファレンス 9575
QuerySet API リファレンス このドキュメントでは、 QuerySet API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としていますので、このドキュメントを読む前にこの 2 つを読んでおくことをおすすめします。 このリファレン ... 'name'] を保持している場合、最初のクエリセットは以下と同じになります: Entry . objects . order_by ( "blog__name" ) asc() か desc() を式の中で呼び出すことで、 クエリ式 を使うこともできます: Entry . objects . order_by ( Coalesce ( "summary" , "headline" ... ) . desc ()) asc() と desc() は、null値をどのようにソートするかを制御する引数 ( nulls_first と nulls_last )をとります。 Be cautious ... フィールドで並び替えることで、一貫したルールでの並び替えを実現できます: Entry . objects . order_by ( Lower ( "headline" ) . desc ()) If you don't want any ordering to be applied to a query, not even the default ordering, call order_by() with no parame ...
https://man.mtool.work/django/6.1/ref/models/querysets.html
Django 1.11 リリースノート 9172
Django 1.11 リリースノート April 4, 2017 Django 1.11 へようこそ! このリリースノートでは、Django 1.10 および過去のバージョンからアップグレードする際に知っておくべきいくつかの 後方互換性のない変更 に加え、 新機能 を説明しています。 いくつかの ... ta class. It can be subclassed to support different index types, such as GinIndex . It also allows defining the order (ASC/DESC) for the columns of the index. テンプレートベースのウィジェット表示 ウィジェットのカスタマイズを簡単にするため、フォームウ ... leField で unique=True オプションを使用できるようになりました。 nulls_first と nulls_last パラメータを Expression.asc() と desc() に追加し、null 値の順序をコントロールできるようにしました。 新たな F 表現 bitleftshift() と bitrightshift() メソッドによ ... .get_constraints() method should include an 'orders' key in each of the returned dictionaries with a list of 'ASC' and/or 'DESC' values corresponding to the ordering of each column in the index. inspectdb no longer calls DatabaseIntrospection.get_ind ...
https://man.mtool.work/django/6.1/releases/1.11.html
素の SQL 文の実行 9172
素の SQL 文の実行 Django gives you three ways of performing raw SQL queries: you can embed raw SQL fragments into ORM queries using RawSQL (see Raw SQL fragments ), use Manager.raw() to perform raw queries and return model instances , or av ... Return all rows from a cursor as a dict. Assume the column names are unique. """ columns = [ col [ 0 ] for col in cursor . description ] return [ dict ( zip ( columns , row )) for row in cursor . fetchall ()] 別の選択肢は Python 標準ライブラリに含まれ ... namedtuplefetchall ( cursor ): """ Return all rows from a cursor as a namedtuple. Assume the column names are unique. """ desc = cursor . description nt_result = namedtuple ( "Result" , [ col [ 0 ] for col in desc ]) return [ nt_result ( * row ) for ...
https://man.mtool.work/django/6.1/topics/db/sql.html
PostgreSQL 固有の集計関数 7982
PostgreSQL 固有の集計関数 これらの機能は、 django.contrib.postgres.aggregates モジュールから利用可能です。これらについての詳細は、 PostgreSQLドキュメント に記載されています。 注釈 すべての関数はデフォルトのエイリアスを持たないので、明示的に ... b.models import F ArrayAgg ( "a_field" , order_by = "-some_field" ) ArrayAgg ( "a_field" , order_by = F ( "some_field" ) . desc ()) BitAnd class BitAnd ( expression , filter = None , default = None , ** extra ) すべての非 null 入力値のビットごとの AN ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/aggregates.html
制約 (Constraint) リファレンス 7982
制約 (Constraint) リファレンス このモジュールで定義されたクラスはデータベース制約を作成します。これらはモデルの Meta.constraints オプションで追加されます。 組み込みの制約への参照について 制約は django.db.models.constraints で定義されています ... essions により、式やデータベース関数に対する関数的なユニーク制約を作成できます。 例: UniqueConstraint ( Lower ( "name" ) . desc (), "category" , name = "unique_lower_name_category" ) これは name フィールドの小文字の値を降順で、 category フィールドの値 ...
https://man.mtool.work/django/6.1/ref/models/constraints.html
Django 3.2 リリースノート 7579
Django 3.2 リリースノート April 6, 2021 Django 3.2 へようこそ! このリリースノートでは、 バージョン 3.2 の新機能 と、Django 3.1 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... ield () weight = models . IntegerField () class Meta : indexes = [ Index ( Lower ( "first_name" ), Upper ( "last_name" ) . desc (), name = "first_last_name_idx" , ), Index ( F ( "height" ) / ( F ( "weight" ) + Value ( 5 )), name = "calc_idx" , ), ] F ...
https://man.mtool.work/django/6.1/releases/3.2.html
Django 4.0 リリースノート 7579
Django 4.0 リリースノート 2021年12月7日 Django 4.0 へようこそ! このリリースノートでは、 バージョン 4.0 の新機能 と、Django 3.2 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... Field ( max_length = 255 ) class Meta : constraints = [ UniqueConstraint ( Lower ( "first_name" ), Lower ( "last_name" ) . desc (), name = "first_last_name_unique" , ), ] Functional unique constraints are added to models using the Meta.constraints op ... h model is added to the AdminSite.each_context() method. The new ModelAdmin.search_help_text attribute allows specifying a descriptive text for the search box. The InlineModelAdmin.verbose_name_plural attribute now fallbacks to the InlineModelAdmin.v ... lds with names longer than 30 characters. Unfortunately, renaming some Oracle tables and columns is required. Use the upgrade script in 33789 to generate RENAME statements to change naming scheme. その他 Support for cx_Oracle < 7.0 is removed. To all ...
https://man.mtool.work/django/6.1/releases/4.0.html
PREV 1 2 NEXT