public void LeafLevelNonclusteredWithNullBitmapAndVariableLength2012_B() { var rawBytes = TestHelper.GetBytesFromByteString(@" 36947500 00020000 01004200 6a006500 73007300 69006500 30004000 61006400 76006500 6e007400 75007200 65002d00 77006f00 72006b00 73002e00 63006f00 6d00 " ); var record = new RawIndexRecord(new ArrayDelimiter <byte>(rawBytes), 5, 0); Assert.AreEqual(4, record.FixedLengthData.Count); Assert.AreEqual(true, record.HasNullBitmap); Assert.AreEqual(true, record.HasVariableLengthColumns); Assert.AreEqual(2, record.NullBitmapColumnCount); Assert.IsNull(record.ChildPageID); Assert.IsNull(record.ChildFileID); dynamic row = RawColumnParser.Parse(record, new IRawType[] { RawType.NVarchar("EmailAddress"), RawType.Int("CustomerID") }); Assert.AreEqual("*****@*****.**", row.EmailAddress); Assert.AreEqual(30100, row.CustomerID); }
public void BranchLevelNonClusteredWithNullBitmapAndVariableLength2012_FirstRecord() { var rawBytes = TestHelper.GetBytesFromByteString(@" 36ca0000 00760200 00010002 00000100 3e006100 30004000 61006400 76006500 6e007400 75007200 65002d00 77006f00 72006b00 73002e00 63006f00 6d00 " ); var record = new RawIndexRecord(new ArrayDelimiter <byte>(rawBytes), 11, 1); // First record has implicit null values Assert.AreEqual(1, record.ChildFileID); Assert.AreEqual(630, record.ChildPageID); }
public void BranchLevelNonClusteredWithNullBitmapAndVariableLength2012_SecondRecord() { var rawBytes = TestHelper.GetBytesFromByteString(@" 36d90000 00780200 00010002 00000100 46006300 68007200 69007300 36004000 61006400 76006500 6e007400 75007200 65002d00 77006f00 72006b00 73002e00 63006f00 6d00 " ); var record = new RawIndexRecord(new ArrayDelimiter <byte>(rawBytes), 11, 1); Assert.AreEqual(1, record.ChildFileID); Assert.AreEqual(632, record.ChildPageID); dynamic row = RawColumnParser.Parse(record, new IRawType[] { RawType.NVarchar("EmailAddress"), RawType.Int("CustomerID") }); Assert.AreEqual("*****@*****.**", row.EmailAddress); Assert.AreEqual(217, row.CustomerID); }