[odb-users] native query with CTE
Lisa Fiedler
lfiedler at informatik.uni-leipzig.de
Sun Mar 17 03:48:11 EDT 2019
On 16.03.19 08:36, Lisa Fiedler wrote:
> I am still using version 2.4.0. I was waiting for 2.5.0 to become the
> official stable version before upgrading.
>
> There, (in version 2.4.0.) these lines are nowhere to be found in the
> odb/pgsql/query.cxx file.
>
> In fact I there discovered the lines:
>
> static bool
> check_prefix (const string& s)
> {
> string::size_type n;
>
> // It is easier to compare to upper and lower-case versions
> // rather than getting involved with the portable case-
> // insensitive string comparison mess.
> //
> if (s.compare (0, (n = 5), "WHERE") == 0 ||
> s.compare (0, (n = 5), "where") == 0 ||
> s.compare (0, (n = 6), "SELECT") == 0 ||
> s.compare (0, (n = 6), "select") == 0 ||
> s.compare (0, (n = 8), "ORDER BY") == 0 ||
> s.compare (0, (n = 8), "order by") == 0 ||
> s.compare (0, (n = 8), "GROUP BY") == 0 ||
> s.compare (0, (n = 8), "group by") == 0 ||
> s.compare (0, (n = 6), "HAVING") == 0 ||
> s.compare (0, (n = 6), "having") == 0)
> {
> // It either has to be an exact match, or there should be
> // a whitespace following the keyword.
> //
> if (s.size () == n || s[n] == ' ' || s[n] == '\n' || s[n] =='\t')
> return true;
> }
>
> Can you tell me a rough estimate as to when version 2.5.0 will be
> offered as stable?
>
> Thanks!
I just checked out the 2.5.0-b.11 release and built it. There, as you
assumed correctly it works out perfectly find.
So I am going to work with this for the time being.
Thanks a lot for your help!!
>
>
> On 15.03.19 15:25, Boris Kolpackov wrote:
>> Lisa Fiedler <lfiedler at informatik.uni-leipzig.de> writes:
>>
>>> Yes I did this already. This does not seem to be the problem.
>> Which version of ODB are you using?
>>
>> In the 2.5.0 pre-release in odb/pgsql/query.cxx:275 I see:
>>
>> s.compare (0, (n = 4), "WITH") == 0 ||
>> s.compare (0, (n = 4), "with") == 0)
>>
>> Which I would expect to take care of this.
>
More information about the odb-users
mailing list