MCPcopy Create free account
hub / github.com/dolthub/doltgresql / sourceGenerators

Function sourceGenerators

testing/generation/utils/statement_generator.go:742–752  ·  view source on GitHub ↗

sourceGenerators returns a comma-separated SourceString from the given generator slice.

(gens []StatementGenerator)

Source from the content-addressed store, hash-verified

740
741// sourceGenerators returns a comma-separated SourceString from the given generator slice.
742func sourceGenerators(gens []StatementGenerator) string {
743 gens = removeNilGenerators(gens)
744 if len(gens) == 0 {
745 return ""
746 }
747 sourceStrs := make([]string, len(gens))
748 for i, gen := range gens {
749 sourceStrs[i] = gen.SourceString()
750 }
751 return strings.Join(sourceStrs, ", ")
752}
753
754// removeNilGenerators returns a new slice of generators with all nils removed.
755func removeNilGenerators(gens []StatementGenerator) []StatementGenerator {

Callers 3

SourceStringMethod · 0.85
SourceStringMethod · 0.85
SourceStringMethod · 0.85

Calls 2

removeNilGeneratorsFunction · 0.85
SourceStringMethod · 0.65

Tested by

no test coverage detected