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; }
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; }
public virtual int CompareTo(object obj) { if (obj == null) { return(1); } ClusteredDef otherclusteredCols = obj as ClusteredDef; if (otherclusteredCols != null) { if (this == null || otherclusteredCols == null) { return(1); } if (this.Count == 0 && otherclusteredCols.Count == 0) { return(0); } if (this.Count != otherclusteredCols.Count) { return(1); } if (this[0].index_type != otherclusteredCols[0].index_type) { return(1); } this.Sort((a, b) => a.name.ToUpper().CompareTo(b.name)); otherclusteredCols.Sort((a, b) => a.name.ToUpper().CompareTo(b.name)); for (int i = 0; i < this.Count; i++) { if (this[i].CompareTo(otherclusteredCols[i]) == 1) { return(1); } } } return(0); }