FDO LiteralValue IsNull Support


Right now there are 3 independent IsNull() methods that are not related to each other (one in FdoDataValue, one in FdoGeometryValue, and one in FdoRaster).

We can not mix FdoRaster with FdoLiteralValue because are two different interfaces and we don’t use them in the same place as FdoLiteralValue. Instead we can promote IsNull() function from FdoDataValue and FdoGeometryValue to FdoLiteralValue.

In this case classes like FdoCommonFilterExecutor will benefit by this change by calling IsNull function without care about the type of the object. E.G:

bool FdoCommonFilterExecutor::IsResultNull ()
    FdoPropertyType propType = GetResultPropertyType();
    if (propType == FdoPropertyType_DataProperty)
        return ((FdoDataValue*)m_retvals.back())->IsNull();
    else if (propType == FdoPropertyType_GeometricProperty)
        return ((FdoGeometryValue*)m_retvals.back())->IsNull();
        throw FdoException::Create(FdoException::NLSGetMessage(UNEXPECTEDERROR));

Will become:

bool FdoCommonFilterExecutor::IsResultNull ()
    return ((FdoLiteralValue*)m_retvals.back())->IsNull();

API Changes

IsNull will be supported by adding the IsNull() function to FdoLiteralValue class.

FDO_API virtual bool FdoLiteralValue::IsNull() = 0;
Last modified 10 years ago Last modified on Oct 18, 2007 7:27:44 AM