private string ExtractType(ColumnSchema schema)
 {
     var rez = schema.DataType;
     if (!string.IsNullOrEmpty(schema.CharacterMaximumLength))
     {
         rez = rez + "(" + (schema.CharacterMaximumLength == "-1"
                                ? "max"
                                : schema.CharacterMaximumLength) + ")";
         return rez;
     }
     if (!string.IsNullOrEmpty(schema.NumericPrecision))
     {
         rez = rez + "(" + schema.NumericPrecision;
         if (!string.IsNullOrEmpty(schema.NumericScale))
         {
             rez = rez + "," + schema.NumericScale;
         }
         return rez + ")";
     }
     return rez;
 }
Exemple #2
0
        private string ExtractType(ColumnSchema schema)
        {
            var rez = schema.DataType;

            if (!string.IsNullOrEmpty(schema.CharacterMaximumLength))
            {
                rez = rez + "(" + (schema.CharacterMaximumLength == "-1"
                                       ? "max"
                                       : schema.CharacterMaximumLength) + ")";
                return(rez);
            }
            if (!string.IsNullOrEmpty(schema.NumericPrecision))
            {
                rez = rez + "(" + schema.NumericPrecision;
                if (!string.IsNullOrEmpty(schema.NumericScale))
                {
                    rez = rez + "," + schema.NumericScale;
                }
                return(rez + ")");
            }
            return(rez);
        }