wiki:FdoDateTimeCompare

Version 1 (modified by gregboone, 17 years ago) ( diff )

--

Overview

There are a number of places in Provider source code where FdoDateTime are compared, which include but are not limited to The FdoISelectAggregatesCommand implementations of non-RDBMS providers that support MIN, MAX. When a row is being fetched the value is compared against the previous one. Currently the comparison is done in FdoCommonMiscUtil.cpp. For consistency (say with FdoStringP) and convenience, the comparison should be exposed in the FdoDateTime class itself.

API Changes

The following method will be added to FdoDateTime class:

FDO_API static int FdoDateTime::Compare( FdoDateTime * other );

other is the other value to compare against the current value.

The return values can be one of the following:

0 - this and the other value are equal or both null
1 - this value is greater than the other value
-1 - this value is less than the other value

Note: See TracWiki for help on using the wiki.