예제 #1
0
파일: Table.java 프로젝트: raedle/univis
 public String sqlDropString(Dialect dialect, String defaultCatalog, String defaultSchema) {
   StringBuffer buf = new StringBuffer("drop table ");
   if (dialect.supportsIfExistsBeforeTableName()) buf.append("if exists ");
   buf.append(getQualifiedName(dialect, defaultCatalog, defaultSchema))
       .append(dialect.getCascadeConstraintsString());
   if (dialect.supportsIfExistsAfterTableName()) buf.append(" if exists");
   return buf.toString();
 }
 public String[] sqlDropStrings(Dialect dialect) throws HibernateException {
   StringBuffer sqlDropString = new StringBuffer("drop table ");
   if (dialect.supportsIfExistsBeforeTableName()) {
     sqlDropString.append("if exists ");
   }
   sqlDropString.append(tableName).append(dialect.getCascadeConstraintsString());
   if (dialect.supportsIfExistsAfterTableName()) {
     sqlDropString.append(" if exists");
   }
   return new String[] {sqlDropString.toString()};
 }