Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
ffe41591
Kaydet (Commit)
ffe41591
authored
Mar 07, 2013
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Updated the documentation for savepoints.
Apparently django.db.transaction used to be an object.
üst
557e4041
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
transactions.txt
docs/topics/db/transactions.txt
+17
-9
No files found.
docs/topics/db/transactions.txt
Dosyayı görüntüle @
ffe41591
...
...
@@ -193,24 +193,32 @@ Each of these functions takes a ``using`` argument which should be the name of
a database for which the behavior applies. If no ``using`` argument is
provided then the ``"default"`` database is used.
Savepoints are controlled by three
methods on the transaction object
:
Savepoints are controlled by three
functions in :mod:`django.db.transaction`
:
..
method:: transaction.
savepoint(using=None)
..
function::
savepoint(using=None)
Creates a new savepoint. This marks a point in the transaction that
is known to be in a "good" state.
Returns the savepoint ID (
sid
).
Returns the savepoint ID (
``sid``
).
..
method:: transaction.
savepoint_commit(sid, using=None)
..
function::
savepoint_commit(sid, using=None)
Updates the savepoint to include any operations that have been performed
since the savepoint was created, or since the last commit
.
Releases savepoint ``sid``. The changes performed since the savepoint was
created become part of the transaction
.
..
method:: transaction.
savepoint_rollback(sid, using=None)
..
function::
savepoint_rollback(sid, using=None)
Rolls the transaction back to the last point at which the savepoint was
committed.
Rolls back the transaction to savepoint ``sid``.
These functions do nothing if savepoints aren't supported or if the database
is in autocommit mode.
In addition, there's a utility function:
.. function:: clean_savepoints(using=None)
Resets the counter used to generate unique savepoint IDs.
The following example demonstrates the use of savepoints::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment