public IndexNode(IndexPage indexPage) { ID = Guid.Empty; IsDeleted = true; // Start with index node mark as deleted. Update this after save all stream on disk Right = new IndexLink(); Left = new IndexLink(); DataPageID = uint.MaxValue; IndexPage = indexPage; }
public const int INDEX_NODE_SIZE = 81; // Node Index size #endregion Fields #region Constructors public IndexNode(IndexPage indexPage) { ID = Guid.Empty; IsDeleted = true; // Start with index node mark as deleted. Update this after save all stream on disk Right = new IndexLink(); Left = new IndexLink(); DataPageID = uint.MaxValue; IndexPage = indexPage; }
private static IndexNode BinaryInsertNode(IndexLink baseLink, IndexNode baseNode, EntryInfo entry, Engine engine) { // Must insert my new nodo var pageIndex = engine.GetFreeIndexPage(); var newNode = pageIndex.Nodes[pageIndex.NodeIndex]; baseLink.PageID = pageIndex.PageID; baseLink.Index = pageIndex.NodeIndex; newNode.UpdateFromEntry(entry); newNode.DataPageID = DataFactory.GetStartDataPageID(engine); if (pageIndex.PageID != baseNode.IndexPage.PageID) engine.CacheIndexPage.AddPage(baseNode.IndexPage, true); engine.CacheIndexPage.AddPage(pageIndex, true); return newNode; }
private static IndexNode BinaryInsertNode(IndexLink baseLink, IndexNode baseNode, EntryInfo entry, Engine engine) { // Must insert my new nodo var pageIndex = engine.GetFreeIndexPage(); var newNode = pageIndex.Nodes[pageIndex.UsedNodeCount]; baseLink.PageID = pageIndex.PageID; baseLink.Index = pageIndex.UsedNodeCount; newNode.UpdateFromEntry(entry); newNode.DataPageID = DataFactory.GetStartDataPageID(engine); if (pageIndex.PageID != baseNode.IndexPage.PageID) { engine.CacheIndexPage.AddPage(baseNode.IndexPage, true); } engine.CacheIndexPage.AddPage(pageIndex, true); return(newNode); }
private static IndexNode GetChildIndexNode(IndexLink link, Engine engine) { var pageIndex = engine.CacheIndexPage.GetPage(link.PageID); return(pageIndex.Nodes[link.Index]); }
private static IndexNode GetChildIndexNode(IndexLink link, Engine engine) { var pageIndex = engine.CacheIndexPage.GetPage(link.PageID); return pageIndex.Nodes[link.Index]; }