コード例 #1
0
        public RedBlackUniqueNonClusteredIndex(Expression <Func <TRow, TIndexKey> > keySelector,
                                               IComparer <TIndexKey>?comparer, bool allowNullKeys)
        {
            var selector = keySelector.Compile();

            _keySelector = allowNullKeys ? selector : KeySelector.ThrowOnNullKey(selector);
            _map         = new RedBlackTreeMap <TIndexKey, DataPage <TPrimaryKey, TRow> >(comparer);
        }
        public RedBlackNonUniqueNonClusteredIndex(Expression <Func <TRow, TIndexKey> > keySelector,
                                                  IComparer <TIndexKey>?comparer,
                                                  bool allowNullKeys,
                                                  IComparer <TPrimaryKey> primaryKeyComparer)
        {
            _primaryKeyComparer = new AnonymousComparer <DataPage <TPrimaryKey, TRow>, TPrimaryKey>(k => k.PrimaryKey, primaryKeyComparer);
            var selector = keySelector.Compile();

            _keySelector = allowNullKeys ? selector : KeySelector.ThrowOnNullKey(selector);
            _map         = new RedBlackTreeMap <TIndexKey, Set <DataPage <TPrimaryKey, TRow> > >(comparer);
        }
 public RedBlackClusteredIndex(Expression <Func <TRow, TPrimaryKey> > keySelector, IComparer <TPrimaryKey>?comparer)
 {
     _keySelector = KeySelector.ThrowOnNullKey(keySelector.Compile());
     _map         = new RedBlackTreeMap <TPrimaryKey, DataPage <TPrimaryKey, TRow> >(comparer);
 }