private static < T , ID > void addDropTableStatements ( DatabaseType databaseType , TableInfo < T , ID > tableInfo , List < String > statements , boolean logDetails ) { List < String > statementsBefore = new ArrayList < String > ( ) ; List < String > statementsAfter = new ArrayList < String > ( ) ; for ( FieldType fieldType : tableInfo . getFieldTypes ( ) ) { databaseType . dropColumnArg ( fieldType , statementsBefore , statementsAfter ) ; } StringBuilder sb = new StringBuilder ( 64 ) ; if ( logDetails ) { logger . info ( "dropping table '{}'" , tableInfo . getTableName ( ) ) ; } sb . append ( "DROP TABLE " ) ; databaseType . appendEscapedEntityName ( sb , tableInfo . getTableName ( ) ) ; sb . append ( ' ' ) ; statements . addAll ( statementsBefore ) ; statements . add ( sb . toString ( ) ) ; statements . addAll ( statementsAfter ) ; }
Generate and return the list of statements to drop a database table .