﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
25287	Multiplying and dividing connectors are not supported by sqlite backed.	Ahmet DAL	nobody	"I have a query using F expressions. When I run this query on PostgreSQL it works. But in tests with '''sqlite3''', it does not work;


Here is my complex query. 
{{{
expires = Expire.objects.filter(ticket__date_opened__lte=(datetime.now() - F(""action__percent"") * F(""action__rule__duration"") / 100))
}}}

Sqlite backend does not support connector *. When I looked into the code, it only supports + and - connectors. 

{{{
DatabaseError: Invalid connector for timedelta: *.
}}}


{{{
    def combine_duration_expression(self, connector, sub_expressions):
        if connector not in ['+', '-']:
            raise utils.DatabaseError('Invalid connector for timedelta: %s.' % connector)
        fn_params = [""'%s'"" % connector] + sub_expressions
        if len(fn_params) > 3:
            raise ValueError('Too many params for timedelta operations.')
        return ""django_format_dtdelta(%s)"" % ', '.join(fn_params)
}}}


I tried to add * and / operator in the list; no problem occured. I think this can be fixed simply."	Bug	new	Database layer (models, ORM)	1.8	Normal		sqlite3, combine_duration_expression, F expressions,		Unreviewed	0	0	0	0	0	0
