Exemplo n.º 1
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder("DecimalColumnStatsData(");

            sb.Append("LowValue: ");
            sb.Append(LowValue == null ? "<null>" : LowValue.ToString());
            sb.Append(",HighValue: ");
            sb.Append(HighValue == null ? "<null>" : HighValue.ToString());
            sb.Append(",NumNulls: ");
            sb.Append(NumNulls);
            sb.Append(",NumDVs: ");
            sb.Append(NumDVs);
            sb.Append(")");
            return(sb.ToString());
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the int validator.
        /// </summary>
        /// <returns></returns>
        public string GetIntValidator()
        {
            string res = "";

            if (LowValue.Trim().Length > 0)
            {
                res += " " + Name + "< " + LowValue + " ||";
            }
            if (HighValue.Trim().Length > 0)
            {
                res += " " + Name + "> " + HighValue + " ||";
            }
            if (IsPrimaryKey && IsAutoIncrement == false)
            {
                res += " " + Name + "==0 ||";
            }

            return(res);
        }
Exemplo n.º 3
0
        public void Write(TProtocol oprot)
        {
            TStruct struc = new TStruct("DecimalColumnStatsData");

            oprot.WriteStructBegin(struc);
            TField field = new TField();

            if (LowValue != null && __isset.lowValue)
            {
                field.Name = "lowValue";
                field.Type = TType.Struct;
                field.ID   = 1;
                oprot.WriteFieldBegin(field);
                LowValue.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (HighValue != null && __isset.highValue)
            {
                field.Name = "highValue";
                field.Type = TType.Struct;
                field.ID   = 2;
                oprot.WriteFieldBegin(field);
                HighValue.Write(oprot);
                oprot.WriteFieldEnd();
            }
            field.Name = "numNulls";
            field.Type = TType.I64;
            field.ID   = 3;
            oprot.WriteFieldBegin(field);
            oprot.WriteI64(NumNulls);
            oprot.WriteFieldEnd();
            field.Name = "numDVs";
            field.Type = TType.I64;
            field.ID   = 4;
            oprot.WriteFieldBegin(field);
            oprot.WriteI64(NumDVs);
            oprot.WriteFieldEnd();
            oprot.WriteFieldStop();
            oprot.WriteStructEnd();
        }
Exemplo n.º 4
0
 private void SetErrorMsg()
 {
     if (LowValue.Equals(MinValue) && HighValue.Equals(MaxValue))
     {
         fMessage = string.Format(ObjectUtil.SysCulture, TkWebApp.RangeCBetween,
                                  Field.DisplayName, ToString(LowValue), ToString(HighValue));
     }
     else if (LowValue.Equals(MinValue))
     {
         fMessage = string.Format(ObjectUtil.SysCulture, TkWebApp.RangeCLow,
                                  Field.DisplayName, ToString(HighValue));
     }
     else if (HighValue.Equals(MaxValue))
     {
         fMessage = string.Format(ObjectUtil.SysCulture, TkWebApp.RangeCGreat,
                                  Field.DisplayName, ToString(LowValue));
     }
     else
     {
         fMessage = string.Format(ObjectUtil.SysCulture, TkWebApp.RangeCBetween,
                                  Field.DisplayName, ToString(LowValue), ToString(HighValue));
     }
 }