Package ghidra.features.bsim.query.client.tables

# Class KeyValueTable

java.lang.Object
ghidra.features.bsim.query.client.tables.SQLComplexTable
ghidra.features.bsim.query.client.tables.KeyValueTable

public class KeyValueTable extends SQLComplexTable

- ## Field Summary

  ### Fields inherited from class ghidra.features.bsim.query.client.tables.SQLComplexTable

  `db, idColumnName, tableName`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `KeyValueTable()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `void`
  `create(Statement st)`
  Creates the db table.
  `void`
  `drop(Statement st)`
  Drops the current table.
  `String`
  `getValue(String key)`
  `long`
  `insert(Object... arguments)`
  Inserts a row(s) into the db.
  `void`
  `writeBasicInfo(DatabaseInformation info)`
  Inserts some properties from the `DatabaseInformation` object to the table.
  `void`
  `writeExecutableCategories(DatabaseInformation info)`
  `void`
  `writeFunctionTags(DatabaseInformation info)`

  ### Methods inherited from class ghidra.features.bsim.query.client.tables.SQLComplexTable

  `delete, setConnection`

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

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

- ## Constructor Details

  - ### KeyValueTable

    public KeyValueTable()

- ## Method Details

  - ### close

    public void close()
    Overrides:
      `close` in class `SQLComplexTable`

  - ### create

    public void create(Statement st) throws SQLException
    Description copied from class: `SQLComplexTable`
    Creates the db table.
    Specified by:
      `create` in class `SQLComplexTable`
    Parameters:
      `st` - the query statement
    Throws:
      `SQLException` - if there is a problem

  - ### drop

    public void drop(Statement st) throws SQLException
    Description copied from class: `SQLComplexTable`
    Drops the current table. NOTE: If explicitly created index tables exist they should be removed first or this method override.
    Overrides:
      `drop` in class `SQLComplexTable`
    Parameters:
      `st` - the query statement
    Throws:
      `SQLException` - if there is a problem with the execute update command

  - ### insert

    public long insert(Object... arguments) throws SQLException
    Description copied from class: `SQLComplexTable`
    Inserts a row(s) into the db. The arguments passed to this function are by definition not known, so they are left as a variable-length list of `Object` instances, to be interpreted by the implementer.
    Specified by:
      `insert` in class `SQLComplexTable`
    Parameters:
      `arguments` - any arguments required for the insert
    Returns:
      to be defined by the implementor
    Throws:
      `SQLException` - if there is a problem executing the insert command

  - ### writeBasicInfo

    public void writeBasicInfo(DatabaseInformation info) throws SQLException
    Inserts some properties from the `DatabaseInformation` object to the table.
    Parameters:
      `info` - the database information
    Throws:
      `SQLException` - if the database info cannot be stored in the table

  - ### writeExecutableCategories

    public void writeExecutableCategories(DatabaseInformation info) throws SQLException
    Parameters:
      `info` - the database information
    Throws:
      `SQLException` - if the table insert fails

  - ### writeFunctionTags

    public void writeFunctionTags(DatabaseInformation info) throws SQLException
    Parameters:
      `info` - the database information
    Throws:
      `SQLException` - if the table insert fails

  - ### getValue

    public String getValue(String key) throws SQLException
    Parameters:
      `key` - the key to get the value for
    Returns:
      the value associated with key or throw exception if key not present
    Throws:
      `SQLException` - if the sql statement cannot be parsed