All Implemented Interfaces:
Comparable<DBUpdate>

public final class Put extends DBUpdate
Fn:put operation primitive.
Author:
BaseX Team 2005-21, BSD License, Lukas Kircher
  • Field Details

    • id

      public final int id
      Node id of the target node. Target nodes are identified via their ID, as structural changes (delete/insert) during the snapshot lead to PRE value shifts on disk. In addition, deleted/replaced nodes will not be serialized by fn:put as the identity of these nodes is gone - which is easier to track operating on IDs.
  • Constructor Details

    • Put

      public Put(int id, Data data, String path, SerializerOptions sopts, InputInfo info)
      Constructor.
      Parameters:
      id - target node id
      data - target data reference
      path - target path
      sopts - serializer options
      info - input info
  • Method Details

    • prepare

      public void prepare()
      Description copied from class: DBUpdate
      Prepares this operation.
      Specified by:
      prepare in class DBUpdate
    • apply

      public void apply() throws QueryException
      Description copied from class: DBUpdate
      Applies this operation.
      Specified by:
      apply in class DBUpdate
      Throws:
      QueryException - exception
    • merge

      public void merge(Update update)
      Description copied from class: Update
      Merges two update operations pointing to the same target.
      Specified by:
      merge in class Update
      Parameters:
      update - operation to merge with
    • size

      public int size()
      Description copied from class: Update
      Returns the number of update operations.
      Specified by:
      size in class Update
      Returns:
      number of updates
    • toString

      public String toString()
      Overrides:
      toString in class Object