Skip to content

Commit

Permalink
[ga-format-pr] Run ./format_repo.sh to fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jycor committed Jan 28, 2025
1 parent 93bc19e commit cf09af9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion sql/analyzer/stored_procedures.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func loadStoredProcedures(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan

allDatabases := a.Catalog.AllDatabases(ctx)
for _, database := range allDatabases {
pdb, ok := database.(sql.StoredProcedureDatabase);
pdb, ok := database.(sql.StoredProcedureDatabase)
if !ok {
continue
}
Expand Down
14 changes: 7 additions & 7 deletions sql/plan/ddl_procedure.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
package plan

import (
"github.com/dolthub/go-mysql-server/sql/types"
"github.com/dolthub/go-mysql-server/sql/types"

"github.com/dolthub/go-mysql-server/sql"
)

type CreateProcedure struct {
ddlNode ddlNode
ddlNode ddlNode

StoredProcDetails sql.StoredProcedureDetails
BodyString string
StoredProcDetails sql.StoredProcedureDetails
BodyString string
}

var _ sql.Node = (*CreateProcedure)(nil)
Expand All @@ -39,9 +39,9 @@ func NewCreateProcedure(
bodyString string,
) *CreateProcedure {
return &CreateProcedure{
ddlNode: ddlNode{db},
StoredProcDetails: storedProcDetails,
BodyString: bodyString,
ddlNode: ddlNode{db},
StoredProcDetails: storedProcDetails,
BodyString: bodyString,
}
}

Expand Down
14 changes: 7 additions & 7 deletions sql/planbuilder/create_ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ package planbuilder

import (
"fmt"
"github.com/dolthub/go-mysql-server/sql/types"
"strings"
"strings"
"time"
"unicode"

Expand All @@ -26,7 +25,8 @@ import (
"github.com/dolthub/go-mysql-server/sql"
"github.com/dolthub/go-mysql-server/sql/expression"
"github.com/dolthub/go-mysql-server/sql/plan"
)
"github.com/dolthub/go-mysql-server/sql/types"
)

func (b *Builder) buildCreateTrigger(inScope *scope, subQuery string, fullQuery string, c *ast.DDL) (outScope *scope) {
outScope = inScope.push()
Expand Down Expand Up @@ -204,11 +204,11 @@ func (b *Builder) buildCreateProcedure(inScope *scope, subQuery string, fullQuer

now := time.Now()
spd := sql.StoredProcedureDetails{
Name: strings.ToLower(c.ProcedureSpec.ProcName.Name.String()),
Name: strings.ToLower(c.ProcedureSpec.ProcName.Name.String()),
CreateStatement: subQuery,
CreatedAt: now,
ModifiedAt: now,
SqlMode: sql.LoadSqlMode(b.ctx).String(),
CreatedAt: now,
ModifiedAt: now,
SqlMode: sql.LoadSqlMode(b.ctx).String(),
}

bodyStr := strings.TrimSpace(fullQuery[c.SubStatementPositionStart:c.SubStatementPositionEnd])
Expand Down
2 changes: 1 addition & 1 deletion sql/planbuilder/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ func (b *Builder) buildCall(inScope *scope, c *ast.Call) (outScope *scope) {
}

newProc := BuildProcedureHelper(b.ctx, b.cat, db, asOf, proc)
outScope.node = plan.NewCall( db, procName, params, newProc, asOf, b.cat)
outScope.node = plan.NewCall(db, procName, params, newProc, asOf, b.cat)
return outScope
}

Expand Down

0 comments on commit cf09af9

Please sign in to comment.