Examples of PlanHints


Examples of org.jboss.dna.graph.query.plan.PlanHints

                         Problems problems,
                         Map<String, Object> variables ) {
        CheckArg.isNotNull(typeSystem, "typeSystem");
        CheckArg.isNotNull(schemata, "schemata");
        this.typeSystem = typeSystem;
        this.hints = hints != null ? hints : new PlanHints();
        this.schemata = schemata;
        this.problems = problems != null ? problems : new SimpleProblems();
        this.variables = variables != null ? Collections.<String, Object>unmodifiableMap(new HashMap<String, Object>(variables)) : Collections.<String, Object>emptyMap();
        assert this.typeSystem != null;
        assert this.hints != null;
View Full Code Here

Examples of org.jboss.dna.graph.query.plan.PlanHints

            QueryCommand command = parser.parseQuery(expression, typeSystem);
            if (command == null) {
                // The query is not well-formed and cannot be parsed ...
                throw new InvalidQueryException(JcrI18n.queryCannotBeParsedUsingLanguage.text(language, expression));
            }
            PlanHints hints = new PlanHints();
            hints.showPlan = true;
            // If using XPath, we need to add a few hints ...
            if (Query.XPATH.equals(language)) {
                hints.hasFullTextSearch = true; // requires 'jcr:score' to exist
            }
View Full Code Here

Examples of org.modeshape.jcr.query.plan.PlanHints

            if (command == null) {
                // The query is not well-formed and cannot be parsed ...
                throw new InvalidQueryException(JcrI18n.queryCannotBeParsedUsingLanguage.text(language, expression));
            }
            // Set up the hints ...
            PlanHints hints = new PlanHints();
            hints.showPlan = true;
            hints.hasFullTextSearch = true; // always include the score
            hints.validateColumnExistance = false; // see MODE-1055
            if (parser.getLanguage().equals(QueryLanguage.JCR_SQL2)) {
                hints.qualifyExpandedColumnNames = true;
View Full Code Here

Examples of org.modeshape.jcr.query.plan.PlanHints

        }
        // Produce the expression string ...
        String expression = Visitors.readable(command);
        try {
            // Parsing must be done now ...
            PlanHints hints = new PlanHints();
            hints.showPlan = true;
            hints.hasFullTextSearch = true; // always include the score
            hints.qualifyExpandedColumnNames = true; // always qualify expanded names with the selector name in JCR-SQL2
            return resultWith(expression, QueryLanguage.JCR_SQL2, command, hints, null);
        } catch (org.modeshape.jcr.query.parse.InvalidQueryException e) {
View Full Code Here

Examples of org.modeshape.jcr.query.plan.PlanHints

                                new Column(tableName, columnNames.get(1), columnNames.get(1)));
        resultColumns = new ScanningQueryEngine.ResultColumns(columns, columnTypes, true, null);
        when(graphResult.getColumns()).thenReturn(resultColumns);
        when(graphResult.getRows()).thenReturn(NodeSequence.emptySequence(1));

        PlanHints hints = new PlanHints();
        result = new XPathQueryResult(context, query, graphResult, hints.restartable, hints.rowsKeptInMemory);
    }
View Full Code Here

Examples of org.modeshape.jcr.query.plan.PlanHints

        CheckArg.isNotNull(bufferManager, "bufferManager");
        this.context = context;
        this.repositoryCache = repositoryCache;
        this.workspaceNames = workspaceNames;
        this.typeSystem = context.getValueFactories().getTypeSystem();
        this.hints = hints != null ? hints : new PlanHints();
        this.indexDefns = indexDefns;
        this.schemata = schemata;
        this.nodeTypes = nodeTypes;
        this.problems = problems != null ? problems : new SimpleProblems();
        this.variables = variables != null ? new HashMap<String, Object>(variables) : new HashMap<String, Object>();
View Full Code Here

Examples of org.modeshape.jcr.query.plan.PlanHints

    @Override
    public org.modeshape.jcr.api.query.QueryResult explain() throws RepositoryException {
        context.checkValid();

        // Set to only compute the plan and then create an executable query ...
        PlanHints hints = this.hints.clone();
        hints.planOnly = true;
        CancellableQuery planOnlyExecutable = context.createExecutableQuery(query, hints, variables);

        // otherwise, some other thread called execute, so we can use it and just wait for the results ...
        final QueryResults result = planOnlyExecutable.execute(); // may be cancelled
View Full Code Here

Examples of org.modeshape.jcr.query.plan.PlanHints

        SelectQuery query = select(source, constraint, orderings, columns, null, false);
        // Produce the statement, but use our ExecutionContext (primarily for namespaces and binary value usage) ...
        String statement = Visitors.readable(query, context.getExecutionContext());
        // Set up the hints ...
        PlanHints hints = new PlanHints();
        hints.showPlan = true;
        hints.hasFullTextSearch = true; // always include the score
        hints.qualifyExpandedColumnNames = true; // always qualify expanded names with the selector name in JCR-SQL2
        // We want to allow use of residual properties (not in the schemata) for criteria ...
        hints.validateColumnExistance = false;   // see MODE-1055
View Full Code Here

Examples of org.modeshape.jcr.query.plan.PlanHints

    @Override
    public SetQueryObjectModel createQuery( org.modeshape.jcr.api.query.qom.SetQuery command ) {
        SetQuery setQuery = CheckArg.getInstanceOf(command, SetQuery.class, "command");
        String statement = setQuery.toString();
        // Set up the hints ...
        PlanHints hints = new PlanHints();
        hints.showPlan = true;
        hints.hasFullTextSearch = true; // always include the score
        hints.qualifyExpandedColumnNames = true; // always qualify expanded names with the selector name in JCR-SQL2
        // We want to allow use of residual properties (not in the schemata) for criteria ...
        hints.validateColumnExistance = false; // see MODE-1055
View Full Code Here

Examples of org.modeshape.jcr.query.plan.PlanHints

    @Override
    public QueryObjectModel createQuery( org.modeshape.jcr.api.query.qom.SelectQuery command ) {
        SelectQuery selectQuery = CheckArg.getInstanceOf(command, SelectQuery.class, "command");
        String statement = selectQuery.toString();
        // Set up the hints ...
        PlanHints hints = new PlanHints();
        hints.showPlan = true;
        hints.hasFullTextSearch = true; // always include the score
        hints.qualifyExpandedColumnNames = true; // always qualify expanded names with the selector name in JCR-SQL2
        // We want to allow use of residual properties (not in the schemata) for criteria ...
        hints.validateColumnExistance = false// see MODE-1055
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.