Package ghidra.program.database.util

# Class DatabaseTableUtils

java.lang.Object
ghidra.program.database.util.DatabaseTableUtils

public class DatabaseTableUtils extends Object
Collection of static functions for upgrading various database tables.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DatabaseTableUtils()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `updateAddressKey(Table table, AddressMap addrMap, Address fromAddr, Address toAddr, long length, TaskMonitor monitor)`
  Handles redoing a table whose key is address based when a ranges of addresses is moved.
  `static void`
  `updateAddressKey(Table table, AddressMap addrMap, Address fromAddr, Address endAddr, Address toAddr, TaskMonitor monitor)`
  Handles redoing a table whose key is address based when a ranges of addresses is moved.
  `static void`
  `updateIndexedAddressField(Table table, int addrCol, AddressMap addrMap, Address fromAddr, Address toAddr, long length, RecordFilter filter, TaskMonitor monitor)`
  Updates an indexed address field for when a block is moved.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DatabaseTableUtils

    public DatabaseTableUtils()

- ## Method Details

  - ### updateIndexedAddressField

    public static void updateIndexedAddressField(Table table, int addrCol, AddressMap addrMap, Address fromAddr, Address toAddr, long length, RecordFilter filter, TaskMonitor monitor) throws IOException, CancelledException
    Updates an indexed address field for when a block is moved.
    Parameters:
      `table` - the database table
      `addrCol` - the address column in the table
      `addrMap` - the address map
      `fromAddr` - the from address of the block being moved
      `toAddr` - the address to where the block is being moved.
      `length` - the size of the block being moved.
      `monitor` - the task monitor
    Throws:
      `IOException` - thrown if a database io error occurs.
      `CancelledException` - thrown if the user cancels the move operation.

  - ### updateAddressKey

    public static void updateAddressKey(Table table, AddressMap addrMap, Address fromAddr, Address toAddr, long length, TaskMonitor monitor) throws IOException, CancelledException
    Handles redoing a table whose key is address based when a ranges of addresses is moved.
    Parameters:
      `table` - the database table.
      `addrMap` - the address map.
      `fromAddr` - the from address of the block being moved.
      `toAddr` - the destination address of the block being moved.
      `length` - the size of the block being moved.
      `monitor` - the taskmonitor
    Throws:
      `IOException` - thrown if a database io error occurs.
      `CancelledException` - thrown if the user cancels the move operation.

  - ### updateAddressKey

    public static void updateAddressKey(Table table, AddressMap addrMap, Address fromAddr, Address endAddr, Address toAddr, TaskMonitor monitor) throws IOException, CancelledException
    Handles redoing a table whose key is address based when a ranges of addresses is moved.
    Parameters:
      `table` - the database table.
      `addrMap` - the address map.
      `fromAddr` - the first address of the block being moved.
      `endAddr` - the last address of the block being moved.
      `toAddr` - the destination address of the block being moved.
      `monitor` - the task monitor
    Throws:
      `IOException` - thrown if a database io error occurs.
      `CancelledException` - thrown if the user cancels the move operation.