mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-06-09 23:33:45 +00:00
fix(database): add Scan method to insert query interfaces
* Implement Scan method for BunInsertQuery, GormInsertQuery, and PgSQLInsertQuery * Update mock implementations to support Scan method * Introduce GetForeignKeyColumn utility for foreign key resolution * Add tests for GetForeignKeyColumn functionality
This commit is contained in:
@@ -239,6 +239,11 @@ func (m *MockInsertQuery) Exec(ctx context.Context) (common.Result, error) {
|
||||
return args.Get(0).(common.Result), args.Error(1)
|
||||
}
|
||||
|
||||
func (m *MockInsertQuery) Scan(ctx context.Context, dest interface{}) error {
|
||||
args := m.Called(ctx, dest)
|
||||
return args.Error(0)
|
||||
}
|
||||
|
||||
// MockUpdateQuery is a mock implementation of common.UpdateQuery
|
||||
type MockUpdateQuery struct {
|
||||
mock.Mock
|
||||
|
||||
Reference in New Issue
Block a user