Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TokenCopy is COPY TokenCopy lex.TokenType = 250 // TURELLA // TokenCIamRole is "iam_role" for authorization TokenCIamRole lex.TokenType = 350 // iam_role // TURELLA // TokenCDelimiter is "delimiter" TokenCDelimiter lex.TokenType = 351 // delimiter // TURELLA // TokenCEscape is "escape" TokenCEscape lex.TokenType = 352 // escape // TURELLA // TokenCManifest is "manifest" TokenCManifest lex.TokenType = 353 // manifest // TURELLA // TokenCQuoteAs is "quote-as" TokenCQuoteAs lex.TokenType = 354 // quote-as // TURELLA // TokenCExplicitIds is "explicit_ids" TokenCExplicitIds lex.TokenType = 355 // explicit_ids // TURELLA // TokenCRemovequotes is "removequotes" TokenCRemovequotes lex.TokenType = 356 // removequotes // TURELLA // TokenCEmptyasnull is "emptyasnull" TokenCEmptyasnull lex.TokenType = 357 // emptyasnull // TURELLA // TokenCBlanksasnull is "blanksasnull" TokenCBlanksasnull lex.TokenType = 358 // blanksasnull // TURELLA // TokenCMaxerror is "maxerror" TokenCMaxerror lex.TokenType = 359 // maxerror // TURELLA // TokenCTimeformat is "timeformat" TokenCTimeformat lex.TokenType = 360 // timeformat // TURELLA // TokenCFormatAs is "format-as" TokenCFormatAs lex.TokenType = 361 // format-as // TURELLA // TokenCFormatParquet is "parquet" TokenCFormatParquet lex.TokenType = 370 // parquet // TURELLA // TokenCFormatAvro is "avro" TokenCFormatAvro lex.TokenType = 371 // avro // TURELLA // TokenCGzip is "gzip" TokenCGzip lex.TokenType = 372 // gzip // TURELLA // TokenCFixedwidth is "fixedwidth" TokenCFixedwidth lex.TokenType = 373 // fixedwidth // TURELLA // TokenCCsv is "csv" TokenCCsv lex.TokenType = 374 // csv // TURELLA // TokenCJson is "JSON" TokenCJson lex.TokenType = 375 // JSON // TURELLA // TokenCLzop is "lzop" TokenCLzop lex.TokenType = 376 // lzop // TURELLA // TokenCReadratio is "readratio" TokenCReadratio lex.TokenType = 377 // readratio // TURELLA // TokenCEncripted is "encripted" TokenCEncripted lex.TokenType = 378 // encripted // TURELLA // TokenCRegion is "region" TokenCRegion lex.TokenType = 379 // region // TURELLA // TokenCSSH is "ssh" TokenCSSH lex.TokenType = 380 // ssh // TURELLA // RedshiftDialect is a dialect to parse the COPY FROM command RedshiftDialect *lex.Dialect = &lex.Dialect{ Statements: []*lex.Clause{ {Token: TokenCopy, Clauses: RedshiftCopy}, }, IdentityQuoting: lex.IdentityQuoting, } // RedshiftCopy copy statement RedshiftCopy = []*lex.Clause{ {Token: TokenCopy, Lexer: lex.LexIdentifierOfType(lex.TokenTable)}, {Token: lex.TokenLeftParenthesis, Lexer: lex.LexColumnNames, Optional: true}, {Token: lex.TokenFrom, Lexer: lex.LexTableReferences, Clauses: sourceClauses, Name: "copyFrom.source"}, {Token: TokenCRemovequotes, Lexer: lex.LexEmpty, Optional: true}, {Token: TokenCEmptyasnull, Lexer: lex.LexEmpty, Optional: true}, {Token: TokenCBlanksasnull, Lexer: lex.LexEmpty, Optional: true}, {Token: TokenCMaxerror, Lexer: lex.LexValue, Optional: true}, {Token: TokenCGzip, Lexer: lex.LexEmpty, Optional: true}, {Token: TokenCEscape, Lexer: lex.LexEmpty, Optional: true}, {Token: TokenCDelimiter, Lexer: lex.LexValue, Optional: true, Clauses: delimiterClauses}, {Token: TokenCLzop, Lexer: lex.LexEmpty, Optional: true}, {Token: TokenCEscape, Lexer: lex.LexEmpty, Optional: true}, {Token: TokenCExplicitIds, Lexer: lex.LexEmpty, Optional: true}, {Token: TokenCJson, Lexer: lex.LexValue, Optional: true}, {Token: TokenCReadratio, Lexer: lex.LexValue, Optional: true}, {Token: TokenCTimeformat, Lexer: lex.LexValue, Optional: true}, {Token: TokenCFixedwidth, Lexer: lex.LexValue, Optional: true}, {Token: TokenCCsv, Lexer: lex.LexEmpty, Optional: true}, {Token: TokenCQuoteAs, Lexer: lex.LexEmpty, Optional: true, Clauses: quoteClauses}, {Token: TokenCFormatAs, Lexer: lex.LexEmpty, Optional: true, Clauses: formatClauses}, {Token: lex.TokenEofOrEos, Lexer: lex.LexEmpty}, } )
Functions ¶
func NewRedshiftLexer ¶
NewRedshiftLexer creates a new lexer for the input string using RedshiftDialect this is sql(ish) compatible parser.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.