File tree Expand file tree Collapse file tree 5 files changed +13
-5
lines changed
Baselines90_LoginStatementTests Expand file tree Collapse file tree 5 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ func (s *AlterLoginOptionsStatement) statement() {}
5454
5555// DropLoginStatement represents DROP LOGIN name
5656type DropLoginStatement struct {
57- Name * Identifier `json:"Name,omitempty"`
57+ Name * Identifier `json:"Name,omitempty"`
58+ IsIfExists bool `json:"IsIfExists"`
5859}
5960
6061func (s * DropLoginStatement ) node () {}
Original file line number Diff line number Diff line change @@ -15698,7 +15698,8 @@ func alterLoginOptionsStatementToJSON(s *ast.AlterLoginOptionsStatement) jsonNod
1569815698
1569915699func dropLoginStatementToJSON (s * ast.DropLoginStatement ) jsonNode {
1570015700 node := jsonNode {
15701- "$type" : "DropLoginStatement" ,
15701+ "$type" : "DropLoginStatement" ,
15702+ "IsIfExists" : s .IsIfExists ,
1570215703 }
1570315704 if s .Name != nil {
1570415705 node ["Name" ] = identifierToJSON (s .Name )
Original file line number Diff line number Diff line change @@ -6005,13 +6005,19 @@ func (p *Parser) parseAlterLoginOptions(name *ast.Identifier) (*ast.AlterLoginOp
60056005 // Parse password value
60066006 if p .curTok .Type == TokenString || p .curTok .Type == TokenNationalString {
60076007 val := p .curTok .Literal
6008+ isNational := p .curTok .Type == TokenNationalString
6009+ // Strip N prefix for national strings
6010+ if isNational && len (val ) > 0 && (val [0 ] == 'N' || val [0 ] == 'n' ) {
6011+ val = val [1 :]
6012+ }
6013+ // Strip surrounding quotes
60086014 if len (val ) >= 2 && val [0 ] == '\'' && val [len (val )- 1 ] == '\'' {
60096015 val = val [1 : len (val )- 1 ]
60106016 }
60116017 opt .Password = & ast.StringLiteral {
60126018 LiteralType : "String" ,
60136019 Value : val ,
6014- IsNational : p . curTok . Type == TokenNationalString ,
6020+ IsNational : isNational ,
60156021 IsLargeObject : false ,
60166022 }
60176023 p .nextToken ()
Original file line number Diff line number Diff line change 1- {"todo" : true }
1+ {}
Original file line number Diff line number Diff line change 1- {"todo" : true }
1+ {}
You can’t perform that action at this time.
0 commit comments