Exemplo n.º 1
0
        public IndexAVL(QNameManager.QName name, long id, TableBase table, int[] columns, bool[] descending, bool[] nullsLast, SqlType[] colTypes, bool pk, bool unique, bool constraint, bool forward)
        {
            this.PersistenceId = id;
            this.Name          = name;
            this.ColIndex      = columns;
            this.ColTypes      = colTypes;
            this.ColDesc       = descending ?? new bool[columns.Length];
            this.NullsLast     = nullsLast ?? new bool[columns.Length];
            this.IsPk          = pk;
            this.isUnique      = unique;
            this.isConstraint  = constraint;
            this.isForward     = forward;
            this.table         = table;
            this.ColCheck      = table.GetNewColumnCheckList();
            ArrayUtil.IntIndexesToboolArray(this.ColIndex, this.ColCheck);
            this.DefaultColMap = new int[columns.Length];
            ArrayUtil.FillSequence(this.DefaultColMap);
            bool flag = this.ColIndex.Length > 0;

            for (int i = 0; i < this.ColDesc.Length; i++)
            {
                if (this.ColDesc[i] || this.NullsLast[i])
                {
                    flag = false;
                }
            }
            this.IsSimpleOrder = flag;
            this.IsSimple      = this.IsSimpleOrder && (this.ColIndex.Length == 1);
            this._nullData     = new object[this.ColIndex.Length];
        }