Beispiel #1
0
        public void Insert(TableRawDataEntry entry, ILowLevelTransaction tx)
        {
            if (entry.PrimaryKey == null || entry.PrimaryKey.Length == 0)
            {
                throw new ArgumentException("primary key can not be empty!");
            }

            var primaryTree = GetPrimaryTree(tx);

            if (primaryTree == null)
            {
                throw new InvalidOperationException($"load table's primary tree faield,table name:{Name}");
            }

            //if (!IsDefinedSecondaryIndex)
            //{
            //    primaryTree.AddEntry(entry, tx);
            //    return;
            //}

            ////插入聚集索引
            //primaryTree.AddEntry(entry, tx);
            //插入二级索引
            InsertSecondaryIndexEntries(entry, tx);
        }
Beispiel #2
0
        public void Update(TableRawDataEntry entry, ILowLevelTransaction tx)
        {
            if (entry.PrimaryKey == null || entry.PrimaryKey.Length == 0)
            {
                throw new ArgumentException("primary key can not be empty!");
            }

            var primaryTree = GetPrimaryTree(tx);

            if (primaryTree == null)
            {
                throw new InvalidOperationException($"load table's primary tree faield,table name:{Name}");
            }
        }
Beispiel #3
0
 /// <summary>
 /// 插入二级索引项
 /// </summary>
 /// <param name="entry"></param>
 /// <param name="tx"></param>
 private void InsertSecondaryIndexEntries(TableRawDataEntry entry, ILowLevelTransaction tx)
 {
     throw new NotImplementedException();
 }