public FixedLengthKey_CompoundWithValue(FixedLengthKey key1, FixedLengthKey key2, FixedLengthKey value) { _key1 = key1; _key2 = key2; _value = value; _key = new CompoundAndValue(_key1.Key, _key2.Key, _value.Key); }
internal DBIndex(ITableDesign tableDesign, string name, FixedLengthKey fixedFactory, FixedLengthKey fixedFactory1, FixedLengthKey fixedFactory2, FixedLengthKey fixedFactoryValue) { Init(tableDesign, name); string[] names = name.Split('#'); if (names.Length == 2) { _firstCompoundName = names[0]; _secondCompoundName = names[1]; } _version = _tableDesign.Version; _fullName = DBHelper.GetFullNameForIndex(tableDesign.Database.Path, tableDesign.Database.Name, tableDesign.Name, _name); _fixedFactory = fixedFactory; _fixedFactory2 = fixedFactory2; _fixedFactoryValue = fixedFactoryValue; _searchBegin = (FixedLengthKey)_fixedFactory.FactoryMethod(); _searchEnd = (FixedLengthKey)_fixedFactory.FactoryMethod(); if (!IBTree._bUseOldKeys) { Object key = _fixedFactory.Key; if (key is int || key is long || key is DateTime || key is Double) { _bTree = new OmniaMeaBTree(_fullName, _fixedFactory); } else { Compound compound = key as Compound; if (compound != null) { if (compound._key1 is int) { if (compound._key2 is int) { _bTree = new OmniaMeaBTree(_fullName, _fixedFactory); } if (compound._key2 is DateTime) { _bTree = new OmniaMeaBTree(_fullName, _fixedFactory); } } } else { CompoundAndValue compval = key as CompoundAndValue; if (compval != null) { if (compval._key1 is int) { if (compval._key2 is int) { if (compval._value is int || compval._value is DateTime) { _bTree = new OmniaMeaBTree(_fullName, _fixedFactory); } } else if (compval._key2 is DateTime) { if (compval._value is int) { _bTree = new OmniaMeaBTree(_fullName, _fixedFactory); } } } } } } } if (_bTree == null) { throw new InvalidOperationException("Not supported key type!"); //_bTree = new BTree( _fullName, _fixedFactory ); } _isOpen = false; }
public FixedLengthKey_Compound(FixedLengthKey key1, FixedLengthKey key2) { _key1 = key1; _key2 = key2; _key = new Compound(_key1.Key, _key2.Key); }