本文整理汇总了C#中System.Data.SqlClient.TdsParserStateObject.IsNullCompressionBitSet方法的典型用法代码示例。如果您正苦于以下问题:C# TdsParserStateObject.IsNullCompressionBitSet方法的具体用法?C# TdsParserStateObject.IsNullCompressionBitSet怎么用?C# TdsParserStateObject.IsNullCompressionBitSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Data.SqlClient.TdsParserStateObject
的用法示例。
在下文中一共展示了TdsParserStateObject.IsNullCompressionBitSet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TrySkipValue
/// <summary>
/// This method skips bytes of a single column value from the media. It supports NBCROW and handles all types of values, including PLP and long
/// </summary>
internal bool TrySkipValue(SqlMetaDataPriv md, int columnOrdinal, TdsParserStateObject stateObj)
{
if (stateObj.IsNullCompressionBitSet(columnOrdinal))
{
return true;
}
if (md.metaType.IsPlp)
{
ulong ignored;
if (!TrySkipPlpValue(UInt64.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;
}
示例2: TryProcessColumnHeader
// takes care of any per data header information:
// for long columns, reads off textptrs, reads length, check nullability
// for other columns, reads length, checks nullability
// returns length and nullability
internal bool TryProcessColumnHeader(SqlMetaDataPriv col, TdsParserStateObject stateObj, int columnOrdinal, out bool isNull, out ulong length)
{
// query NBC row information first
if (stateObj.IsNullCompressionBitSet(columnOrdinal))
{
isNull = true;
// column information is not present in TDS if null compression bit is set, return now
length = 0;
return true;
}
return TryProcessColumnHeaderNoNBC(col, stateObj, out isNull, out length);
}