Package com.clickhouse.jdbc.parser

## Class ClickHouseSqlStatement

- java.lang.Object
- - com.clickhouse.jdbc.parser.ClickHouseSqlStatement

    public class ClickHouseSqlStatement
    extends Object

### Field Summary

Fields
`static String` `DEFAULT_DATABASE`
`static String` `DEFAULT_TABLE`
`static String` `KEYWORD_DATABASE`
`static String` `KEYWORD_EXISTS`
`static String` `KEYWORD_FORMAT`
`static String` `KEYWORD_REPLACE`
`static String` `KEYWORD_TABLE_COLUMNS_END`
`static String` `KEYWORD_TABLE_COLUMNS_START`
`static String` `KEYWORD_TOTALS`
`static String` `KEYWORD_VALUES`
`static String` `KEYWORD_VALUES_END`
`static String` `KEYWORD_VALUES_START`

### Constructor Summary

Constructors
`ClickHouseSqlStatement​(String sql)`
`ClickHouseSqlStatement​(String sql, StatementType stmtType)`
`ClickHouseSqlStatement​(String sql, StatementType stmtType, String cluster, String database, String table, String input, String format, String outfile, List<Integer> parameters, Map<String,​Integer> positions, Map<String,​String> settings, Set<String> tempTables)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `containsKeyword​(String keyword)`
`boolean` `equals​(Object obj)`
`String` `getCluster()`
`String` `getContentBetweenKeywords​(String startKeyword, String endKeyword)`
`String` `getContentBetweenKeywords​(String startKeyword, String endKeyword, int startOffset)`
`String` `getDatabase()`
`String` `getDatabaseOrDefault​(String database)`
`int` `getEndPosition​(String keyword)`
`String` `getFormat()`
`String` `getInput()`
`LanguageType` `getLanguageType()`
`OperationType` `getOperationType()`
`String` `getOutfile()`
`List<Integer>` `getParameters()`
`Map<String,​Integer>` `getPositions()`
`Map<String,​String>` `getSettings()`
`String` `getSQL()`
`int` `getStartPosition​(String keyword)`
`StatementType` `getStatementType()`
`String` `getTable()`
`Set<String>` `getTempTables()`
`boolean` `hasFormat()`
`int` `hashCode()`
`boolean` `hasInput()`
`boolean` `hasOutfile()`
`boolean` `hasSettings()`
`boolean` `hasTempTable()`
`boolean` `hasValues()`
`boolean` `hasWithTotals()`
`boolean` `isDDL()`
`boolean` `isDML()`
`boolean` `isIdemponent()`
`boolean` `isMutation()`
`boolean` `isQuery()`
`boolean` `isRecognized()`
`String` `toString()`

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

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

### Field Detail

#### DEFAULT_DATABASE

    public static final String DEFAULT_DATABASE

See Also:
  Constant Field Values

#### DEFAULT_TABLE

    public static final String DEFAULT_TABLE

See Also:
  Constant Field Values

#### KEYWORD_DATABASE

    public static final String KEYWORD_DATABASE

See Also:
  Constant Field Values

#### KEYWORD_EXISTS

    public static final String KEYWORD_EXISTS

See Also:
  Constant Field Values

#### KEYWORD_FORMAT

    public static final String KEYWORD_FORMAT

See Also:
  Constant Field Values

#### KEYWORD_REPLACE

    public static final String KEYWORD_REPLACE

See Also:
  Constant Field Values

#### KEYWORD_TOTALS

    public static final String KEYWORD_TOTALS

See Also:
  Constant Field Values

#### KEYWORD_VALUES

    public static final String KEYWORD_VALUES

See Also:
  Constant Field Values

#### KEYWORD_TABLE_COLUMNS_START

    public static final String KEYWORD_TABLE_COLUMNS_START

See Also:
  Constant Field Values

#### KEYWORD_TABLE_COLUMNS_END

    public static final String KEYWORD_TABLE_COLUMNS_END

See Also:
  Constant Field Values

#### KEYWORD_VALUES_START

    public static final String KEYWORD_VALUES_START

See Also:
  Constant Field Values

#### KEYWORD_VALUES_END

    public static final String KEYWORD_VALUES_END

See Also:
  Constant Field Values

### Constructor Detail

#### ClickHouseSqlStatement

    public ClickHouseSqlStatement​(String sql)

#### ClickHouseSqlStatement

    public ClickHouseSqlStatement​(String sql,
                                  StatementType stmtType)

#### ClickHouseSqlStatement

    public ClickHouseSqlStatement​(String sql,
                                  StatementType stmtType,
                                  String cluster,
                                  String database,
                                  String table,
                                  String input,
                                  String format,
                                  String outfile,
                                  List<Integer> parameters,
                                  Map<String,​Integer> positions,
                                  Map<String,​String> settings,
                                  Set<String> tempTables)

### Method Detail

#### getSQL

    public String getSQL()

#### isRecognized

    public boolean isRecognized()

#### isDDL

    public boolean isDDL()

#### isDML

    public boolean isDML()

#### isQuery

    public boolean isQuery()

#### isMutation

    public boolean isMutation()

#### isIdemponent

    public boolean isIdemponent()

#### getLanguageType

    public LanguageType getLanguageType()

#### getOperationType

    public OperationType getOperationType()

#### getStatementType

    public StatementType getStatementType()

#### getCluster

    public String getCluster()

#### getDatabase

    public String getDatabase()

#### getDatabaseOrDefault

    public String getDatabaseOrDefault​(String database)

#### getTable

    public String getTable()

#### getInput

    public String getInput()

#### getFormat

    public String getFormat()

#### getOutfile

    public String getOutfile()

#### getContentBetweenKeywords

    public String getContentBetweenKeywords​(String startKeyword,
                                            String endKeyword)

#### getContentBetweenKeywords

    public String getContentBetweenKeywords​(String startKeyword,
                                            String endKeyword,
                                            int startOffset)

#### containsKeyword

    public boolean containsKeyword​(String keyword)

#### hasFormat

    public boolean hasFormat()

#### hasInput

    public boolean hasInput()

#### hasOutfile

    public boolean hasOutfile()

#### hasSettings

    public boolean hasSettings()

#### hasWithTotals

    public boolean hasWithTotals()

#### hasValues

    public boolean hasValues()

#### hasTempTable

    public boolean hasTempTable()

#### getParameters

    public List<Integer> getParameters()

#### getStartPosition

    public int getStartPosition​(String keyword)

#### getEndPosition

    public int getEndPosition​(String keyword)

#### getPositions

    public Map<String,​Integer> getPositions()

#### getSettings

    public Map<String,​String> getSettings()

#### getTempTables

    public Set<String> getTempTables()

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals​(Object obj)

Overrides:
  `equals` in class `Object`