Class DBNew

java.lang.Object
org.basex.query.up.primitives.DBNew

public final class DBNew extends Object
Contains helper methods for adding documents.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Field Details

    • inputs

      public final List<NewInput> inputs
      Inputs to be added.
  • Constructor Details

    • DBNew

      public DBNew(QueryContext qc, DBOptions options, InputInfo info, NewInput... list)
      Constructor.
      Parameters:
      qc - query context
      options - database options
      info - input info
      list - list of inputs
  • Method Details

    • merge

      public void merge(DBNew add)
      Merges updates.
      Parameters:
      add - inputs to be added
    • prepare

      public DataClip prepare(String name, boolean create) throws QueryException
      Inserts all documents to be added to a temporary database.
      Parameters:
      name - name of database
      create - create new database
      Returns:
      resulting data clip (can be null)
      Throws:
      QueryException - query exception
    • addTo

      public void addTo(Data target) throws QueryException
      Adds the contents of the temporary database to the target database.
      Parameters:
      target - database instance
      Throws:
      QueryException - exception