Re: SQueryTest
Anthony Berglas <[email protected]>
| Newsgroups | gmane.comp.java.orm.simpleorm |
|---|---|
| Message-ID | <[email protected]> |
Franck,
Thanks for that. I suspect that PostgreSQL is the only database to
sort Nulls last, just like it is the only one to convert to lower
case. No matter, your fix is good.
I am just completing a substantial internal restructure removing
SResultSet, SPreparedStatement, and cleaning up the associated
logic. Be sure to update.
Anthony
At 05:55 PM 23/07/2008, Franck Routier wrote:
>Hi Anthony,
>
>the latest SQuery tests break against Postgresql.
>
>First point is we must quote "SUMSAL" or else Postgresql will return it
>as "sumsal" and Sals.get(2).get("SUMSAL") fails.
>
>We also hit another problem in the test, that is collation order and
>null sort order.
>Each database will choose to say null is lesser than anything, or
>greater than anything when ordering, depending on... the database
>developpers :)
>Postgresql 8.3 has a NULLS FIRST option in ORDER BY, but defaults to
>NULLS LAST.
>So I guess hsql will put nulls first, while postgresql puts them last.
>
>So in postgresql Sals.get(2).get("SUMSAL") returns 30000.0 (sum(salary)
>for null dept), not 20000.0.
>
>So I have updated the test to get around these problems.
>
>Franck
>
>
Dr Anthony Berglas, [email protected] Mobile: +61 4 4838 8874
Just because it is possible to push twigs along the ground with ones nose
does not necessarily mean that is the best way to collect firewood.
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/SimpleORM/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/SimpleORM/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[email protected]
mailto:[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
3e3df202.jpg
(image/jpeg, 3.3 KB) - not displayed