Skip to content

Commit

Permalink
feat: Improve INSERT command for ClickHouse (#230)
Browse files Browse the repository at this point in the history
* feat: support multiple value arguments/functions

* feat: support settings declaration

* feat: support except command

* feat: support multidimensional array

* feat: support values listing without comma/support polygon data type

* feat: support format types

* test: add test case
  • Loading branch information
viladimiru authored Oct 28, 2024
1 parent 80f32b0 commit 0208d51
Show file tree
Hide file tree
Showing 10 changed files with 7,394 additions and 4,735 deletions.

Large diffs are not rendered by default.

262 changes: 190 additions & 72 deletions src/autocomplete/databases/clickhouse/generated/ClickHouseLexer.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -267,75 +267,193 @@ ALLOW=266
GRANTS=267
EXCEPT=268
REVOKE=269
JSON_FALSE=270
JSON_TRUE=271
IDENTIFIER=272
FLOATING_LITERAL=273
OCTAL_LITERAL=274
DECIMAL_LITERAL=275
HEXADECIMAL_LITERAL=276
STRING_LITERAL=277
ARROW=278
ASTERISK=279
BACKQUOTE=280
BACKSLASH=281
COLON=282
COMMA=283
CONCAT=284
DASH=285
DOT=286
EQ_DOUBLE=287
EQ_SINGLE=288
GE=289
GT=290
LBRACE=291
LBRACKET=292
LE=293
LPAREN=294
LT=295
NOT_EQ=296
PERCENT=297
PLUS=298
QUESTIONMARK=299
QUOTE_DOUBLE=300
QUOTE_SINGLE=301
RBRACE=302
RBRACKET=303
RPAREN=304
SEMICOLON=305
SLASH=306
UNDERSCORE=307
MULTI_LINE_COMMENT=308
SINGLE_LINE_COMMENT=309
WHITESPACE=310
'false'=270
'true'=271
'->'=278
'*'=279
'`'=280
'\\'=281
':'=282
','=283
'||'=284
'-'=285
'.'=286
'=='=287
'='=288
'>='=289
'>'=290
'{'=291
'['=292
'<='=293
'('=294
'<'=295
'%'=297
'+'=298
'?'=299
'"'=300
'\''=301
'}'=302
']'=303
')'=304
';'=305
'/'=306
'_'=307
FORMAT_TAB_SEPARATED=270
FORMAT_TAB_SEPARATED_RAW=271
FORMAT_TAB_SEPARATED_WITH_NAMES=272
FORMAT_TAB_SEPARATED_WITH_NAMES_AND_TYPES=273
FORMAT_TAB_SEPARATED_RAW_WITH_NAMES=274
FORMAT_TAB_SEPARATED_RAW_WITH_NAMES_AND_TYPES=275
FORMAT_TEMPLATE=276
FORMAT_TEMPLATE_IGNORE_SPACES=277
FORMAT_CSV=278
FORMAT_CSV_WITH_NAMES=279
FORMAT_CSV_WITH_NAMES_AND_TYPES=280
FORMAT_CUSTOM_SEPARATED=281
FORMAT_CUSTOM_SEPARATED_WITH_NAMES=282
FORMAT_CUSTOM_SEPARATED_WITH_NAMES_AND_TYPES=283
FORMAT_VALUES=284
FORMAT_JSON=285
FORMAT_JSON_AS_STRING=286
FORMAT_JSON_AS_OBJECT=287
FORMAT_JSON_STRINGS=288
FORMAT_JSON_COLUMNS=289
FORMAT_JSON_COLUMNS_WITH_METADATA=290
FORMAT_JSON_COMPACT=291
FORMAT_JSON_COMPACT_COLUMNS=292
FORMAT_JSON_EACH_ROW=293
FORMAT_JSON_STRINGS_EACH_ROW=294
FORMAT_JSON_COMPACT_EACH_ROW=295
FORMAT_JSON_COMPACT_EACH_ROW_WITH_NAMES=296
FORMAT_JSON_COMPACT_EACH_ROW_WITH_NAMES_AND_TYPES=297
FORMAT_JSON_COMPACT_STRINGS_EACH_ROW=298
FORMAT_JSON_COMPACT_STRINGS_EACH_ROW_WITH_NAMES=299
FORMAT_JSON_COMPACT_STRINGS_EACH_ROW_WITH_NAMES_AND_TYPES=300
FORMAT_JSON_OBJECT_EACH_ROW=301
FORMAT_BSON_EACH_ROW=302
FORMAT_TSKV=303
FORMAT_PROTOBUF=304
FORMAT_PROTOBUF_SINGLE=305
FORMAT_PROTOBUF_LIST=306
FORMAT_AVRO=307
FORMAT_AVRO_CONFLUENT=308
FORMAT_PARQUET=309
FORMAT_PARQUET_METADATA=310
FORMAT_ARROW=311
FORMAT_ARROW_STREAM=312
FORMAT_ORC=313
FORMAT_ONE=314
FORMAT_NPY=315
FORMAT_ROW_BINARY=316
FORMAT_ROW_BINARY_WITH_NAMES=317
FORMAT_ROW_BINARY_WITH_NAMES_AND_TYPES=318
FORMAT_ROW_BINARY_WITH_DEFAULTS=319
FORMAT_NATIVE=320
FORMAT_CAPN_PROTO=321
FORMAT_LINE_AS_STRING=322
FORMAT_REGEXP=323
FORMAT_RAW_BLOB=324
FORMAT_MSG_PACK=325
FORMAT_MYSQL_DUMP=326
FORMAT_DWARF=327
FORMAT_FORM=328
JSON_FALSE=329
JSON_TRUE=330
IDENTIFIER=331
FLOATING_LITERAL=332
OCTAL_LITERAL=333
DECIMAL_LITERAL=334
HEXADECIMAL_LITERAL=335
STRING_LITERAL=336
ARROW=337
ASTERISK=338
BACKQUOTE=339
BACKSLASH=340
COLON=341
COMMA=342
CONCAT=343
DASH=344
DOT=345
EQ_DOUBLE=346
EQ_SINGLE=347
GE=348
GT=349
LBRACE=350
LBRACKET=351
LE=352
LPAREN=353
LT=354
NOT_EQ=355
PERCENT=356
PLUS=357
QUESTIONMARK=358
QUOTE_DOUBLE=359
QUOTE_SINGLE=360
RBRACE=361
RBRACKET=362
RPAREN=363
SEMICOLON=364
SLASH=365
UNDERSCORE=366
MULTI_LINE_COMMENT=367
SINGLE_LINE_COMMENT=368
WHITESPACE=369
'TabSeparated'=270
'TabSeparatedRaw'=271
'TabSeparatedWithNames'=272
'TabSeparatedWithNamesAndTypes'=273
'TabSeparatedRawWithNames'=274
'TabSeparatedRawWithNamesAndTypes'=275
'Template'=276
'TemplateIgnoreSpaces'=277
'CSV'=278
'CSVWithNames'=279
'CSVWithNamesAndTypes'=280
'CustomSeparated'=281
'CustomSeparatedWithNames'=282
'CustomSeparatedWithNamesAndTypes'=283
'Values'=284
'JSON'=285
'JSONAsString'=286
'JSONAsObject'=287
'JSONStrings'=288
'JSONColumns'=289
'JSONColumnsWithMetadata'=290
'JSONCompact'=291
'JSONCompactColumns'=292
'JSONEachRow'=293
'JSONStringsEachRow'=294
'JSONCompactEachRow'=295
'JSONCompactEachRowWithNames'=296
'JSONCompactEachRowWithNamesAndTypes'=297
'JSONCompactStringsEachRow'=298
'JSONCompactStringsEachRowWithNames'=299
'JSONCompactStringsEachRowWithNamesAndTypes'=300
'JSONObjectEachRow'=301
'BSONEachRow'=302
'TSKV'=303
'Protobuf'=304
'ProtobufSingle'=305
'ProtobufList'=306
'Avro'=307
'AvroConfluent'=308
'Parquet'=309
'ParquetMetadata'=310
'Arrow'=311
'ArrowStream'=312
'ORC'=313
'One'=314
'Npy'=315
'RowBinary'=316
'RowBinaryWithNames'=317
'RowBinaryWithNamesAndTypes'=318
'RowBinaryWithDefaults'=319
'Native'=320
'CapnProto'=321
'LineAsString'=322
'Regexp'=323
'RawBLOB'=324
'MsgPack'=325
'MySQLDump'=326
'DWARF'=327
'Form'=328
'false'=329
'true'=330
'->'=337
'*'=338
'`'=339
'\\'=340
':'=341
','=342
'||'=343
'-'=344
'.'=345
'=='=346
'='=347
'>='=348
'>'=349
'{'=350
'['=351
'<='=352
'('=353
'<'=354
'%'=356
'+'=357
'?'=358
'"'=359
'\''=360
'}'=361
']'=362
')'=363
';'=364
'/'=365
'_'=366
Loading

0 comments on commit 0208d51

Please sign in to comment.