Examples of DBSource


Examples of com.ziclix.python.sql.pipe.db.DBSource

     */
    protected PyObject bcp(String fromTable, String where, PyObject params, PyObject include, PyObject exclude, String toTable, PyObject bindings) {

        Pipe pipe = new Pipe();
        String _toTable = (toTable == null) ? fromTable : toTable;
        DBSource source = new DBSource(this.source, sourceDH, fromTable, where, include, params);
        DBSink sink = new DBSink(this.destination, destDH, _toTable, exclude, bindings, this.batchsize);

        return pipe.pipe(source, sink).__sub__(Py.newInteger(1));
    }
View Full Code Here

Examples of net.sf.kpex.builtins.DbSource

    register(new DbNew());
    register(new DbGetDefault());
    register(new DbRemove());
    register(new DbAdd());
    register(new DbCollect());
    register(new DbSource());

    // data structure builders/converters
    register(new Arg());
    register(new NewFun());
    register(new GetArity());
View Full Code Here

Examples of org.exist.source.DBSource

            } else {
                final XmldbURI pathUri = XmldbURI.create(xqueryresource);
                resource = broker.getXMLResource(pathUri, Lock.READ_LOCK);

                if(resource != null) {
                    source = new DBSource(broker, (BinaryDocument)resource, true);
                }
            }

            if(source != null) {
View Full Code Here

Examples of org.exist.source.DBSource

          try {
        final XmldbURI pathUri = XmldbURI.create(scriptURI);
       
        resource = broker.getXMLResource(pathUri, Lock.READ_LOCK);
        if (resource != null)
          {return new DBSource(broker, (BinaryDocument)resource, true);}
       
          } catch (final PermissionDeniedException e) {
            //XXX: log
        e.printStackTrace();
      } finally {
View Full Code Here

Examples of org.exist.source.DBSource

            resource = broker.getXMLResource(pathUri, Lock.READ_LOCK);

            if(resource != null) {
                LOG.info("Resource " + xqueryResourcePath + " exists.");
                source = new DBSource(broker, (BinaryDocument)resource, true);
            } else {
                LOG.info("Resource " + xqueryResourcePath + " does not exist.");
                LOG.info("pathURI " + pathUri );
                return true;
            }
View Full Code Here

Examples of org.exist.source.DBSource

                if(metadata.getMimeType().equals(XQUERY_MIME_TYPE)){
           
                    //compile the query
                    final XQuery xquery = broker.getXQueryService();
                    final XQueryContext context = xquery.newContext(AccessContext.REST);
                    final Source source = new DBSource(broker, (BinaryDocument)document, true);

                    //set the module load path for any module imports that are relative
                    context.setModuleLoadPath(XmldbURI.EMBEDDED_SERVER_URI_PREFIX + ((XmldbURI)source.getKey()).removeLastSegment());
                   
                    return broker.getXQueryService().compile(context, source);
                } else {
                    throw new RestXqServiceCompilationException("Invalid mimetype '" +  metadata.getMimeType() + "' for XQuery: "  + document.getURI().toString().toString());
                }
View Full Code Here

Examples of org.exist.source.DBSource

            if(!xquery.getPermissions().validate(user, Permission.READ | Permission.EXECUTE)) {
                throw new PermissionDeniedException("Insufficient privileges to access resource");
            }
           
            source = new DBSource(broker, xquery, true);
            compiled = compile(broker, source, parameters);
            queryResult = doQuery(broker, compiled, nodes, parameters);
            if(queryResult == null) {
                return ret;
            }
View Full Code Here

Examples of org.exist.source.DBSource

        //if setUid or setGid, become Effective User
        EffectiveSubject effectiveSubject = null;
        final Source src = expression.getContext().getSource();
        if(src instanceof DBSource) {
            final DBSource dbSrc = (DBSource)src;
            final Permission perm = dbSrc.getPermissions();

            if(perm.isSetUid()) {
                if(perm.isSetGid()) {
                    //setUid and SetGid
                    effectiveSubject = new EffectiveSubject(perm.getOwner(), perm.getGroup());
View Full Code Here

Examples of org.exist.source.DBSource

                        {throw new XPathException(this, "source for module " + location + " not found in database");}
                    if (sourceDoc.getResourceType() != DocumentImpl.BINARY_FILE ||
                            !"application/xquery".equals(sourceDoc.getMetadata().getMimeType()))
                        {throw new XPathException(this, "source for module " + location + " is not an XQuery or " +
                        "declares a wrong mime-type");}
                    querySource = new DBSource(context.getBroker(), (BinaryDocument) sourceDoc, true);
                } catch (final PermissionDeniedException e) {
                    throw new XPathException(this, "permission denied to read module source from " + location);
                } finally {
                    if(sourceDoc != null)
                        {sourceDoc.getUpdateLock().release(Lock.READ_LOCK);}
View Full Code Here

Examples of org.exist.source.DBSource

    private void executeXQuery(final DBBroker broker, final DocumentImpl resource,
            final HttpServletRequest request, final HttpServletResponse response,
            final Properties outputProperties, final String servletPath, final String pathInfo)
            throws XPathException, BadRequestException, PermissionDeniedException {

        final Source source = new DBSource(broker, (BinaryDocument) resource, true);
        final XQuery xquery = broker.getXQueryService();
        final XQueryPool pool = xquery.getXQueryPool();
        XQueryContext context;

        CompiledXQuery compiled = pool.borrowCompiledXQuery(broker, source);
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.