Package com.complexible.stardog.virtual.api

# Class JdbcOptions

java.lang.Object
com.complexible.stardog.virtual.api.JdbcOptions

public class JdbcOptions extends Object
Options used by JDBC data sources. Included in `api` package for visibility by `source_metadata` CLI command.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `JdbcOptions.RowCountEstimateStrategy`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `JDBC_DRIVER`
  `static final String`
  `JDBC_PASSTHROUGH`
  `static final String`
  `JDBC_PASSTHROUGH_OAUTH`
  `static final String`
  `JDBC_PASSTHROUGH_SCOPE`
  `static final String`
  `JDBC_PASSWORD`
  `static final String`
  `JDBC_ROW_COUNT_ESTIMATE_STRATEGY`
  Determines what methods for determining a table's row count will be used and in what fall-back order.
  `static final String`
  `JDBC_STATEMENT_FETCH_SIZE`
  `static final String`
  `JDBC_TABLE_SAMPLE_PERCENTAGE`
  In cases where a brute-force `SELECT COUNT(*)` is used to determine a table's row count (see `JDBC_ROW_COUNT_ESTIMATE_STRATEGY`, and the dialect supports the SQL `TABLESAMPLE` keyword, this option determines the percentage of rows to include in the sample.
  `static final String`
  `JDBC_URL`
  `static final String`
  `JDBC_USERNAME`
  `static final String`
  `PASSTHROUGH_ACCESS_TOKEN`
  `static final String`
  `PASSTHROUGH_PREFIX`
  `static final String`
  `SQL_CATALOGS`
  `static final String`
  `SQL_DEFAULT_CATALOG`
  `static final String`
  `SQL_DEFAULT_SCHEMA`
  `static final String`
  `SQL_DIALECT`
  `static final String`
  `SQL_SCHEMAS`
  `static final String`
  `SQL_SKIP_VALIDATION`
  `static final String`
  `SQL_WILDCARD`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JdbcOptions()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Properties`
  `getDriverProperties(Map<?,?> dsOptions)`
  Creates a new `Properties` instance consisting of all the driver properties found in the supplied DS options file (with the `ext.` prefixes removed).
  `static boolean`
  `isSkipValidation(Properties options)`
  `static String`
  `passthroughOption(String optionName)`

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

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

- ## Field Details

  - ### JDBC_URL

    public static final String JDBC_URL
    See Also:
      - Constant Field Values

  - ### JDBC_USERNAME

    public static final String JDBC_USERNAME
    See Also:
      - Constant Field Values

  - ### JDBC_PASSWORD

    public static final String JDBC_PASSWORD
    See Also:
      - Constant Field Values

  - ### JDBC_DRIVER

    public static final String JDBC_DRIVER
    See Also:
      - Constant Field Values

  - ### JDBC_PASSTHROUGH

    public static final String JDBC_PASSTHROUGH
    See Also:
      - Constant Field Values

  - ### JDBC_PASSTHROUGH_SCOPE

    public static final String JDBC_PASSTHROUGH_SCOPE
    See Also:
      - Constant Field Values

  - ### JDBC_PASSTHROUGH_OAUTH

    public static final String JDBC_PASSTHROUGH_OAUTH
    See Also:
      - Constant Field Values

  - ### PASSTHROUGH_PREFIX

    public static final String PASSTHROUGH_PREFIX
    See Also:
      - Constant Field Values

  - ### PASSTHROUGH_ACCESS_TOKEN

    public static final String PASSTHROUGH_ACCESS_TOKEN
    See Also:
      - Constant Field Values

  - ### SQL_DIALECT

    public static final String SQL_DIALECT
    See Also:
      - Constant Field Values

  - ### SQL_DEFAULT_CATALOG

    public static final String SQL_DEFAULT_CATALOG
    See Also:
      - Constant Field Values

  - ### SQL_CATALOGS

    public static final String SQL_CATALOGS
    See Also:
      - Constant Field Values

  - ### SQL_DEFAULT_SCHEMA

    public static final String SQL_DEFAULT_SCHEMA
    See Also:
      - Constant Field Values

  - ### SQL_SCHEMAS

    public static final String SQL_SCHEMAS
    See Also:
      - Constant Field Values

  - ### SQL_WILDCARD

    public static final String SQL_WILDCARD
    See Also:
      - Constant Field Values

  - ### SQL_SKIP_VALIDATION

    public static final String SQL_SKIP_VALIDATION
    See Also:
      - Constant Field Values

  - ### JDBC_STATEMENT_FETCH_SIZE

    public static final String JDBC_STATEMENT_FETCH_SIZE
    See Also:
      - Constant Field Values

  - ### JDBC_ROW_COUNT_ESTIMATE_STRATEGY

    public static final String JDBC_ROW_COUNT_ESTIMATE_STRATEGY
    Determines what methods for determining a table's row count will be used and in what fall-back order. Each dialect has a method getting row count from database metadata, which is usually either looking at indexes or querying the system tables. This option controls whether a brute force `SELECT COUNT(*)` should be used.

    NOTE: The index/system-table method is considered a failure if it returns a row count estimate less than 2.

    Valid options are:

    - `JdbcOptions.RowCountEstimateStrategy.JDBC_GET_INDEX_INFO`: Do not use `SELECT COUNT(*)`
    - `JdbcOptions.RowCountEstimateStrategy.COUNT_FALLBACK`: Fallback to `SELECT COUNT(*)` if dialect's method fails
    - `JdbcOptions.RowCountEstimateStrategy.COUNT_FIRST`: Try `SELECT COUNT(*)` first
    See Also:
      - Constant Field Values

  - ### JDBC_TABLE_SAMPLE_PERCENTAGE

    public static final String JDBC_TABLE_SAMPLE_PERCENTAGE
    In cases where a brute-force `SELECT COUNT(*)` is used to determine a table's row count (see `JDBC_ROW_COUNT_ESTIMATE_STRATEGY`, and the dialect supports the SQL `TABLESAMPLE` keyword, this option determines the percentage of rows to include in the sample. Valid range is 0-100. 0 indicates to not use the `TABLESAMPLE` keyword. E.g. `SELECT COUNT(*) FROM table_name TABLESAMPLE SYSTEM (10 PERCENT)`
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### JdbcOptions

    public JdbcOptions()

- ## Method Details

  - ### getDriverProperties

    public static Properties getDriverProperties(Map<?,?> dsOptions)
    Creates a new `Properties` instance consisting of all the driver properties found in the supplied DS options file (with the `ext.` prefixes removed).
    Parameters:
      `dsOptions` - Data Source options including `ext.`-prefixed driver properties

  - ### isSkipValidation

    public static boolean isSkipValidation(Properties options)

  - ### passthroughOption

    public static String passthroughOption(String optionName)