Ejemplo n.º 1
0
 /// <summary>
 /// 添加指定分区谓词,由编译器确保Caller分区键正确性
 /// </summary>
 public void Where(KeyPredicate predicate, int pkIndex, int pkLen)
 {
     if (predicates == null)
     {
         predicates = new KeyPredicate?[pkLen];
     }
     predicates[pkIndex] = predicate;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 添加索引谓词,由编译器确保Caller键正确性
 /// </summary>
 public void Where(KeyPredicate predicate, int index, int len)
 {
     if (predicates == null)
     {
         predicates = new KeyPredicate?[len];
     }
     predicates[index] = predicate;
 }
Ejemplo n.º 3
0
 public IndexGet Where(KeyPredicate cond)
 {
     for (int i = 0; i < _indexModel.Fields.Length; i++)
     {
         if (_indexModel.Fields[i].MemberId == cond.Value.Id)
         {
             _predicates[i] = cond;
             return(this);
         }
     }
     throw new Exception($"Field[{cond.Value.Id}] not exists in index[{_indexModel.Name}]");
 }