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
6b00af50
Kaydet (Commit)
6b00af50
authored
Şub 27, 2017
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #27802 -- Corrected BaseDatabaseOperations.datetime_extract/trunc_sql() docstrings.
üst
82026d61
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
operations.py
django/db/backends/base/operations.py
+7
-8
No files found.
django/db/backends/base/operations.py
Dosyayı görüntüle @
6b00af50
...
...
@@ -107,20 +107,19 @@ class BaseDatabaseOperations:
def
datetime_extract_sql
(
self
,
lookup_type
,
field_name
,
tzname
):
"""
Given a lookup_type of 'year', 'month', 'day', 'hour', 'minute' or
'second', return
s
the SQL that extracts a value from the given
datetime field field_name
, and a tuple of parameters
.
Given a lookup_type of 'year', 'month', 'day', 'hour', 'minute'
,
or
'second', return the SQL that extracts a value from the given
datetime field field_name.
"""
raise
NotImplementedError
(
'subclasses of BaseDatabaseOperations may require a datetime_extract_sql() method'
)
def
datetime_trunc_sql
(
self
,
lookup_type
,
field_name
,
tzname
):
"""
Given a lookup_type of 'year', 'month', 'day', 'hour', 'minute' or
'second', returns the SQL that truncates the given datetime field
field_name to a datetime object with only the given specificity, and
a tuple of parameters.
Given a lookup_type of 'year', 'month', 'day', 'hour', 'minute', or
'second', return the SQL that truncates the given datetime field
field_name to a datetime object with only the given specificity.
"""
raise
NotImplementedError
(
'subclasses of BaseDatabaseOperations may require a datetime_trun
k
_sql() method'
)
raise
NotImplementedError
(
'subclasses of BaseDatabaseOperations may require a datetime_trun
c
_sql() method'
)
def
time_trunc_sql
(
self
,
lookup_type
,
field_name
):
"""
...
...
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