question: protected void writeExternalIndexCreateStmt ( Table table , IIndex index , StringBuilder ddl ) { if ( databaseInfo . isIndicesSupported ( ) ) { if ( index . getName ( ) == null ) { log . warn ( "Cannot write unnamed index " + index ) ; } else { ddl . append ( "CREATE" ) ; if ( index . isUnique ( ) ) { ddl . append ( " UNIQUE" ) ; } ddl . append ( " INDEX " ) ; printIdentifier ( getIndexName ( index ) , ddl ) ; ddl . append ( " ON " ) ; ddl . append ( getFullyQualifiedTableNameShorten ( table ) ) ; ddl . append ( " (" ) ; for ( int idx = 0 ; idx < index . getColumnCount ( ) ; idx ++ ) { IndexColumn idxColumn = index . getColumn ( idx ) ; if ( idx > 0 ) { ddl . append ( ", " ) ; } String name = shortenName ( idxColumn . getName ( ) , databaseInfo . getMaxColumnNameLength ( ) ) ; if ( name . startsWith ( "(" ) ) { ddl . append ( name ) ; } else { printIdentifier ( name , ddl ) ; } } ddl . append ( ")" ) ; printEndOfStatement ( ddl ) ; } } }
target:  Writes the given index of the table.