Exemple #1
0
        /// <summary>
        /// </summary>
        /// <param name="tx"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        public static OverflowPage ModifyPage(this ILowLevelTransaction tx, OverflowPage page)
        {
            var newPage = tx.ModifyPage(page.StoreId, page.PageNumber);

            if (newPage == null)
            {
                throw new InvalidOperationException($"modify page failed,pagerid:{page.StoreId},pagenumber:{page.PageNumber}");
            }

            return(newPage.AsOverflow());
        }
Exemple #2
0
        private bool ModifyEntry(TreePageEntry entry, ILowLevelTransaction tx)
        {
            var lastMatch      = entry.LastMatch;
            var lastMatchIndex = entry.LastMatchIndex;

            var newPage = tx.ModifyPage(entry.Page);

            if (newPage == null)
            {
                return(false);
            }

            entry.Page           = newPage;
            entry.LastMatch      = lastMatch;
            entry.LastMatchIndex = lastMatchIndex;

            State.OnChanged(entry.Page, TreePageChangeFlags.Modify);
            return(true);
        }
Exemple #3
0
 /// <summary>
 /// </summary>
 /// <param name="tx"></param>
 /// <param name="page"></param>
 /// <returns></returns>
 public static Page ModifyPage(this ILowLevelTransaction tx, int storeId, long pageNumber)
 {
     return(tx.ModifyPage(new PageNumberInfo(storeId, pageNumber)));
 }