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
ec7bf6d8
Kaydet (Commit)
ec7bf6d8
authored
Ara 25, 2018
tarafından
Simon Charette
Kaydeden (comit)
Tim Graham
Ara 26, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #20483 -- Cached Oracle references retrieval on sql_flush().
üst
2b2ae4ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
operations.py
django/db/backends/oracle/operations.py
+8
-1
No files found.
django/db/backends/oracle/operations.py
Dosyayı görüntüle @
ec7bf6d8
import
datetime
import
re
import
uuid
from
functools
import
lru_cache
from
django.conf
import
settings
from
django.db.backends.base.operations
import
BaseDatabaseOperations
...
...
@@ -315,7 +316,7 @@ END;
def
return_insert_id
(
self
):
return
"RETURNING
%
s INTO
%%
s"
,
(
InsertIdVar
(),)
def
_
foreign_key_constraints
(
self
,
table_name
,
recursive
=
Fals
e
):
def
_
_foreign_key_constraints
(
self
,
table_name
,
recursiv
e
):
with
self
.
connection
.
cursor
()
as
cursor
:
if
recursive
:
cursor
.
execute
(
"""
...
...
@@ -348,6 +349,12 @@ END;
"""
,
(
table_name
,))
return
cursor
.
fetchall
()
@cached_property
def
_foreign_key_constraints
(
self
):
# 512 is large enough to fit the ~330 tables (as of this writing) in
# Django's test suite.
return
lru_cache
(
maxsize
=
512
)(
self
.
__foreign_key_constraints
)
def
sql_flush
(
self
,
style
,
tables
,
sequences
,
allow_cascade
=
False
):
if
tables
:
truncated_tables
=
{
table
.
upper
()
for
table
in
tables
}
...
...
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