@@ -29,7 +29,7 @@ func identifier(id string) string {
2929 return strings .ToLower (id )
3030}
3131
32- func NewIdentifer (t string ) * ast.String {
32+ func NewIdentifier (t string ) * ast.String {
3333 return & ast.String {Str : identifier (t )}
3434}
3535
@@ -289,12 +289,12 @@ func (c *cc) convertCreateTableStmt(n *pcast.CreateTableStmt) ast.Node {
289289func (c * cc ) convertColumnNameExpr (n * pcast.ColumnNameExpr ) * ast.ColumnRef {
290290 var items []ast.Node
291291 if schema := n .Name .Schema .String (); schema != "" {
292- items = append (items , NewIdentifer (schema ))
292+ items = append (items , NewIdentifier (schema ))
293293 }
294294 if table := n .Name .Table .String (); table != "" {
295- items = append (items , NewIdentifer (table ))
295+ items = append (items , NewIdentifier (table ))
296296 }
297- items = append (items , NewIdentifer (n .Name .Name .String ()))
297+ items = append (items , NewIdentifier (n .Name .Name .String ()))
298298 return & ast.ColumnRef {
299299 Fields : & ast.List {
300300 Items : items ,
@@ -374,9 +374,9 @@ func (c *cc) convertFuncCallExpr(n *pcast.FuncCallExpr) ast.Node {
374374 // TODO: Deprecate the usage of Funcname
375375 items := []ast.Node {}
376376 if schema != "" {
377- items = append (items , NewIdentifer (schema ))
377+ items = append (items , NewIdentifier (schema ))
378378 }
379- items = append (items , NewIdentifer (name ))
379+ items = append (items , NewIdentifier (name ))
380380
381381 args := & ast.List {}
382382 for _ , arg := range n .Args {
@@ -530,7 +530,7 @@ func (c *cc) convertCommonTableExpression(n *pcast.CommonTableExpression) *ast.C
530530
531531 columns := & ast.List {}
532532 for _ , col := range n .ColNameList {
533- columns .Items = append (columns .Items , NewIdentifer (col .String ()))
533+ columns .Items = append (columns .Items , NewIdentifier (col .String ()))
534534 }
535535
536536 return & ast.CommonTableExpr {
@@ -613,7 +613,7 @@ func (c *cc) convertValueExpr(n *driver.ValueExpr) *ast.A_Const {
613613func (c * cc ) convertWildCardField (n * pcast.WildCardField ) * ast.ColumnRef {
614614 items := []ast.Node {}
615615 if t := n .Table .String (); t != "" {
616- items = append (items , NewIdentifer (t ))
616+ items = append (items , NewIdentifier (t ))
617617 }
618618 items = append (items , & ast.A_Star {})
619619
@@ -636,7 +636,7 @@ func (c *cc) convertAggregateFuncExpr(n *pcast.AggregateFuncExpr) *ast.FuncCall
636636 },
637637 Funcname : & ast.List {
638638 Items : []ast.Node {
639- NewIdentifer (name ),
639+ NewIdentifier (name ),
640640 },
641641 },
642642 Args : & ast.List {},
@@ -819,7 +819,7 @@ func (c *cc) convertDropDatabaseStmt(n *pcast.DropDatabaseStmt) ast.Node {
819819 return & ast.DropSchemaStmt {
820820 MissingOk : ! n .IfExists ,
821821 Schemas : []* ast.String {
822- NewIdentifer (n .Name ),
822+ NewIdentifier (n .Name ),
823823 },
824824 }
825825}
0 commit comments