TypeDbsmToSql() 공개 정적인 메소드

public static TypeDbsmToSql ( TableColumnSchema eColumn ) : string
eColumn TableColumnSchema
리턴 string
예제 #1
0
 protected override string ParseColumnAlter(TableColumnSchema mColumn, TableColumnSchema eColumn)
 {
     return(string.Format(@" [{0}] {1}{2} ",
                          mColumn.Name,
                          MssqlSchemaLoader.TypeDbsmToSql(mColumn),
                          mColumn.Nullable ? string.Empty : @" NOT NULL"));
 }
예제 #2
0
        protected override string ParseColumn(TableColumnSchema column)
        {
            var stat = new StringBuilder();

            stat.Append(MakeDdlElementName(column.Name) + MssqlSchemaLoader.TypeDbsmToSql(column));

            if (column.AutoIncrement)
            {
                stat.AppendFormat(@" IDENTITY ({0},{1})", column.Seed, column.Increment);
            }
            else if (!string.IsNullOrEmpty(column.DefaultValue))
            {
                stat.Append(@" DEFAULT " + column.DefaultValue);
            }

            if (!column.Nullable)
            {
                stat.Append(@" NOT NULL");
            }

            return(stat.ToString());
        }