Skip to content

Commit 347cdd3

Browse files
committed
[ga-format-pr] Run ./format_repo.sh to fix formatting
1 parent da6db05 commit 347cdd3

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

sql/procedures/interpreter_operation.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ import ast "github.com/dolthub/vitess/go/vt/sqlparser"
1717
type OpCode uint16
1818

1919
const (
20-
OpCode_Select OpCode = iota
21-
OpCode_Declare // https://www.postgresql.org/docs/15/plpgsql-declarations.html
20+
OpCode_Select OpCode = iota
21+
OpCode_Declare // https://www.postgresql.org/docs/15/plpgsql-declarations.html
2222
OpCode_Set
23-
OpCode_Exception // https://www.postgresql.org/docs/15/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
24-
OpCode_Execute // Everything that's not a SELECT
25-
OpCode_Goto // All control-flow structures can be represented using Goto
26-
OpCode_If // https://www.postgresql.org/docs/15/plpgsql-control-structures.html#PLPGSQL-CONDITIONALS
27-
OpCode_Return // https://www.postgresql.org/docs/15/plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURNING
28-
OpCode_ScopeBegin // This is used for scope control, specific to Doltgres
29-
OpCode_ScopeEnd // This is used for scope control, specific to Doltgres
23+
OpCode_Exception // https://www.postgresql.org/docs/15/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
24+
OpCode_Execute // Everything that's not a SELECT
25+
OpCode_Goto // All control-flow structures can be represented using Goto
26+
OpCode_If // https://www.postgresql.org/docs/15/plpgsql-control-structures.html#PLPGSQL-CONDITIONALS
27+
OpCode_Return // https://www.postgresql.org/docs/15/plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURNING
28+
OpCode_ScopeBegin // This is used for scope control, specific to Doltgres
29+
OpCode_ScopeEnd // This is used for scope control, specific to Doltgres
3030
)
3131

3232
// InterpreterOperation is an operation that will be performed by the interpreter.

sql/procedures/interpreter_stack.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ type InterpreterScopeDetails struct {
122122
// the same as a stack in the traditional programming sense, but rather is a loose abstraction that serves the same
123123
// general purpose.
124124
type InterpreterStack struct {
125-
stack *Stack[*InterpreterScopeDetails]
125+
stack *Stack[*InterpreterScopeDetails]
126126
replaceMap map[ast.SQLNode]ast.SQLNode
127127
}
128128

@@ -134,7 +134,7 @@ func NewInterpreterStack() InterpreterStack {
134134
variables: make(map[string]*InterpreterVariable),
135135
})
136136
return InterpreterStack{
137-
stack: stack,
137+
stack: stack,
138138
replaceMap: map[ast.SQLNode]ast.SQLNode{},
139139
}
140140
}

sql/procedures/parse.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func ConvertStmt(ops *[]*InterpreterOperation, stack *InterpreterStack, stmt ast
6161
var setOp *InterpreterOperation
6262
if len(setExpr.Scope) != 0 {
6363
setOp = &InterpreterOperation{
64-
OpCode: OpCode_Execute,
64+
OpCode: OpCode_Execute,
6565
PrimaryData: s,
6666
}
6767
} else {
@@ -189,7 +189,7 @@ func ConvertStmt(ops *[]*InterpreterOperation, stack *InterpreterStack, stmt ast
189189
}
190190
gotoOp := &InterpreterOperation{
191191
OpCode: OpCode_Goto,
192-
Index: loopStart,
192+
Index: loopStart,
193193
}
194194
*ops = append(*ops, gotoOp)
195195

@@ -220,7 +220,7 @@ func ConvertStmt(ops *[]*InterpreterOperation, stack *InterpreterStack, stmt ast
220220

221221
gotoOp := &InterpreterOperation{
222222
OpCode: OpCode_Goto,
223-
Index: loopStart,
223+
Index: loopStart,
224224
}
225225
*ops = append(*ops, gotoOp)
226226

@@ -235,7 +235,7 @@ func ConvertStmt(ops *[]*InterpreterOperation, stack *InterpreterStack, stmt ast
235235
}
236236
gotoOp := &InterpreterOperation{
237237
OpCode: OpCode_Goto,
238-
Index: loopStart,
238+
Index: loopStart,
239239
}
240240
*ops = append(*ops, gotoOp)
241241

0 commit comments

Comments
 (0)