Class Execute

Direct Known Subclasses:
Run

public class Execute extends Command
Evaluates the 'execute' command and runs a command script. This command can be used to run multiple commands as a single transaction.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • Execute

      public Execute(String input)
      Constructor for string input.
      Parameters:
      input - user input
    • Execute

      public Execute(Command... commands)
      Constructor for command input.
      Parameters:
      commands - commands to execute
  • Method Details

    • newData

      public final boolean newData(Context ctx)
      Description copied from class: Command
      Closes an open data reference and returns true if this command will change the Context.data() reference. This method is only required by the GUI.
      Overrides:
      newData in class Command
      Parameters:
      ctx - database context
      Returns:
      result of check
    • addLocks

      public final void addLocks()
      Description copied from class: Job
      Adds the strings (databases, special identifiers) for which locks need to be acquired.
      Overrides:
      addLocks in class Job
    • run

      protected boolean run()
      Description copied from class: Command
      Executes the command and serializes the result (internal call).
      Specified by:
      run in class Command
      Returns:
      success of operation
    • updating

      public final boolean updating(Context ctx)
      Description copied from class: Command
      Checks if the command performs updates/write operations.
      Overrides:
      updating in class Command
      Parameters:
      ctx - database context
      Returns:
      result of check
    • build

      public void build(CmdBuilder cb)
      Description copied from class: Command
      Builds a string representation from the command. This string must be correctly built, as commands are sent to the server as strings.
      Overrides:
      build in class Command
      Parameters:
      cb - command builder