List Info

Thread: Re: LIMIT 1 in Select Clause




Re: LIMIT 1 in Select Clause
country flaguser name
Poland
2007-12-05 13:13:50
Sharan Rao said the following, On 2007-12-05 15:33:
> On Tuesday 04 Dec 2007 7:17:42 pm Jarosław Staniek
wrote:
>> Sharan Rao said the following, On 2007-12-01 21:17:
>>>  I was facing problems with the function
Connection::querySingleString()
>>> in Sybase, as the " LIMIT " clause is
not supported.
>> Sharan, thanks for your time; here's the patch you
can apply for LIMIT 1
>> ussue. I am looking forward your opinion on it.
>>
> 
> well, now I observed that problem arises when
Connection::querySingleString() 
> function is called from within kexidb ( that is,  not
by some driver code ).
> 
> Take for example, the function,
>  Connection::loadDataBlock()
> 
> Functions like above, which mostly query the system
tables created by kexi, 
> use querySingleString() function too !! And they use it
without changing the 
> default value of the  flag  -- addLimitTo1. :(. So they
are sent with 
> the "LIMIT 1".

IIRC, This is intentional behaviour. See below to discover
why ;)

> As row limiting is implemented differently in different
databases, ( not sure 
> whether adherence to SQL:2003 window functions would
help ?), do you think it 
> would be better if the responsibility of adding the
"LIMIT" clause ( whatever 
> it may be ) to the drivers ?

It is already added. See Driver::addLimitTo1() in my patch.
Just reimplement 
this method.

-- 
regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice
.com.pl/en) to work on
  Kexi & KOffice: http://www.kexi.pl/en, http://www.koffice.org
  KDE3 & KDE4 Libraries for MS Windows: http://kdelibs.com, http://www.kde.org
_______________________________________________
Kexi mailing list
Kexikde.org
https://ma
il.kde.org/mailman/listinfo/kexi
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )