com.mysql.cj.util

## Enum SearchMode

- java.lang.Object
- - java.lang.Enum<SearchMode>
  - - com.mysql.cj.util.SearchMode

All Implemented Interfaces:
  Serializable, Comparable<SearchMode>

    public enum SearchMode
    extends Enum<SearchMode>

Search mode flags enumeration. Primarily used by `StringInspector`.

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`ALLOW_BACKSLASH_ESCAPE` Allow backslash escapes.
`SKIP_BETWEEN_MARKERS` Skip between markers (quoted text, quoted identifiers, text between parentheses).
`SKIP_BLOCK_COMMENTS` Skip between block comments ("/* text...
`SKIP_HINT_BLOCKS` Skip hint blocks ("/*+ text...
`SKIP_LINE_COMMENTS` Skip line comments ("-- text...", "# text...").
`SKIP_MYSQL_MARKERS` Skip MySQL specific markers ("/*![12345]" and "*\/") but not their contents.
`SKIP_WHITE_SPACE` Skip white space.
`VOID` Dummy search mode.

### Field Summary

Fields
`static Set<SearchMode>` `__BSE_COM_MYM_HNT_WS` Search mode: allow backslash escape, skip block comments, skip line comments, skip MySQL markers, skip hint blocks and skip white space.
`static Set<SearchMode>` `__BSE_MRK_COM_MYM_HNT_WS` Search mode: allow backslash escape, skip between markers, skip block comments, skip line comments, skip MySQL markers, skip hint blocks and skip white space.
`static Set<SearchMode>` `__BSE_MRK_WS` Search mode: allow backslash escape, skip between markers and skip white space.
`static Set<SearchMode>` `__COM_MYM_HNT_WS` Search mode: skip block comments, skip line comments, skip MySQL markers, skip hint blocks and skip white space.
`static Set<SearchMode>` `__FULL` Full search mode: allow backslash escape, skip between markers, skip block comments, skip line comments, skip MySQL markers, skip hint blocks and skip white space.
`static Set<SearchMode>` `__MRK_COM_MYM_HNT_WS` Search mode: skip between markers, skip block comments, skip line comments, skip MySQL markers, skip hint blocks and skip white space.
`static Set<SearchMode>` `__MRK_WS` Search mode: skip between markers and skip white space.
`static Set<SearchMode>` `__NONE` Empty search mode.

### Method Summary

All Methods Static Methods Concrete Methods
`static SearchMode` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static SearchMode[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### ALLOW_BACKSLASH_ESCAPE

    public static final SearchMode ALLOW_BACKSLASH_ESCAPE

Allow backslash escapes.

#### SKIP_BETWEEN_MARKERS

    public static final SearchMode SKIP_BETWEEN_MARKERS

Skip between markers (quoted text, quoted identifiers, text between parentheses).

#### SKIP_BLOCK_COMMENTS

    public static final SearchMode SKIP_BLOCK_COMMENTS

Skip between block comments ("/* text... *\/") but not between hint blocks.

#### SKIP_LINE_COMMENTS

    public static final SearchMode SKIP_LINE_COMMENTS

Skip line comments ("-- text...", "# text...").

#### SKIP_MYSQL_MARKERS

    public static final SearchMode SKIP_MYSQL_MARKERS

Skip MySQL specific markers ("/*![12345]" and "*\/") but not their contents.

#### SKIP_HINT_BLOCKS

    public static final SearchMode SKIP_HINT_BLOCKS

Skip hint blocks ("/*+ text... *\/").

#### SKIP_WHITE_SPACE

    public static final SearchMode SKIP_WHITE_SPACE

Skip white space.

#### VOID

    public static final SearchMode VOID

Dummy search mode. Does nothing.

### Field Detail

#### __FULL

    public static final Set<SearchMode> __FULL

Full search mode: allow backslash escape, skip between markers, skip block comments, skip line comments, skip MySQL markers, skip hint blocks and skip white space. This is technically equivalent to __BSE_MRK_COM_MYM_HNT_WS.

#### __BSE_MRK_COM_MYM_HNT_WS

    public static final Set<SearchMode> __BSE_MRK_COM_MYM_HNT_WS

Search mode: allow backslash escape, skip between markers, skip block comments, skip line comments, skip MySQL markers, skip hint blocks and skip white space.

#### __MRK_COM_MYM_HNT_WS

    public static final Set<SearchMode> __MRK_COM_MYM_HNT_WS

Search mode: skip between markers, skip block comments, skip line comments, skip MySQL markers, skip hint blocks and skip white space.

#### __BSE_COM_MYM_HNT_WS

    public static final Set<SearchMode> __BSE_COM_MYM_HNT_WS

Search mode: allow backslash escape, skip block comments, skip line comments, skip MySQL markers, skip hint blocks and skip white space.

#### __COM_MYM_HNT_WS

    public static final Set<SearchMode> __COM_MYM_HNT_WS

Search mode: skip block comments, skip line comments, skip MySQL markers, skip hint blocks and skip white space.

#### __BSE_MRK_WS

    public static final Set<SearchMode> __BSE_MRK_WS

Search mode: allow backslash escape, skip between markers and skip white space.

#### __MRK_WS

    public static final Set<SearchMode> __MRK_WS

Search mode: skip between markers and skip white space.

#### __NONE

    public static final Set<SearchMode> __NONE

Empty search mode. There must be at least one element so that the Set may be later duplicated if needed.

### Method Detail

#### values

    public static SearchMode[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (SearchMode c : SearchMode.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static SearchMode valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null

Copyright © 2016, 2023, Oracle and/or its affiliates.