Skip to content

Commit c601f3f

Browse files
author
James Cor
committed
remove unused functions
1 parent 7862ef1 commit c601f3f

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

sql/procedures/statements.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ package procedures
1616

1717
// Statement represents a Stored Procedure Statement.
1818
type Statement interface {
19-
// OperationSize reports the number of operations that the statement will convert to.
20-
OperationSize() int32
2119
// AppendOperations adds the statement to the operation slice.
2220
AppendOperations(ops *[]InterpreterOperation, stack *InterpreterStack) error
2321
}
@@ -54,20 +52,6 @@ type Block struct {
5452

5553
var _ Statement = Block{}
5654

57-
// OperationSize implements the interface Statement.
58-
func (stmt Block) OperationSize() int32 {
59-
total := int32(2) // We start with 2 since we'll have ScopeBegin and ScopeEnd
60-
for _, variable := range stmt.Variable {
61-
if !variable.IsParameter {
62-
total++
63-
}
64-
}
65-
for _, innerStmt := range stmt.Body {
66-
total += innerStmt.OperationSize()
67-
}
68-
return total
69-
}
70-
7155
// AppendOperations implements the interface Statement.
7256
func (stmt Block) AppendOperations(ops *[]InterpreterOperation, stack *InterpreterStack) error {
7357
stack.PushScope()
@@ -97,11 +81,6 @@ type ExecuteSQL struct {
9781

9882
var _ Statement = ExecuteSQL{}
9983

100-
// OperationSize implements the interface Statement.
101-
func (ExecuteSQL) OperationSize() int32 {
102-
return 1
103-
}
104-
10584
// AppendOperations implements the interface Statement.
10685
func (stmt ExecuteSQL) AppendOperations(ops *[]InterpreterOperation, stack *InterpreterStack) error {
10786
*ops = append(*ops, InterpreterOperation{
@@ -201,12 +180,3 @@ type Variable struct {
201180
Type string
202181
IsParameter bool
203182
}
204-
205-
// OperationSizeForStatements returns the sum of OperationSize for every statement.
206-
func OperationSizeForStatements(stmts []Statement) int32 {
207-
total := int32(0)
208-
for _, stmt := range stmts {
209-
total += stmt.OperationSize()
210-
}
211-
return total
212-
}

0 commit comments

Comments
 (0)