Package com.clickhouse.jdbc.parser

# Class ClickHouseSqlStatement

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

public class ClickHouseSqlStatement extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`DEFAULT_DATABASE`
`static final String`
`DEFAULT_TABLE`
`static final String`
`KEYWORD_DATABASE`
`static final String`
`KEYWORD_EXISTS`
`static final String`
`KEYWORD_FORMAT`
`static final String`
`KEYWORD_REPLACE`
`static final String`
`KEYWORD_TABLE_COLUMNS_END`
`static final String`
`KEYWORD_TABLE_COLUMNS_START`
`static final String`
`KEYWORD_TOTALS`
`static final String`
`KEYWORD_VALUES`
`static final String`
`KEYWORD_VALUES_END`
`static final String`
`KEYWORD_VALUES_START`

## Constructor Summary

Constructors
Constructor
Description
`ClickHouseSqlStatement(String sql)`
`ClickHouseSqlStatement(String sql, StatementType stmtType)`
`ClickHouseSqlStatement(String sql, StatementType stmtType, String cluster, String database, String table, String input, String compressAlgorithm, String compressLevel, String format, String file, List<Integer> parameters, Map<String,Integer> positions, Map<String,String> settings, Set<String> tempTables)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`containsKeyword(String keyword)`
`boolean`
`equals(Object obj)`
`String`
`getCluster()`
`String`
`getCompressAlgorithm()`
`String`
`getCompressLevel()`
`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`
`getFile()`
`String`
`getFormat()`
`String`
`getInput()`
`LanguageType`
`getLanguageType()`
`OperationType`
`getOperationType()`
`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`
`hasCompressAlgorithm()`
`boolean`
`hasCompressLevel()`
`boolean`
`hasFile()`
`boolean`
`hasFormat()`
`int`
`hashCode()`
`boolean`
`hasInput()`
`boolean`
`hasSettings()`
`boolean`
`hasTempTable()`
`boolean`
`hasValues()`
`boolean`
`hasWithTotals()`
`boolean`
`isDDL()`
`boolean`
`isDML()`
`boolean`
`isIdemponent()`
`boolean`
`isMutation()`
`boolean`
`isQuery()`
`boolean`
`isRecognized()`
`boolean`
`isTCL()`
`String`
`toString()`

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

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

## Field Details

### 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 Details

### 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 compressAlgorithm, String compressLevel, String format, String file, List<Integer> parameters, Map<String,Integer> positions, Map<String,String> settings, Set<String> tempTables)

## Method Details

### getSQL

public String getSQL()

### isRecognized

public boolean isRecognized()

### isDDL

public boolean isDDL()

### isDML

public boolean isDML()

### isQuery

public boolean isQuery()

### isMutation

public boolean isMutation()

### isTCL

public boolean isTCL()

### 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()

### getCompressAlgorithm

public String getCompressAlgorithm()

### getCompressLevel

public String getCompressLevel()

### getFormat

public String getFormat()

### getFile

public String getFile()

### getContentBetweenKeywords

public String getContentBetweenKeywords(String startKeyword, String endKeyword)

### getContentBetweenKeywords

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

### containsKeyword

public boolean containsKeyword(String keyword)

### hasCompressAlgorithm

public boolean hasCompressAlgorithm()

### hasCompressLevel

public boolean hasCompressLevel()

### hasFormat

public boolean hasFormat()

### hasInput

public boolean hasInput()

### hasFile

public boolean hasFile()

### 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`