fix(knowledge): Fix the issue where knowledge cannot execute aggregated SQL (#794)
This commit is contained in:
80
backend/internal/mock/infra/contract/nl2sql/nl2sql_mock.go
Normal file
80
backend/internal/mock/infra/contract/nl2sql/nl2sql_mock.go
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright 2025 coze-dev Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: nl2sql.go
|
||||
//
|
||||
// Generated by this command:
|
||||
//
|
||||
// mockgen -destination ../../../internal/mock/infra/contract/nl2sql_mock/nl2sql_mock.go -package mock -source nl2sql.go Factory
|
||||
//
|
||||
|
||||
// Package mock is a generated GoMock package.
|
||||
package mock
|
||||
|
||||
import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
schema "github.com/cloudwego/eino/schema"
|
||||
document "github.com/coze-dev/coze-studio/backend/infra/contract/document"
|
||||
nl2sql "github.com/coze-dev/coze-studio/backend/infra/contract/document/nl2sql"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
)
|
||||
|
||||
// MockNL2SQL is a mock of NL2SQL interface.
|
||||
type MockNL2SQL struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockNL2SQLMockRecorder
|
||||
isgomock struct{}
|
||||
}
|
||||
|
||||
// MockNL2SQLMockRecorder is the mock recorder for MockNL2SQL.
|
||||
type MockNL2SQLMockRecorder struct {
|
||||
mock *MockNL2SQL
|
||||
}
|
||||
|
||||
// NewMockNL2SQL creates a new mock instance.
|
||||
func NewMockNL2SQL(ctrl *gomock.Controller) *MockNL2SQL {
|
||||
mock := &MockNL2SQL{ctrl: ctrl}
|
||||
mock.recorder = &MockNL2SQLMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||
func (m *MockNL2SQL) EXPECT() *MockNL2SQLMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// NL2SQL mocks base method.
|
||||
func (m *MockNL2SQL) NL2SQL(ctx context.Context, messages []*schema.Message, tables []*document.TableSchema, opts ...nl2sql.Option) (string, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, messages, tables}
|
||||
for _, a := range opts {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "NL2SQL", varargs...)
|
||||
ret0, _ := ret[0].(string)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// NL2SQL indicates an expected call of NL2SQL.
|
||||
func (mr *MockNL2SQLMockRecorder) NL2SQL(ctx, messages, tables any, opts ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, messages, tables}, opts...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NL2SQL", reflect.TypeOf((*MockNL2SQL)(nil).NL2SQL), varargs...)
|
||||
}
|
||||
Reference in New Issue
Block a user