Ejemplo n.º 1
0
 protected String toColumnDefine(DbColumn column) {
   if (column.array) {
     return realDBTypeBuilder
         .build(RawTypes.Text)
         .replaceFirst("\\$l", String.valueOf(column.size));
   } else {
     String typeName = realDBTypeBuilder.build(column.bizType);
     switch (column.bizType) {
       case Decimal:
         typeName = typeName.replaceFirst("\\$p", String.valueOf(column.precision));
         typeName = typeName.replaceFirst("\\$s", String.valueOf(column.scale));
         break;
       case String:
         typeName = typeName.replaceFirst("\\$l", String.valueOf(column.size));
         break;
       case Text:
         typeName = typeName.replaceFirst("\\$l", String.valueOf(column.size));
         break;
       default:
         break;
     }
     return typeName;
   }
 }
Ejemplo n.º 2
0
 protected void registerColumnType(RawTypes jdbcType, String columnTypeName) {
   realDBTypeBuilder.register(jdbcType, columnTypeName);
 }