Skip to content

Commit

Permalink
chore: fix some comments (#3278)
Browse files Browse the repository at this point in the history
Signed-off-by: sunxunle <sunxunle@gmail.com>
  • Loading branch information
sunxunle committed Mar 25, 2024
1 parent 6482f8e commit e4e1371
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *CachedAnalyzer) Analyze(ctx context.Context, n ast.Node, q string, sche
}

func (c *CachedAnalyzer) analyze(ctx context.Context, n ast.Node, q string, schema []string, np *named.ParamSet) (*analysis.Analysis, bool, error) {
// Only cache queries for managed databases. We can't be certain the the
// Only cache queries for managed databases. We can't be certain the
// database is in an unchanged state otherwise
if !c.db.Managed {
return nil, true, nil
Expand Down
4 changes: 2 additions & 2 deletions internal/engine/postgresql/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func translate(node *nodes.Node) (ast.Node, error) {
case nodes.AlterTableType_AT_AddColumn:
d, ok := altercmd.Def.Node.(*nodes.Node_ColumnDef)
if !ok {
return nil, fmt.Errorf("expected alter table defintion to be a ColumnDef")
return nil, fmt.Errorf("expected alter table definition to be a ColumnDef")
}

rel, err := parseRelationFromNodes(d.ColumnDef.TypeName.Names)
Expand All @@ -290,7 +290,7 @@ func translate(node *nodes.Node) (ast.Node, error) {
case nodes.AlterTableType_AT_AlterColumnType:
d, ok := altercmd.Def.Node.(*nodes.Node_ColumnDef)
if !ok {
return nil, fmt.Errorf("expected alter table defintion to be a ColumnDef")
return nil, fmt.Errorf("expected alter table definition to be a ColumnDef")
}
col := ""
if altercmd.Name != "" {
Expand Down

0 comments on commit e4e1371

Please sign in to comment.