MCPcopy Index your code
hub / github.com/Masterminds/squirrel / assertVals

Function assertVals

integration/integration_test.go:82–97  ·  view source on GitHub ↗
(t *testing.T, s sqrl.SelectBuilder, expected ...string)

Source from the content-addressed store, hash-verified

80}
81
82func assertVals(t *testing.T, s sqrl.SelectBuilder, expected ...string) {
83 rows, err := s.Query()
84 assert.NoError(t, err)
85 defer rows.Close()
86
87 vals := make([]string, len(expected))
88 for i := range vals {
89 assert.True(t, rows.Next())
90 assert.NoError(t, rows.Scan(&vals[i]))
91 }
92 assert.False(t, rows.Next())
93
94 if expected != nil {
95 assert.Equal(t, expected, vals)
96 }
97}
98
99func TestSimpleSelect(t *testing.T) {
100 assertVals(

Callers 4

TestSimpleSelectFunction · 0.85
TestEqFunction · 0.85
TestIneqFunction · 0.85
TestConjFunction · 0.85

Calls 2

QueryMethod · 0.65
ScanMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…