Skip to content

Commit 8401d19

Browse files
committed
Merge branch 'zachmu/quote-identifiers' of github.com:dolthub/go-mysql-server into zachmu/quote-identifiers
2 parents ac3c932 + bd5e864 commit 8401d19

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sql/analyzer/resolve_column_defaults.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ func quoteIdentifiers(parser sql.Parser, wrap *expression.Wrapper) (sql.Expressi
388388

389389
newExpr, same, err := transform.Expr(newDefault.Expr, func(expr sql.Expression) (sql.Expression, transform.TreeIdentity, error) {
390390
if e, isGf := expr.(*expression.GetField); isGf {
391-
return e.WithQuotedNames(parser,true), transform.NewTree, nil
391+
return e.WithQuotedNames(parser, true), transform.NewTree, nil
392392
}
393393
return expr, transform.SameTree, nil
394394
})

sql/parser.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ type Parser interface {
4545
// the index of the start of the next query. If |query| represents a no-op statement, such as ";" or "-- comment",
4646
// then implementations must return Vitess' ErrEmpty error.
4747
ParseOneWithOptions(context.Context, string, ast.ParserOptions) (ast.Statement, int, error)
48-
// QuoteIdentifier returns the identifier given quoted according to this parser's dialect. This is used to
49-
// standardize identifiers that cannot be parsed without quoting, because they break the normal identifier naming
48+
// QuoteIdentifier returns the identifier given quoted according to this parser's dialect. This is used to
49+
// standardize identifiers that cannot be parsed without quoting, because they break the normal identifier naming
5050
// rules (such as containing spaces)
5151
QuoteIdentifier(identifier string) string
5252
}
@@ -107,4 +107,4 @@ func RemoveSpaceAndDelimiter(query string, d rune) string {
107107

108108
func (m *MysqlParser) QuoteIdentifier(identifier string) string {
109109
return fmt.Sprintf("`%s`", strings.ReplaceAll(identifier, "`", "``"))
110-
}
110+
}

0 commit comments

Comments
 (0)