Package org.lealone.result

Examples of org.lealone.result.SubqueryResult


    public boolean isRedoLogBinaryEnabled() {
        return redoLogBinary;
    }

    public SubqueryResult createSubqueryResult(Query query, int maxrows) {
        return new SubqueryResult(query, maxrows);
    }
View Full Code Here


        this.compareType = compareType;
    }

    public Value getValue(Session session) {
        query.setSession(session);
        SubqueryResult rows = session.createSubqueryResult(query, 0); //query.query(0);
        session.addTemporaryResult(rows);
        Value l = left.getValue(session);
        if (rows.getRowCount() == 0) {
            return ValueBoolean.get(all);
        } else if (l == ValueNull.INSTANCE) {
            return l;
        }
        if (!session.getDatabase().getSettings().optimizeInSelect) {
            return getValueSlow(rows, l);
        }
        if (all || (compareType != Comparison.EQUAL && compareType != Comparison.EQUAL_NULL_SAFE)) {
            return getValueSlow(rows, l);
        }
        int dataType = rows.getColumnType(0);
        if (dataType == Value.NULL) {
            return ValueBoolean.get(false);
        }
        l = l.convertTo(dataType);
        if (rows.containsDistinct(new Value[] { l })) {
            return ValueBoolean.get(true);
        }
        if (rows.containsDistinct(new Value[] { ValueNull.INSTANCE })) {
            return ValueNull.INSTANCE;
        }
        return ValueBoolean.get(false);
    }
View Full Code Here

TOP

Related Classes of org.lealone.result.SubqueryResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.