Search in sources :

Example 1 with DebugQueryColumn

use of lucee.runtime.type.DebugQueryColumn in project Lucee by lucee.

the class DebugEntryTemplatePartComparator method getUsage.

private static Struct getUsage(QueryEntry qe) throws PageException {
    Query qry = qe.getQry();
    QueryColumn c;
    DebugQueryColumn dqc;
    outer: if (qry != null) {
        Struct usage = null;
        Collection.Key[] columnNames = qry.getColumnNames();
        Collection.Key columnName;
        for (int i = 0; i < columnNames.length; i++) {
            columnName = columnNames[i];
            c = qry.getColumn(columnName);
            if (!(c instanceof DebugQueryColumn))
                break outer;
            dqc = (DebugQueryColumn) c;
            if (usage == null)
                usage = new StructImpl();
            usage.setEL(columnName, Caster.toBoolean(dqc.isUsed()));
        }
        return usage;
    }
    return null;
}
Also used : DebugQueryColumn(lucee.runtime.type.DebugQueryColumn) StructImpl(lucee.runtime.type.StructImpl) Query(lucee.runtime.type.Query) QueryColumn(lucee.runtime.type.QueryColumn) DebugQueryColumn(lucee.runtime.type.DebugQueryColumn) Collection(lucee.runtime.type.Collection) Key(lucee.runtime.type.Collection.Key) Struct(lucee.runtime.type.Struct)

Aggregations

Collection (lucee.runtime.type.Collection)1 Key (lucee.runtime.type.Collection.Key)1 DebugQueryColumn (lucee.runtime.type.DebugQueryColumn)1 Query (lucee.runtime.type.Query)1 QueryColumn (lucee.runtime.type.QueryColumn)1 Struct (lucee.runtime.type.Struct)1 StructImpl (lucee.runtime.type.StructImpl)1