예제 #1
0
파일: MYSQLAdapter.java 프로젝트: merks/cdo
 @Override
 protected void addIndexField(StringBuilder builder, IDBField field) {
   super.addIndexField(builder, field);
   if (field.getType() == DBType.VARCHAR) {
     builder.append("("); // $NON-NLS-1$
     builder.append(field.getPrecision());
     builder.append(")"); // $NON-NLS-1$
   }
 }
예제 #2
0
파일: MYSQLAdapter.java 프로젝트: merks/cdo
  @Override
  protected String getTypeName(IDBField field) {
    DBType type = field.getType();
    switch (type) {
      case VARCHAR:
      case CLOB:
        return "LONGTEXT"; //$NON-NLS-1$
      case BLOB:
        return "LONGBLOB"; //$NON-NLS-1$
    }

    return super.getTypeName(field);
  }
예제 #3
0
  @Override
  protected String getTypeName(IDBField field) {
    DBType type = field.getType();
    switch (type) {
      case BIT:
        return "SMALLINT"; //$NON-NLS-1$

      case FLOAT:
        return "REAL"; //$NON-NLS-1$

      case LONGVARCHAR:
        return "VARCHAR"; //$NON-NLS-1$

      case NUMERIC:
        return "DECIMAL"; //$NON-NLS-1$

      case LONGVARBINARY:
      case VARBINARY:
        return "BLOB"; //$NON-NLS-1$
    }

    return super.getTypeName(field);
  }