per page, with , order by , clip by
Results of 1 - 10 of about 20 for atomic (0.052 sec.)
データベースのトランザクション 15719
データベースのトランザクション Django では、データベースのトランザクションをコントロールする方法が提供されています。 データベースのトランザクションを管理する Django のデフォルトのトランザクションの動作 Django のデフォルトの動作は、オートコミ ... ョンを扱う一般的な方法は、各リクエストをトランザクションでラップすることです。この動作を有効化したい各データベースの設定で、 ATOMIC_REQUESTS を True にセットしてください。 これは、次のように動作します。まず、ビュー関数を呼び出す前に、Django はトランザクシ ... ンをコミットします。もしビューが例外を生成した場合は、Django はトランザクションをロールバックします。 ビューのコード (通常は atomic() コンテキストマネージャー) の中で、セーブポイントを使ったサブトランザクションを扱うことができます。ただし、ビューの最後で ... ポンスを送信開始した後にエラーを扱う適切な方法が存在しないからです。 実際には、この機能はすべてのビュー関数を以下で説明する atomic() デコレータでラップします。 あなたのビューの実行だけがトランザクションで閉じられることに注意してください。ミドルウェアはト ...
https://man.mtool.work/django/6.1/topics/db/transactions.html
データベースのマイグレーションの作成方法 9533
データベースのマイグレーションの作成方法 このドキュメントでは、遭遇する可能性のあるいくつかのシナリオに対する、データベースのマイグレーションの構成方法と書き方について説明します。マイグレーションに関する入門的な資料を探しているなら、 トピッ ... では、マイグレーションはデフォルトでトランザクション内で実行されます。大きなテーブルに対してデータ移行を行う場合などには、 atomic 属性を False に設定することで、トランザクション内で移行が実行されないようにすることができます: from django.db import migra ... tions class Migration ( migrations . Migration ): atomic = False Within such a migration, all operations are run without a transaction. It's possible to execute parts of the migra ... tion inside a transaction using atomic() or by passing atomic=True to RunPython . 以下は、大きなテーブルを小さなバッチで更新する、非アトミックなデータマイグレーシ ...
https://man.mtool.work/django/6.1/howto/writing-migrations.html
PostgreSQL 固有のデータベース関数 8428
PostgreSQL 固有のデータベース関数 これらの関数はすべて django.contrib.postgres.functions モジュールから利用できます。 RandomUUID class RandomUUID [ソース] バージョン 4 の UUID を返します。 使用例: >>> from django.contrib.postgres.functions ... ango.db.models.functions.Now を補完するもので、現在のステートメントの日時を返します。 Note that only the outermost call to atomic() sets up a transaction and thus sets the time that TransactionNow() will return; nested calls create savepoints which do ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/functions.html
Django 3.2 リリースノート 8309
Django 3.2 リリースノート April 6, 2021 Django 3.2 へようこそ! このリリースノートでは、 バージョン 3.2 の新機能 と、Django 3.1 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... ns now allow using transforms. See 式はトランスフォーム(Transform)を参照できる for details. The new durable argument for atomic() guarantees that changes made in the atomic block will be committed if the block exits without errors. A nested atomic bl ...
https://man.mtool.work/django/6.1/releases/3.2.html
Django's Tasks framework 8241
Django's Tasks framework New in Django 6.0: For older Django versions, the django-tasks backport is available. For a web application, there's often more than just turning HTTP requests into HTTP responses. For some functionality, it may be ... der this simplified example: @task def my_task ( thing_num ): Thing . objects . get ( num = thing_num ) with transaction . atomic (): Thing . objects . create ( num = 1 ) my_task . enqueue ( thing_num = 1 ) To prevent the scenario where my_task runs be ... to enqueue() via functools.partial() : from functools import partial from django.db import transaction with transaction . atomic (): Thing . objects . create ( num = 1 ) transaction . on_commit ( partial ( my_task . enqueue , thing_num = 1 )) Task res ...
https://man.mtool.work/django/6.1/topics/tasks.html
マイグレーション・オペレーション 8173
マイグレーション・オペレーション マイグレーションファイルは一つ以上の オペレーション 、データベースに対してマイグレーションが行うべきオペレーションを宣言的に保持するオブジェクト、から構成されます。 Django はこれらの Operation オブジェクトも ... 要素を渡します。これは特に処理を逆の順序で行いたい場合に有用です。 RunPython class RunPython ( code , reverse_code = None , atomic = None , hints = None , elidable = False ) [ソース] マイグレーション履歴を反映して独自の Python コードを実行します。 code ... ンドを利用中に schema_editor を利用しようとするとクラッシュを引き起こす場合があります。このような場合は、 RunPython に対して atomic=False を渡してください。 トランザクション中の DDL 使用をサポートしているデータベース(SQLite や PostgreSQL)においては、 Run ... on オペレーションが 非アトミックなマイグレーション の一部である場合、そのオペレーションは RunPython オペレーションに対して atomic=True が渡されて生成されたトランザクション中においてのみ実行されます。 警告 RunPython はモデルのデータベース接続を魔法のよう ...
https://man.mtool.work/django/6.1/ref/migration-operations.html
Django 1.1 リリースノート 8173
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 ... now support incr() and decr() commands to increment and decrement the value of a cache key. On cache backends that support atomic increment/decrement -- most notably, the memcached backend -- these operations will be atomic, and quite fast. Django now ...
https://man.mtool.work/django/6.1/releases/1.1.html
マイグレーション 8173
マイグレーション マイグレーション (Migrations) は、Django でモデルに対して行った変更 (フィールドの追加やモデルの削除など) をデータベーススキーマに反映させる方法です。大抵のマイグレーションは自動で行われるものの、いつマイグレーションが作られ ... など)、すべての操作はトランザクションなしで実行されます。 マイグレーションをトランザクション内で実行しないようにするには、 atomic 属性を False に設定します。たとえば次のようにします。 from django.db import migrations class Migration ( migrations . Migr ... ation ): atomic = False It's also possible to execute parts of the migration inside a transaction using atomic() or by passing atomic=True ...
https://man.mtool.work/django/6.1/topics/migrations.html
Django 1.10 リリースノート 8122
Django 1.10 リリースノート 2016年8月1日 Django 1.10 へようこそ! このリリースノートでは、 バージョン 1.10 の新機能 と、Django 1.9 以前からアップグレードする際に注意が必要な 後方互換性が失われた変更点 について説明します。私たちは、非推奨の期間 ... gument to the RunSQL and RunPython operations to allow them to be removed when squashing migrations. Added support for non-atomic migrations by setting the atomic attribute on a Migration . The migrate and makemigrations commands now check for a consis ... Response are now closed immediately instead of when the WSGI server calls close() on the response. A redundant transaction.atomic() call in QuerySet.update_or_create() is removed. This may affect query counts tested by TransactionTestCase.assertNumQuer ...
https://man.mtool.work/django/6.1/releases/1.10.html
Django 1.6.3 リリースノート 8055
Django 1.6.3 リリースノート April 21, 2014 Django 1.6.3 fixes several bugs in 1.6.2, including three security issues, and makes one backwards-incompatible change: Unexpected code execution using reverse() Django's URL handling is based on a ... eption. This change was made because such errors can be caused by including an app which expects global transactions (e.g. ATOMIC_REQUESTS set to True ), or Django's old autocommit behavior, in a project which runs without them; and further, such error ... voided shadowing deadlock exceptions on MySQL ( #22291 ). Wrapped database exceptions in _set_autocommit ( #22321 ). Fixed atomicity when closing a database connection or when the database server disconnects ( #21239 and #21202 ) Fixed regression in pr ...
https://man.mtool.work/django/6.1/releases/1.6.3.html
PREV 1 2 NEXT