void delete ( ) { StringBuilder sql = new StringBuilder ( ) ; sql . append ( "DROP SCHEMA " ) ; sql . append ( this . sqlgGraph . getSqlDialect ( ) . maybeWrapInQoutes ( this . name ) ) ; if ( this . sqlgGraph . getSqlDialect ( ) . supportsCascade ( ) ) { sql . append ( " CASCADE" ) ; } if ( this . sqlgGraph . getSqlDialect ( ) . needsSemicolon ( ) ) { sql . append ( ";" ) ; } if ( logger . isDebugEnabled ( ) ) { logger . debug ( sql . toString ( ) ) ; } Connection conn = this . sqlgGraph . tx ( ) . getConnection ( ) ; try ( Statement stmt = conn . createStatement ( ) ) { stmt . execute ( sql . toString ( ) ) ; } catch ( SQLException e ) { logger . error ( "schema deletion failed " + this . sqlgGraph . toString ( ) , e ) ; throw new RuntimeException ( e ) ; } }
delete schema in DB