示例#1
0
 private static void FillNameAndType(DataRow row, NameWithType nwt)
 {
     nwt.Name = (string)row[nwt is Column ? "COLUMN_NAME" : "PARAMETER_NAME"];
     nwt.Type = (string)row["DATA_TYPE"];
     if (!row.IsNull("CHARACTER_MAXIMUM_LENGTH") && nwt.Type != "text")
     {
         nwt.Length = row["CHARACTER_MAXIMUM_LENGTH"].ToString();
     }
 }
示例#2
0
        private static string GetTypeDescriptor(NameWithType nameWithType)
        {
            switch (nameWithType.Type.ToLower())
            {
            case "varchar[]":
            case "string[]":
                return("varchar_array READONLY");

            case "int[]":
                return("int_array READONLY");

            case "long[]":
            case "bigint[]":
                return("bigint_array READONLY");

            default:
                string typeDesc = nameWithType.Type;
                if (!string.IsNullOrEmpty(nameWithType.Length))
                {
                    typeDesc += "(" + nameWithType.Length + ")";
                }
                return(typeDesc);
            }
        }