org.apache.ignite.internal.processors.cache.query

## Class IgniteQueryErrorCode

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode

    public final class IgniteQueryErrorCode
    extends Object

Error codes for query operations.

### Field Summary

Fields
`static int` `CACHE_NOT_FOUND` Cache not found.
`static int` `CLUSTER_READ_ONLY_MODE_ENABLED` Attempt to INSERT, UPDATE or DELETE value on read-only cluster.
`static int` `COLUMN_ALREADY_EXISTS` Required column already exists.
`static int` `COLUMN_NOT_FOUND` Required column not found.
`static int` `CONCURRENT_UPDATE` Attempt to UPDATE or DELETE a key whose value has been updated concurrently by someone else.
`static int` `CONVERSION_FAILED` Conversion failure.
`static int` `DUPLICATE_KEY` Attempt to INSERT a key that is already in cache.
`static int` `ENTRY_PROCESSING` `EntryProcessor` has thrown an exception during `IgniteCache.invokeAll(java.util.Map<? extends K, ? extends javax.cache.processor.EntryProcessor<K, V, T>>, java.lang.Object...)`.
`static int` `FIELD_TYPE_MISMATCH` Field type mismatch. e.g.: cause is `ClassCastException`.
`static int` `INDEX_ALREADY_EXISTS` Index already exists.
`static int` `INDEX_NOT_FOUND` Index does not exist.
`static int` `KEY_SCALE_OUT_OF_RANGE` Attempt to INSERT, UPDATE or MERGE value which scale exceed maximum DECIMAL column scale.
`static int` `KEY_UPDATE` Analysis detected that the statement is trying to directly `UPDATE` key or its fields.
`static int` `MVCC_DISABLED` MVCC disabled.
`static int` `NULL_KEY` Attempt to INSERT or MERGE `null` key.
`static int` `NULL_TABLE_DESCRIPTOR` Required table does not have a descriptor set.
`static int` `NULL_VALUE` Attempt to INSERT or MERGE `null` value, or to to set `null` to a `NOT NULL` column.
`static int` `PARSING` General parsing error - for the cases when there's no more specific code available.
`static int` `QUERY_CANCELED` Query canceled.
`static int` `STMT_TYPE_MISMATCH` Statement type does not match that declared by JDBC driver.
`static int` `TABLE_ALREADY_EXISTS` Required table already exists.
`static int` `TABLE_DROP_FAILED` DROP TABLE failed.
`static int` `TABLE_NOT_FOUND` Required table not found.
`static int` `TOO_LONG_KEY` Attempt to INSERT, UPDATE or MERGE key that exceed maximum column length.
`static int` `TOO_LONG_VALUE` Attempt to INSERT, UPDATE or MERGE value that exceed maximum column length.
`static int` `TRANSACTION_COMPLETED` Transaction is already completed.
`static int` `TRANSACTION_EXISTS` Transaction is already open.
`static int` `TRANSACTION_SERIALIZATION_ERROR` Transaction serialization error.
`static int` `TRANSACTION_TYPE_MISMATCH` Transaction type mismatch (SQL/non SQL).
`static int` `UNEXPECTED_ELEMENT_TYPE` Code encountered SQL expression of some type that it did not expect in current analysis context.
`static int` `UNEXPECTED_OPERATION` Code encountered SQL statement of some type that it did not expect in current analysis context.
`static int` `UNKNOWN` Unknown error, or the one without specific code.
`static int` `UNSUPPORTED_OPERATION` Requested operation is not supported.
`static int` `VALUE_SCALE_OUT_OF_RANGE` Attempt to INSERT, UPDATE or MERGE value which scale exceed maximum DECIMAL column scale.

### Method Summary

All Methods Static Methods Concrete Methods
`static String` `codeToSqlState(int statusCode)` Map Ignite specific error code to standard SQL state.
`static SQLException` `createJdbcSqlException(String msg, int code)` Create a `SQLException` for given code and message with detected state.

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

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

### Field Detail

#### UNKNOWN

    public static final int UNKNOWN

Unknown error, or the one without specific code.

See Also:
  Constant Field Values

#### PARSING

    public static final int PARSING

General parsing error - for the cases when there's no more specific code available.

See Also:
  Constant Field Values

#### UNSUPPORTED_OPERATION

    public static final int UNSUPPORTED_OPERATION

Requested operation is not supported.

See Also:
  Constant Field Values

#### UNEXPECTED_OPERATION

    public static final int UNEXPECTED_OPERATION

Code encountered SQL statement of some type that it did not expect in current analysis context.

See Also:
  Constant Field Values

#### UNEXPECTED_ELEMENT_TYPE

    public static final int UNEXPECTED_ELEMENT_TYPE

Code encountered SQL expression of some type that it did not expect in current analysis context.

See Also:
  Constant Field Values

#### KEY_UPDATE

    public static final int KEY_UPDATE

Analysis detected that the statement is trying to directly `UPDATE` key or its fields.

See Also:
  Constant Field Values

#### TABLE_NOT_FOUND

    public static final int TABLE_NOT_FOUND

Required table not found.

See Also:
  Constant Field Values

#### NULL_TABLE_DESCRIPTOR

    public static final int NULL_TABLE_DESCRIPTOR

Required table does not have a descriptor set.

See Also:
  Constant Field Values

#### STMT_TYPE_MISMATCH

    public static final int STMT_TYPE_MISMATCH

Statement type does not match that declared by JDBC driver.

See Also:
  Constant Field Values

#### TABLE_DROP_FAILED

    public static final int TABLE_DROP_FAILED

DROP TABLE failed.

See Also:
  Constant Field Values

#### INDEX_ALREADY_EXISTS

    public static final int INDEX_ALREADY_EXISTS

Index already exists.

See Also:
  Constant Field Values

#### INDEX_NOT_FOUND

    public static final int INDEX_NOT_FOUND

Index does not exist.

See Also:
  Constant Field Values

#### TABLE_ALREADY_EXISTS

    public static final int TABLE_ALREADY_EXISTS

Required table already exists.

See Also:
  Constant Field Values

#### COLUMN_NOT_FOUND

    public static final int COLUMN_NOT_FOUND

Required column not found.

See Also:
  Constant Field Values

#### COLUMN_ALREADY_EXISTS

    public static final int COLUMN_ALREADY_EXISTS

Required column already exists.

See Also:
  Constant Field Values

#### CONVERSION_FAILED

    public static final int CONVERSION_FAILED

Conversion failure.

See Also:
  Constant Field Values

#### QUERY_CANCELED

    public static final int QUERY_CANCELED

Query canceled.

See Also:
  Constant Field Values

#### DUPLICATE_KEY

    public static final int DUPLICATE_KEY

Attempt to INSERT a key that is already in cache.

See Also:
  Constant Field Values

#### CONCURRENT_UPDATE

    public static final int CONCURRENT_UPDATE

Attempt to UPDATE or DELETE a key whose value has been updated concurrently by someone else.

See Also:
  Constant Field Values

#### NULL_KEY

    public static final int NULL_KEY

Attempt to INSERT or MERGE `null` key.

See Also:
  Constant Field Values

#### NULL_VALUE

    public static final int NULL_VALUE

Attempt to INSERT or MERGE `null` value, or to to set `null` to a `NOT NULL` column.

See Also:
  Constant Field Values

#### ENTRY_PROCESSING

    public static final int ENTRY_PROCESSING

`EntryProcessor` has thrown an exception during `IgniteCache.invokeAll(java.util.Map<? extends K, ? extends javax.cache.processor.EntryProcessor<K, V, T>>, java.lang.Object...)`.

See Also:
  Constant Field Values

#### CACHE_NOT_FOUND

    public static final int CACHE_NOT_FOUND

Cache not found.

See Also:
  Constant Field Values

#### TOO_LONG_KEY

    public static final int TOO_LONG_KEY

Attempt to INSERT, UPDATE or MERGE key that exceed maximum column length.

See Also:
  Constant Field Values

#### TOO_LONG_VALUE

    public static final int TOO_LONG_VALUE

Attempt to INSERT, UPDATE or MERGE value that exceed maximum column length.

See Also:
  Constant Field Values

#### VALUE_SCALE_OUT_OF_RANGE

    public static final int VALUE_SCALE_OUT_OF_RANGE

Attempt to INSERT, UPDATE or MERGE value which scale exceed maximum DECIMAL column scale.

See Also:
  Constant Field Values

#### KEY_SCALE_OUT_OF_RANGE

    public static final int KEY_SCALE_OUT_OF_RANGE

Attempt to INSERT, UPDATE or MERGE value which scale exceed maximum DECIMAL column scale.

See Also:
  Constant Field Values

#### CLUSTER_READ_ONLY_MODE_ENABLED

    public static final int CLUSTER_READ_ONLY_MODE_ENABLED

Attempt to INSERT, UPDATE or DELETE value on read-only cluster.

See Also:
  Constant Field Values

#### TRANSACTION_EXISTS

    public static final int TRANSACTION_EXISTS

Transaction is already open.

See Also:
  Constant Field Values

#### MVCC_DISABLED

    public static final int MVCC_DISABLED

MVCC disabled.

See Also:
  Constant Field Values

#### TRANSACTION_TYPE_MISMATCH

    public static final int TRANSACTION_TYPE_MISMATCH

Transaction type mismatch (SQL/non SQL).

See Also:
  Constant Field Values

#### TRANSACTION_COMPLETED

    public static final int TRANSACTION_COMPLETED

Transaction is already completed.

See Also:
  Constant Field Values

#### TRANSACTION_SERIALIZATION_ERROR

    public static final int TRANSACTION_SERIALIZATION_ERROR

Transaction serialization error.

See Also:
  Constant Field Values

#### FIELD_TYPE_MISMATCH

    public static final int FIELD_TYPE_MISMATCH

Field type mismatch. e.g.: cause is `ClassCastException`.

See Also:
  Constant Field Values

### Method Detail

#### createJdbcSqlException

    public static SQLException createJdbcSqlException(String msg,
                                                      int code)

Create a `SQLException` for given code and message with detected state.

Parameters:
  `msg` - Message.
  `code` - Ignite status code.
Returns:
  `SQLException` with given details.

#### codeToSqlState

    public static String codeToSqlState(int statusCode)

Map Ignite specific error code to standard SQL state.

Parameters:
  `statusCode` - Ignite specific error code.
Returns:
  SQL state string.
See Also:
  Wikipedia: SQLSTATE spec., `IgniteQueryErrorCode`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021