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
557e4041
Kaydet (Commit)
557e4041
authored
Mar 07, 2013
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Re-ordered functions by deprecation status.
üst
ac37ed21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
17 deletions
+20
-17
transaction.py
django/db/transaction.py
+20
-17
No files found.
django/db/transaction.py
Dosyayı görüntüle @
557e4041
...
...
@@ -39,17 +39,9 @@ def get_connection(using=None):
using
=
DEFAULT_DB_ALIAS
return
connections
[
using
]
def
get_autocommit
(
using
=
None
):
"""
Get the autocommit status of the connection.
"""
return
get_connection
(
using
)
.
autocommit
def
set_autocommit
(
using
=
None
,
autocommit
=
True
):
"""
Set the autocommit status of the connection.
"""
return
get_connection
(
using
)
.
set_autocommit
(
autocommit
)
###########################
# Deprecated private APIs #
###########################
def
abort
(
using
=
None
):
"""
...
...
@@ -106,12 +98,6 @@ def set_clean(using=None):
"""
get_connection
(
using
)
.
set_clean
()
def
clean_savepoints
(
using
=
None
):
"""
Resets the counter used to generate unique savepoint ids in this thread.
"""
get_connection
(
using
)
.
clean_savepoints
()
def
is_managed
(
using
=
None
):
warnings
.
warn
(
"'is_managed' is deprecated."
,
PendingDeprecationWarning
,
stacklevel
=
2
)
...
...
@@ -132,6 +118,18 @@ def rollback_unless_managed(using=None):
# Public APIs #
###############
def
get_autocommit
(
using
=
None
):
"""
Get the autocommit status of the connection.
"""
return
get_connection
(
using
)
.
autocommit
def
set_autocommit
(
using
=
None
,
autocommit
=
True
):
"""
Set the autocommit status of the connection.
"""
return
get_connection
(
using
)
.
set_autocommit
(
autocommit
)
def
commit
(
using
=
None
):
"""
Commits a transaction and resets the dirty flag.
...
...
@@ -166,6 +164,11 @@ def savepoint_commit(sid, using=None):
"""
get_connection
(
using
)
.
savepoint_commit
(
sid
)
def
clean_savepoints
(
using
=
None
):
"""
Resets the counter used to generate unique savepoint ids in this thread.
"""
get_connection
(
using
)
.
clean_savepoints
()
#################################
# Decorators / context managers #
...
...
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