Skip to content

Commit

Permalink
Merge pull request #725 from mchen-len-son/BISERVER-13024
Browse files Browse the repository at this point in the history
[BISERVER-13024] - Oracle repository: unable to create CSV Data Sourc…
  • Loading branch information
akhayrutdinov committed Mar 21, 2016
2 parents fc8d776 + 75ff66b commit 4fdf4bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ public void dropTable( String tableName ) throws CsvTransformGeneratorException
if ( tableName == null ) {
throw new IllegalArgumentException( "Table Name cannot be null" ); //$NON-NLS-1$
}
if ( checkTableExists( tableName ) ) {
String schemaTableName =
targetDatabaseMeta.getQuotedSchemaTableCombination( AgileHelper.getSchemaName(), tableName );
if ( checkTableExists( schemaTableName ) ) {
// TODO this should be dialected
String ddl =
"DROP TABLE " + targetDatabaseMeta.getSchemaTableCombination( AgileHelper.getSchemaName(), tableName );
String ddl = "DROP TABLE " + schemaTableName;
execSqlStatement( ddl, targetDatabaseMeta, null );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void setUp() {
public void shouldDropTableIfExists() throws Exception {
String existingTable = "existingTable";
when( database.checkTableExists( existingTable ) ).thenReturn( true );
when( databaseMeta.getSchemaTableCombination( (String) isNull(), eq( existingTable ) ) )
when( databaseMeta.getQuotedSchemaTableCombination( (String) isNull(), eq( existingTable ) ) )
.thenReturn( existingTable );

stagingTransformGenerator.dropTable( existingTable );
Expand All @@ -86,7 +86,7 @@ public void shouldDropTableIfExists() throws Exception {
public void shouldNotDropTableIfNotExists() throws Exception {
String nonExistingTable = "nonExistingTable";
when( database.checkTableExists( nonExistingTable ) ).thenReturn( false );
when( databaseMeta.getSchemaTableCombination( (String) isNull(), eq( nonExistingTable ) ) )
when( databaseMeta.getQuotedSchemaTableCombination( (String) isNull(), eq( nonExistingTable ) ) )
.thenReturn( nonExistingTable );

stagingTransformGenerator.dropTable( nonExistingTable );
Expand Down

0 comments on commit 4fdf4bc

Please sign in to comment.