print(", ");
IndexColumn idxColumn = index.getColumn(idx); Column      col       = table.findColumn(idxColumn.getName());  if (col == null) {  throw new DynaSqlException("Invalid column '" + idxColumn.getName() + "' on index " + index.getName() + " for table " + table.getName()); } if (idx > 0) { print(", "); } printIdentifier(getColumnName(col));
    protected void writeExternalIndexCreateStmt(Table table, Index index) throws IOException    {        if (index.getName() == null)        {            _log.warn("Cannot write unnamed index " + index);        }        else        {            print("CREATE");            if (index.isUnique())            {                print(" UNIQUE");            }            print(" INDEX ");            printIdentifier(getIndexName(index));            print(" ON ");            printIdentifier(getTableName(table));            print(" (");            for (int idx = 0; idx < index.getColumnCount(); idx++)            {                IndexColumn idxColumn = index.getColumn(idx);                Column      col       = table.findColumn(idxColumn.getName());                if (col == null)                {                    //would get null pointer on next line anyway, so throw exception                    throw new DynaSqlException("Invalid column '" + idxColumn.getName() + "' on index " + index.getName() + " for table " + table.getName());                }                if (idx > 0)                {                    print(", ");                }                printIdentifier(getColumnName(col));            }            print(")");            printEndOfStatement();        }    }