Documentation
¶
Index ¶
- type NoStrategyReducible
- type Strategy
- func (s *Strategy) DiscardQuery(resultType dbms.QueryResultType, db dbms.DB, dbOpts dbms.DBOptions, ...) bool
- func (s *Strategy) GetQueryResultType(db dbms.DB, dbOpts dbms.DBOptions, res dbms.QueryResult, ...) dbms.QueryResultType
- func (s *Strategy) GetRootClause(impl translator.Implementation, schema *schema.Schema, seed *seed.Seed) translator.Clause
- func (s *Strategy) PrepareQueryForBugreport(query []string) []string
- func (s *Strategy) ReduceStep(ctx context.Context, rootClauses []*helperclauses.ClauseCapturer) (context.Context, []*helperclauses.ClauseCapturer, bool)
- func (s Strategy) Reset()
- func (s *Strategy) ValidateReductionResult(driver dbms.DB, orig []dbms.QueryResult, new []dbms.QueryResult) bool
- func (s *Strategy) ValidateRerunResults([]dbms.QueryResult, dbms.DB) dbms.QueryResultType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoStrategyReducible ¶
type NoStrategyReducible interface {
translator.Clause
// This function gets called on clauses when reducing a bug report generated on
// a bug which was found using no strategy.
//
// Gets passed the clause capturer that captured the clause.
NoStrategyReduce(*helperclauses.ClauseCapturer) translator.Clause
}
TODO: There has to be a better place to put this... NoStrategyReducible contains the NoStrategyReduce function.
Clauses may implement this interface to make reduction more precise. Clauses not implementing this interface will get replaced by empty clauses for reduction.
type Strategy ¶
type Strategy struct{}
func (*Strategy) DiscardQuery ¶
func (*Strategy) GetQueryResultType ¶
func (s *Strategy) GetQueryResultType(db dbms.DB, dbOpts dbms.DBOptions, res dbms.QueryResult, errorMessageRegex *dbms.ErrorMessageRegex) dbms.QueryResultType
func (*Strategy) GetRootClause ¶
func (s *Strategy) GetRootClause(impl translator.Implementation, schema *schema.Schema, seed *seed.Seed) translator.Clause
func (*Strategy) PrepareQueryForBugreport ¶
func (*Strategy) ReduceStep ¶
func (s *Strategy) ReduceStep(ctx context.Context, rootClauses []*helperclauses.ClauseCapturer) (context.Context, []*helperclauses.ClauseCapturer, bool)
Simply removes root clauses one by one
func (*Strategy) ValidateReductionResult ¶
func (s *Strategy) ValidateReductionResult(driver dbms.DB, orig []dbms.QueryResult, new []dbms.QueryResult) bool
Compares the errors produced by the last statements. Uses the driver's IsEqualResult function if implemented, otherwise it just compares the strings of the errors.
func (*Strategy) ValidateRerunResults ¶
func (s *Strategy) ValidateRerunResults([]dbms.QueryResult, dbms.DB) dbms.QueryResultType
ValidateRerunResults always returns valid, as no strategy only checks for errors and crashes
Click to show internal directories.
Click to hide internal directories.