net.sf.farrago.syslib
Class FarragoSyslibUtil
java.lang.Object
net.sf.farrago.syslib.FarragoSyslibUtil
public abstract class FarragoSyslibUtil
- extends Object
FarragoSyslibUtil provides utility methods useful when constructing UDR's.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/syslib/FarragoSyslibUtil.java#4 $
- Author:
- John Sichi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FarragoSyslibUtil
public FarragoSyslibUtil()
compareKeysUsingGroupBySemantics
public static int compareKeysUsingGroupBySemantics(Object obj1,
Object obj2)
- Compares two key objects retrieved from cursor columns having the exact
same SQL datatype. Attempting to compare objects retrieved from columns
with different datatypes may result in assertion violations or incorrect
results; likewise for attempts to compare objects not retrieved from
cursors. The comparison semantics used are the same as for GROUP BY:
- NULL matches NULL
- non-NULL does not match NULL
- character data is right-trimmed before comparison
NOTE jvs 19-Apr-2008: once we support character set collations, this will
not be good enough
Some unit tests are in farrago/unitsql/syslib/presort.sql
- Parameters:
obj1
- first key to compareobj2
- second key to compare
- Returns:
- negative for obj1 < obj2; positive for obj1 > obj2; zero for obj1
== obj2