MCPcopy Index your code
hub / github.com/DATA-DOG/go-sqlmock / QueryMatcher

Interface QueryMatcher

query.go:24–29  ·  view source on GitHub ↗

QueryMatcher is an SQL query string matcher interface, which can be used to customize validation of SQL query strings. As an example, external library could be used to build and validate SQL ast, columns selected. sqlmock can be customized to implement a different QueryMatcher configured through an

Source from the content-addressed store, hash-verified

22// configured through an option when sqlmock.New or sqlmock.NewWithDSN
23// is called, default QueryMatcher is QueryMatcherRegexp.
24type QueryMatcher interface {
25
26 // Match expected SQL query string without whitespace to
27 // actual SQL.
28 Match(expectedSQL, actualSQL string) error
29}
30
31// QueryMatcherFunc type is an adapter to allow the use of
32// ordinary functions as QueryMatcher. If f is a function

Callers

nothing calls this directly

Implementers 3

AnyTimeargument_test.go
failArgumentsqlmock_test.go
anyArgumentargument.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…