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

# Class SQLStringTable

java.lang.Object
ghidra.features.bsim.query.client.tables.SQLStringTable

public class SQLStringTable extends Object

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `SQLStringTable.StringRecord`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SQLStringTable(String name, int maxloaded)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `void`
  `createTable()`
  Create this specific table in the database
  `String`
  `getString(long id)`
  Try to fetch string from our memory cache, or load it from database, or return empty string
  `long`
  `readStringId(String value)`
  Try to read the id of a specific string in the table
  `void`
  `setConnection(Connection db)`
  `long`
  `writeString(String val)`

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

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

- ## Constructor Details

  - ### SQLStringTable

    public SQLStringTable(String name, int maxloaded)

- ## Method Details

  - ### setConnection

    public void setConnection(Connection db)

  - ### close

    public void close()

  - ### createTable

    public void createTable() throws SQLException
    Create this specific table in the database
    Throws:
      `SQLException` - if the create statement fails

  - ### getString

    public String getString(long id) throws SQLException
    Try to fetch string from our memory cache, or load it from database, or return empty string
    Parameters:
      `id` - the row ID
    Returns:
      the string fetched from the table, or empty string if not found
    Throws:
      `SQLException` - if there is a problem parsing the table record(s)

  - ### writeString

    public long writeString(String val) throws SQLException
    Throws:
      `SQLException`

  - ### readStringId

    public long readStringId(String value) throws SQLException
    Try to read the id of a specific string in the table
    Parameters:
      `value` - is the string to try to find
    Returns:
      the id of the string or 0 if the string is not in the table
    Throws:
      `SQLException` - if the result set cannot be parsed