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

Function TestParseQueryWithVarValDotProduct2

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

Source from the content-addressed store, hash-verified

623}
624
625func TestParseQueryWithVarValDotProduct2(t *testing.T) {
626 query := `
627 {
628 me(func: uid(L), orderasc: val(d) ) {
629 name
630 }
631
632 var(func: uid(0x0a)) {
633 L as friends {
634 a as vfloat
635 b as vfloat
636 c as count(relatives)
637 d as math(a dot b / c)
638 }
639 }
640 }
641`
642 res, err := Parse(Request{Str: query})
643 require.NoError(t, err)
644 require.EqualValues(t, "(dot a (/ b c))",
645 res.Query[1].Children[0].Children[3].MathExp.debugString())
646}
647
648func TestParseQueryWithVarValAggNestedConditional(t *testing.T) {
649 query := `

Callers

nothing calls this directly

Calls 2

ParseFunction · 0.70
debugStringMethod · 0.45

Tested by

no test coverage detected