@@ -29,7 +29,7 @@ func identifier(id string) string {
29
29
return strings .ToLower (id )
30
30
}
31
31
32
- func NewIdentifer (t string ) * ast.String {
32
+ func NewIdentifier (t string ) * ast.String {
33
33
return & ast.String {Str : identifier (t )}
34
34
}
35
35
@@ -289,12 +289,12 @@ func (c *cc) convertCreateTableStmt(n *pcast.CreateTableStmt) ast.Node {
289
289
func (c * cc ) convertColumnNameExpr (n * pcast.ColumnNameExpr ) * ast.ColumnRef {
290
290
var items []ast.Node
291
291
if schema := n .Name .Schema .String (); schema != "" {
292
- items = append (items , NewIdentifer (schema ))
292
+ items = append (items , NewIdentifier (schema ))
293
293
}
294
294
if table := n .Name .Table .String (); table != "" {
295
- items = append (items , NewIdentifer (table ))
295
+ items = append (items , NewIdentifier (table ))
296
296
}
297
- items = append (items , NewIdentifer (n .Name .Name .String ()))
297
+ items = append (items , NewIdentifier (n .Name .Name .String ()))
298
298
return & ast.ColumnRef {
299
299
Fields : & ast.List {
300
300
Items : items ,
@@ -374,9 +374,9 @@ func (c *cc) convertFuncCallExpr(n *pcast.FuncCallExpr) ast.Node {
374
374
// TODO: Deprecate the usage of Funcname
375
375
items := []ast.Node {}
376
376
if schema != "" {
377
- items = append (items , NewIdentifer (schema ))
377
+ items = append (items , NewIdentifier (schema ))
378
378
}
379
- items = append (items , NewIdentifer (name ))
379
+ items = append (items , NewIdentifier (name ))
380
380
381
381
args := & ast.List {}
382
382
for _ , arg := range n .Args {
@@ -530,7 +530,7 @@ func (c *cc) convertCommonTableExpression(n *pcast.CommonTableExpression) *ast.C
530
530
531
531
columns := & ast.List {}
532
532
for _ , col := range n .ColNameList {
533
- columns .Items = append (columns .Items , NewIdentifer (col .String ()))
533
+ columns .Items = append (columns .Items , NewIdentifier (col .String ()))
534
534
}
535
535
536
536
return & ast.CommonTableExpr {
@@ -613,7 +613,7 @@ func (c *cc) convertValueExpr(n *driver.ValueExpr) *ast.A_Const {
613
613
func (c * cc ) convertWildCardField (n * pcast.WildCardField ) * ast.ColumnRef {
614
614
items := []ast.Node {}
615
615
if t := n .Table .String (); t != "" {
616
- items = append (items , NewIdentifer (t ))
616
+ items = append (items , NewIdentifier (t ))
617
617
}
618
618
items = append (items , & ast.A_Star {})
619
619
@@ -636,7 +636,7 @@ func (c *cc) convertAggregateFuncExpr(n *pcast.AggregateFuncExpr) *ast.FuncCall
636
636
},
637
637
Funcname : & ast.List {
638
638
Items : []ast.Node {
639
- NewIdentifer (name ),
639
+ NewIdentifier (name ),
640
640
},
641
641
},
642
642
Args : & ast.List {},
@@ -819,7 +819,7 @@ func (c *cc) convertDropDatabaseStmt(n *pcast.DropDatabaseStmt) ast.Node {
819
819
return & ast.DropSchemaStmt {
820
820
MissingOk : ! n .IfExists ,
821
821
Schemas : []* ast.String {
822
- NewIdentifer (n .Name ),
822
+ NewIdentifier (n .Name ),
823
823
},
824
824
}
825
825
}
0 commit comments