internal bool TrySkipValue(SqlMetaDataPriv md, int columnOrdinal, TdsParserStateObject stateObj)
{
if (stateObj.IsNullCompressionBitSet(columnOrdinal))
{
return true;
}
if (md.metaType.IsPlp)
{
ulong ignored;
if (!TrySkipPlpValue(ulong.MaxValue, stateObj, out ignored))
{
return false;
}
}
else if (md.metaType.IsLong)
{
Debug.Assert(!md.metaType.IsPlp, "Plp types must be handled using SkipPlpValue");
byte textPtrLen;
if (!stateObj.TryReadByte(out textPtrLen))
{
return false;
}
if (0 != textPtrLen)
{
if (!stateObj.TrySkipBytes(textPtrLen + TdsEnums.TEXT_TIME_STAMP_LEN))
{
return false;
}
int length;
if (!TryGetTokenLength(md.tdsType, stateObj, out length))
{
return false;
}
if (!stateObj.TrySkipBytes(length))
{
return false;
}
}
}
else
{
int length;
if (!TryGetTokenLength(md.tdsType, stateObj, out length))
{
return false;
}
// if false, no value to skip - it's null
if (!IsNull(md.metaType, (ulong)length))
{
if (!stateObj.TrySkipBytes(length))
{
return false;
}
}
}
return true;
}