Multiple condition or multiple filter?

hi,

i do not understand the different between having:

func: eq(field, "value") 

and

func: eq(field, "value") @filter(eq(field2, "value"))

why do we have separate func eq from @filter?

second, how do i add more than 2 filters? third filter or more?
and how do i combine filters as OR condition?
and how do i do or condition for 2 column only?

3rd, i know orderasc: value works for 1 column, but how do sort by 2 columns or more?

thank you

Neither one nor other. The function in Root is just a search. The @filter itself is a filter and filters can use any existing function in Dgraph.

Using connectives Get started with Dgraph
Connectives you could consider as multiple conditions.

What do you mean by column?

ah, I get it about column! But not sure what you want. Check the Connectives link above and lets see.

Also Check our tour A Tour of Dgraph

Cheers.

1 Like

Wow thank you michel,

sorry i couldnt find any on this topic in google nor in forum

I will look into the doc :slight_smile:

1 Like

Don’t be, I’m glad to help. But in fact the Docs are prime source for understanding Dgraph.

Cheers.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.