Class ServerQuery

java.lang.Object
org.basex.core.jobs.Job
org.basex.server.ServerQuery

public final class ServerQuery extends Job
Server query representation, generated by LocalQuery and ClientQuery.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • ServerQuery

      public ServerQuery(String query, Context ctx)
      Constructor.
      Parameters:
      query - query string
      ctx - database context
  • Method Details

    • bind

      public void bind(String name, Object value, String type) throws IOException
      Binds a global variable.
      Parameters:
      name - name of variable
      value - value to be bound
      type - type
      Throws:
      IOException - query exception
    • context

      public void context(Object value, String type) throws IOException
      Binds the context value.
      Parameters:
      value - value to be bound
      type - type
      Throws:
      IOException - query exception
    • info

      public String info()
      Returns the query info.
      Returns:
      query info
    • parameters

      public String parameters() throws IOException
      Returns the serialization parameters.
      Returns:
      serialization parameters
      Throws:
      IOException - I/O Exception
    • updating

      public boolean updating() throws IOException
      Returns true if the query may perform updates.
      Returns:
      updating flag
      Throws:
      IOException - I/O Exception
    • execute

      public void execute(OutputStream out, boolean iterative, boolean encode, boolean full) throws IOException
      Executes the query.
      Parameters:
      out - output stream
      iterative - iterative evaluation
      encode - encode results (client/server communication, iterative processing)
      full - return full type information (only applicable to iterative evaluation)
      Throws:
      IOException - I/O Exception