Class Find


public final class Find extends AQuery
Evaluates the 'find' command and processes a simplified request as XQuery.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • Find

      public Find(String query)
      Default constructor.
      Parameters:
      query - simplified query
    • Find

      public Find(String query, boolean rt)
      Default constructor.
      Parameters:
      query - simplified query
      rt - start from root node
  • Method Details

    • 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 boolean updating(Context ctx)
      Description copied from class: Command
      Checks if the command performs updates/write operations.
      Overrides:
      updating in class AQuery
      Parameters:
      ctx - database context
      Returns:
      result of check
    • addLocks

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

      public static String find(String query, Context ctx, boolean root)
      Creates an XQuery representation for the specified query.
      Parameters:
      query - query
      ctx - database context
      root - start from root node
      Returns:
      query
    • findTable

      public static String findTable(StringList filter, TokenList cols, BoolList elem, byte[] name, boolean root)
      Creates an XQuery representation for the specified table query.
      Parameters:
      filter - filter terms
      cols - filter columns
      elem - element flag
      name - name of root element
      root - root flag
      Returns:
      query