Exemplo n.º 1
0
        public virtual int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }
            NonclusteredIndexes otherNonclusteredIndexes = obj as NonclusteredIndexes;

            if (otherNonclusteredIndexes != null)
            {
                if (this == null || otherNonclusteredIndexes == null)
                {
                    return(1);
                }
                this.Sort((a, b) => a.name.ToUpper().CompareTo(b.name));
                otherNonclusteredIndexes.Sort((a, b) => a.name.ToUpper().CompareTo(b.name));
                if (this.Count != otherNonclusteredIndexes.Count)
                {
                    return(1);
                }

                for (int i = 0; i < this.Count; i++)
                {
                    if (this[i].CompareTo(otherNonclusteredIndexes[i]) == 1)
                    {
                        return(1);
                    }
                }
            }
            return(0);
        }
Exemplo n.º 2
0
 public TableSt(string name, string schema, byte distribution_policy)
 {
     this.name   = name;
     this.schema = schema;
     this.distribution_policy = distribution_policy;
     this.Columns             = new List <ColumnDef>();
     this.clusteredcols       = new ClusteredDef();
     this.nonclusteredIndexes = new NonclusteredIndexes();
     this.statistics          = new Statistics();
     this.DBPartition         = new Partition();
     this.ClusteredIndexName  = string.Empty;
 }
Exemplo n.º 3
0
 public TableSt()
 {
     this.name   = "";
     this.schema = "";
     this.distribution_policy = 1;
     this.Columns             = new List <ColumnDef>();
     this.clusteredcols       = new ClusteredDef();
     this.nonclusteredIndexes = new NonclusteredIndexes();
     this.statistics          = new Statistics();
     this.DBPartition         = new Partition();
     this.ClusteredIndexName  = string.Empty;
 }