#24194: Oracle Backend Operations
-------------------------------------+-------------------------------------
Reporter: kl4us | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.7
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by kl4us):
I think the problem was '''return sql, []''' in '''datetime_trunc_sql'''
and in all '''datetime_*_sql''' function.
If i use
{{{
extract_hour = connection.ops.datetime_trunc_sql('hour','timestamp',
None)
startdate = datetime.datetime.now() - datetime.timedelta(days=1)
status_report_2 =
MyObject.objects.filter(timestamp__gt=startdate).extra({'hour':extract_hour[0]}).values("hour",
"status").annotate(Count('pk')).order_by('hour')
}}}
with only the '''sql''' of '''return sql, []''' all works fine.
--
Ticket URL: <https://code.djangoproject.com/ticket/24194#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.a54774298d70cb81775a7fef2e8eef75%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.