org.apache.ignite.configuration

## Class SqlConfiguration

- java.lang.Object
- - org.apache.ignite.configuration.SqlConfiguration

-     public class SqlConfiguration
      extends Object

  The configuration of the SQL query subsystem.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `DFLT_LONG_QRY_WARN_TIMEOUT` Default timeout after which long query warning will be printed.
    `static long` | `DFLT_QRY_TIMEOUT` Default query timeout.
    `static int` | `DFLT_SQL_QUERY_HISTORY_SIZE` Default SQL query history size.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SqlConfiguration()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getDefaultQueryTimeout()` Deprecated. Since 2.9. Please use distributed default query timeout.
    `long` | `getLongQueryWarningTimeout()` Gets timeout in milliseconds after which long query warning will be printed.
    `int` | `getSqlQueryHistorySize()` Number of SQL query history elements to keep in memory.
    `String[]` | `getSqlSchemas()` Gets SQL schemas to be created on node startup.
    `boolean` | `isValidationEnabled()` Is key & value validation enabled.
    `SqlConfiguration` | `setDefaultQueryTimeout(long dfltQryTimeout)` Deprecated. Since 2.9. Please use distributed default query timeout.
    `SqlConfiguration` | `setLongQueryWarningTimeout(long longQryWarnTimeout)` Sets timeout in milliseconds after which long query warning will be printed.
    `SqlConfiguration` | `setSqlQueryHistorySize(int size)` Sets number of SQL query history elements kept in memory.
    `SqlConfiguration` | `setSqlSchemas(String... sqlSchemas)` Sets SQL schemas to be created on node startup.
    `SqlConfiguration` | `setValidationEnabled(boolean validationEnabled)` Enable/disable key & value validation.
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### DFLT_SQL_QUERY_HISTORY_SIZE

          public static final int DFLT_SQL_QUERY_HISTORY_SIZE

      Default SQL query history size.
      See Also:
        Constant Field Values

    - #### DFLT_QRY_TIMEOUT

          public static final long DFLT_QRY_TIMEOUT

      Default query timeout.
      See Also:
        Constant Field Values

    - #### DFLT_LONG_QRY_WARN_TIMEOUT

          public static final long DFLT_LONG_QRY_WARN_TIMEOUT

      Default timeout after which long query warning will be printed.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SqlConfiguration

          public SqlConfiguration()

  - ### Method Detail

    - #### getDefaultQueryTimeout

          @Deprecated
          public long getDefaultQueryTimeout()

      Deprecated. Since 2.9. Please use distributed default query timeout.
      Defines the default query timeout. Defaults to `DFLT_QRY_TIMEOUT`. `0` means there is no timeout (this is a default value)
      Returns:
        Default query timeout.

    - #### setDefaultQueryTimeout

          @Deprecated
          public SqlConfiguration setDefaultQueryTimeout(long dfltQryTimeout)

      Deprecated. Since 2.9. Please use distributed default query timeout.
      Sets timeout in milliseconds for default query timeout. `0` means there is no timeout (this is a default value)
      Parameters:
        `dfltQryTimeout` - Timeout in milliseconds.
      Returns:
        `this` for chaining.

    - #### getSqlQueryHistorySize

          public int getSqlQueryHistorySize()

      Number of SQL query history elements to keep in memory. If not provided, then default value `DFLT_SQL_QUERY_HISTORY_SIZE` is used. If provided value is less or equals 0, then gathering SQL query history will be switched off.
      Returns:
        SQL query history size.

    - #### setSqlQueryHistorySize

          public SqlConfiguration setSqlQueryHistorySize(int size)

      Sets number of SQL query history elements kept in memory. If not explicitly set, then default value is `DFLT_SQL_QUERY_HISTORY_SIZE`.
      Parameters:
        `size` - Number of SQL query history elements kept in memory.
      Returns:
        `this` for chaining.

    - #### getSqlSchemas

          public String[] getSqlSchemas()

      Gets SQL schemas to be created on node startup.

      See `setSqlSchemas(String...)` for more information.

      Returns:
        SQL schemas to be created on node startup.

    - #### setSqlSchemas

          public SqlConfiguration setSqlSchemas(String... sqlSchemas)

      Sets SQL schemas to be created on node startup. Schemas are created on local node only and are not propagated to other cluster nodes. Created schemas cannot be dropped.

      By default schema names are case-insensitive, i.e. `my_schema` and `My_Schema` represents the same object. Use quotes to enforce case sensitivity (e.g. `"My_Schema"`).

      Property is ignored if `ignite-indexing` module is not in classpath.

      Parameters:
        `sqlSchemas` - SQL schemas to be created on node startup.
      Returns:
        `this` for chaining.

    - #### getLongQueryWarningTimeout

          public long getLongQueryWarningTimeout()

      Gets timeout in milliseconds after which long query warning will be printed.
      Returns:
        Timeout in milliseconds.

    - #### setLongQueryWarningTimeout

          public SqlConfiguration setLongQueryWarningTimeout(long longQryWarnTimeout)

      Sets timeout in milliseconds after which long query warning will be printed.
      Parameters:
        `longQryWarnTimeout` - Timeout in milliseconds.
      Returns:
        `this` for chaining.

    - #### isValidationEnabled

          public boolean isValidationEnabled()

      Is key & value validation enabled.
      Returns:
        `true` When key & value shall be validated against SQL schema.

    - #### setValidationEnabled

          public SqlConfiguration setValidationEnabled(boolean validationEnabled)

      Enable/disable key & value validation.
      Parameters:
        `validationEnabled` - `true` When key & value shall be validated against SQL schema. Default value is `false`.
      Returns:
        `this` for chaining.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022