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

Function Variable

testing/generation/utils/statement_generator.go:275–287  ·  view source on GitHub ↗

Variable creates a new StatementGenerator representing a VariableGen.

(name string, child StatementGenerator)

Source from the content-addressed store, hash-verified

273
274// Variable creates a new StatementGenerator representing a VariableGen.
275func Variable(name string, child StatementGenerator) *VariableGen {
276 if child != nil {
277 return &VariableGen{
278 name: name,
279 options: child.Copy(),
280 }
281 } else {
282 return &VariableGen{
283 name: name,
284 options: nil,
285 }
286 }
287}
288
289// AddChildren implements the interface StatementGenerator.
290func (v *VariableGen) AddChildren(children ...StatementGenerator) error {

Callers 2

AddVariableMethod · 0.70
CopyMethod · 0.70

Calls 1

CopyMethod · 0.65

Tested by

no test coverage detected