@@ -16,8 +16,6 @@ package procedures
1616
1717// Statement represents a Stored Procedure Statement.
1818type 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
5553var _ 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.
7256func (stmt Block ) AppendOperations (ops * []InterpreterOperation , stack * InterpreterStack ) error {
7357 stack .PushScope ()
@@ -97,11 +81,6 @@ type ExecuteSQL struct {
9781
9882var _ 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.
10685func (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