Re: django-firebird test expressions

2018-04-17 Thread Maximiliano Robaina
El martes, 17 de abril de 2018, 9:11:23 (UTC-3), Josh Smeaton escribió: > > Have you looked into using Cast for this particular query to see if it > passes? > > https://docs.djangoproject.com/en/2.0/ref/models/database-functions/#cast > > Cast(RawSQL('%s', ['value']), CharField(max_length=10) ?

Re: django-firebird test expressions

2018-04-17 Thread Josh Smeaton
Have you looked into using Cast for this particular query to see if it passes? https://docs.djangoproject.com/en/2.0/ref/models/database-functions/#cast Cast(RawSQL('%s', ['value']), CharField(max_length=10) ? If that worked, then perhaps you could find a clever way to wrap problem

Re: django-firebird test expressions

2018-04-17 Thread Maximiliano Robaina
Hi Shai, Thank for the tip El martes, 17 de abril de 2018, 3:01:30 (UTC-3), Shai Berger escribió: > > Hi Maximiliano, > > On Sat, 14 Apr 2018 19:25:48 -0700 (PDT) > Maximiliano Robaina wrote: > > > Hi, > > > > Testing expressions test app, the query generated into >

Re: django-firebird test expressions

2018-04-17 Thread Shai Berger
Hi Maximiliano, On Sat, 14 Apr 2018 19:25:48 -0700 (PDT) Maximiliano Robaina wrote: > Hi, > > Testing expressions test app, the query generated into > BasicExpressionsTests.test_annotate_values_filter method: > > companies = Company.objects.annotate( > foo=RawSQL('%s',

Re: django-firebird test expressions

2018-04-16 Thread Maximiliano Robaina
Hi Josh, Thanks for response. El domingo, 15 de abril de 2018, 20:35:54 (UTC-3), Josh Smeaton escribió: > > It looks correct to me. RawSQL is defining a parameter to be included in > the query. The RawSQL expression itself is used in the select and on the > left hand side of the WHERE clause,

Re: django-firebird test expressions

2018-04-15 Thread Josh Smeaton
It looks correct to me. RawSQL is defining a parameter to be included in the query. The RawSQL expression itself is used in the select and on the left hand side of the WHERE clause, so the parameter needs to be included there. The right hand side of the WHERE clause is a regular string (which

django-firebird test expressions

2018-04-14 Thread Maximiliano Robaina
Hi, Testing expressions test app, the query generated into BasicExpressionsTests.test_annotate_values_filter method: companies = Company.objects.annotate( foo=RawSQL('%s', ['value']), ).filter(foo='value').order_by('name') Generate: 'SELECT "EXPRESSIONS_COMPANY"."ID",