Example #1
0
        public HashedListIndex(string uniqueName, Table <T> table, HashedListTrigger <TKey, T> trigger)
        {
            this.Name      = uniqueName;
            this.dataIndex = table.DataBase.Index;
            this.table     = table;
            this.trigger   = trigger;

            Fields = Helper.Concat(trigger.Fields);

            table.AddIndex(this);
            RegisterIndex();
        }
        public HashedMultyListIndex(string uniqueName, Table <T> table, HashedListTrigger <TKey, T> trigger, IRecordsComparer <T>[] recordsComparers)
        {
            Name      = uniqueName;
            dataIndex = table.DataBase.Index;

            this.table            = table;
            this.trigger          = trigger;
            this.recordsComparers = recordsComparers;

            Fields = Helper.Concat(trigger.Fields);

            for (var i = 0; i < recordsComparers.Length; ++i)
            {
                recordsComparers[i].Owner = this;

                Fields = Helper.Concat(Fields, recordsComparers[i].Fields);
            }

            table.AddIndex(this);
            RegisterIndex();
        }