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
89501d92
Kaydet (Commit)
89501d92
authored
Ock 30, 2017
tarafından
Mariusz Felisiak
Kaydeden (comit)
Tim Graham
Ock 30, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #27789 -- Simplified query for sequence value on Oracle.
üst
068cd603
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
operations.py
django/db/backends/oracle/operations.py
+3
-4
No files found.
django/db/backends/oracle/operations.py
Dosyayı görüntüle @
89501d92
...
...
@@ -34,7 +34,7 @@ BEGIN
SELECT NVL(last_number - cache_size, 0) INTO seq_value FROM user_sequences
WHERE sequence_name = '
%(sequence)
s';
WHILE table_value > seq_value LOOP
SELECT "
%(sequence)
s".nextval INTO seq_value FROM du
al;
seq_value := "
%(sequence)
s".nextv
al;
END LOOP;
END;
/"""
...
...
@@ -69,8 +69,7 @@ BEFORE INSERT ON %(tbl_name)s
FOR EACH ROW
WHEN (new.
%(col_name)
s IS NULL)
BEGIN
SELECT "
%(sq_name)
s".nextval
INTO :new.
%(col_name)
s FROM dual;
:new.
%(col_name)
s := "
%(sq_name)
s".nextval;
END;
/"""
%
args
return
sequence_sql
,
trigger_sql
...
...
@@ -258,7 +257,7 @@ WHEN (new.%(col_name)s IS NULL)
def
last_insert_id
(
self
,
cursor
,
table_name
,
pk_name
):
sq_name
=
self
.
_get_sequence_name
(
table_name
)
cursor
.
execute
(
'
SELECT "
%
s".currval FROM du
al'
%
sq_name
)
cursor
.
execute
(
'
"
%
s".currv
al'
%
sq_name
)
return
cursor
.
fetchone
()[
0
]
def
lookup_cast
(
self
,
lookup_type
,
internal_type
=
None
):
...
...
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