Examples of borrowCompiledXQuery()


Examples of org.exist.storage.XQueryPool.borrowCompiledXQuery()

                //execute the xquery
                final XQuery xquery = broker.getXQueryService();
                xqPool = xquery.getXQueryPool();

                //try and get a pre-compiled query from the pool
                compiled = xqPool.borrowCompiledXQuery(broker, source);

                if(compiled == null) {
                    context = xquery.newContext(AccessContext.REST); //TODO should probably have its own AccessContext.SCHEDULER
                } else {
                    context = compiled.getContext();
View Full Code Here

Examples of org.exist.storage.XQueryPool.borrowCompiledXQuery()

  protected NodeList select(DocumentSet docs)
    throws PermissionDeniedException, EXistException, XPathException {
    final XQuery xquery = broker.getXQueryService();
    final XQueryPool pool = xquery.getXQueryPool();
    final Source source = new StringSource(selectStmt);
    CompiledXQuery compiled = pool.borrowCompiledXQuery(broker, source);
    XQueryContext context;
    if(compiled == null)
        {context = xquery.newContext(getAccessContext());}
    else
        {context = compiled.getContext();}
View Full Code Here

Examples of org.exist.storage.XQueryPool.borrowCompiledXQuery()

      EXistException, XPathException, TriggerException {
    LOG.debug("Processing xupdate:if ...");
    final XQuery xquery = broker.getXQueryService();
    final XQueryPool pool = xquery.getXQueryPool();
    final Source source = new StringSource(selectStmt);
    CompiledXQuery compiled = pool.borrowCompiledXQuery(broker, source);
    XQueryContext context;
    if(compiled == null)
        {context = xquery.newContext(getAccessContext());}
    else
        {context = compiled.getContext();}
View Full Code Here

Examples of org.exist.storage.XQueryPool.borrowCompiledXQuery()

        XmldbURI collectionPath = docPath.removeLastSegment();
        XmldbURI path = VersioningTrigger.VERSIONS_COLLECTION.append(collectionPath);
        XQuery xquery = broker.getXQueryService();
        XQueryPool pool = xquery.getXQueryPool();
        XQueryContext context;
        CompiledXQuery compiled = pool.borrowCompiledXQuery(broker, GET_CURRENT_REV_SOURCE);
        if(compiled == null)
                context = xquery.newContext(AccessContext.VALIDATION_INTERNAL);
            else
                context = compiled.getContext();
        context.declareVariable("collection", path.toString());
View Full Code Here

Examples of org.exist.storage.XQueryPool.borrowCompiledXQuery()

        XmldbURI collectionPath = docPath.removeLastSegment();
        XmldbURI path = VersioningTrigger.VERSIONS_COLLECTION.append(collectionPath);
        XQuery xquery = broker.getXQueryService();
        XQueryPool pool = xquery.getXQueryPool();
        XQueryContext context;
        CompiledXQuery compiled = pool.borrowCompiledXQuery(broker, GET_CONFLICTING_REV_SOURCE);
        if(compiled == null)
            context = xquery.newContext(AccessContext.VALIDATION_INTERNAL);
        else
            context = compiled.getContext();
        context.declareVariable("collection", path.toString());
View Full Code Here

Examples of org.exist.storage.XQueryPool.borrowCompiledXQuery()

        XmldbURI collectionPath = docPath.removeLastSegment();
        XmldbURI path = VersioningTrigger.VERSIONS_COLLECTION.append(collectionPath);
        XQuery xquery = broker.getXQueryService();
        XQueryPool pool = xquery.getXQueryPool();
        XQueryContext context;
        CompiledXQuery compiled = pool.borrowCompiledXQuery(broker, GET_BASE_REV_FOR_KEY_SOURCE);
        if(compiled == null)
            context = xquery.newContext(AccessContext.VALIDATION_INTERNAL);
        else
            context = compiled.getContext();
        context.declareVariable("collection", path.toString());
View Full Code Here

Examples of org.exist.storage.XQueryPool.borrowCompiledXQuery()

     * @throws PermissionDeniedException
     */
    private CompiledXQuery compile(DBBroker broker, Source source, HashMap<String, Object> parameters) throws XPathException, IOException, PermissionDeniedException {
        final XQuery xquery = broker.getXQueryService();
        final XQueryPool pool = xquery.getXQueryPool();
        CompiledXQuery compiled = pool.borrowCompiledXQuery(broker, source);
        XQueryContext context;
        if(compiled == null)
            {context = xquery.newContext(AccessContext.XMLRPC);}
        else
            {context = compiled.getContext();}
View Full Code Here

Examples of org.exist.storage.XQueryPool.borrowCompiledXQuery()

        try {
            broker = factory.getBrokerPool().get(user);
            final Source source = new StringSource(query);
            final XQuery xquery = broker.getXQueryService();
            final XQueryPool pool = xquery.getXQueryPool();
            CompiledXQuery compiled = pool.borrowCompiledXQuery(broker, source);
            if(compiled == null)
                {compiled = compile(broker, source, parameters);}
            final StringWriter writer = new StringWriter();
            compiled.dump(writer);
            return writer.toString();
View Full Code Here

Examples of org.exist.storage.XQueryPool.borrowCompiledXQuery()

        broker = pool.get(pool.getSecurityManager().getGuestSubject());
       
        if (checkQueryEngine) {
          final XQuery xquery = broker.getXQueryService();
          final XQueryPool xqPool = xquery.getXQueryPool();
          CompiledXQuery compiled = xqPool.borrowCompiledXQuery(broker, TEST_XQUERY);
          if (compiled == null) {
            final XQueryContext context = xquery.newContext(AccessContext.TEST);
            compiled = xquery.compile(context, TEST_XQUERY);
          }
        try {
View Full Code Here

Examples of org.exist.storage.XQueryPool.borrowCompiledXQuery()

        final XQuery xquery = broker.getXQueryService();
    final XQueryPool pool = xquery.getXQueryPool();
        XQueryContext context;
       
        //try and get pre-compiled XQuery from the cache
        CompiledXQuery compiled = pool.borrowCompiledXQuery(broker, xqSource);
       
        //Create the context and set a header to indicate cache status
        if(compiled == null)
        {
          context = xquery.newContext(AccessContext.REST);
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.