MCPcopy
hub / github.com/dgraph-io/dgraph / TestParseQueryWithVarValAggNested5

Function TestParseQueryWithVarValAggNested5

dql/parser_test.go:554–575  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

552}
553
554func TestParseQueryWithVarValAggNested5(t *testing.T) {
555 query := `
556 {
557 me(func: uid(L), orderasc: val(d) ) {
558 name
559 }
560
561 var(func: uid(0x0a)) {
562 L as friends {
563 a as age
564 b as count(friends)
565 c as count(relatives)
566 d as math(a * b / c)
567 }
568 }
569 }
570`
571 res, err := Parse(Request{Str: query})
572 require.NoError(t, err)
573 require.EqualValues(t, "(/ (* a b) c)",
574 res.Query[1].Children[0].Children[3].MathExp.debugString())
575}
576
577func TestParseQueryWithVarValAggLogSqrt(t *testing.T) {
578 query := `

Callers

nothing calls this directly

Calls 2

ParseFunction · 0.70
debugStringMethod · 0.45

Tested by

no test coverage detected