public int deleteCascade ( TableIndex tableIndex ) throws SQLException { int count = 0 ; if ( tableIndex != null ) { // Delete Geometry Indices GeometryIndexDao geometryIndexDao = getGeometryIndexDao ( ) ; if ( geometryIndexDao . isTableExists ( ) ) { DeleteBuilder < GeometryIndex , GeometryIndexKey > db = geometryIndexDao . deleteBuilder ( ) ; db . where ( ) . eq ( GeometryIndex . COLUMN_TABLE_NAME , tableIndex . getTableName ( ) ) ; PreparedDelete < GeometryIndex > deleteQuery = db . prepare ( ) ; geometryIndexDao . delete ( deleteQuery ) ; } count = delete ( tableIndex ) ; } return count ; }
Delete the TableIndex cascading