Boolean Expressions

There are three basic Boolean Operators: AND, OR and NOT. These are used to make your query more specific and are part of almost every query.

  • AND
    This is the default operator and thus doesn't need to be specified explicitly. You can, however, use an ampersand (&) to clarify the relation in your query.

    Example:
    A < B < C (same as A < B & < C)
    A is the parent of B AND the parent of C

  • OR
    This operator is used when you have multiple relationships and only one has to be satisfied. It is represented by the pipe-symbol (|). Press Alt Gr + <(Windows) or Option + 7(Mac) to type it.

    Example:
    A < B |< C
    A is the parent of B
    OR
    A is the parent of C

    Note that AND binds stronger than OR. So the expression A < B . C | . D would evaluate as:
    A is the parent of B AND immediately precedes C
    OR
    A immediately precedes D

    If you are looking for the query:
    A is the parent of B AND immediately precedes C
    OR
    A is the parent of B AND immediately precedes D

    you will need to use squared brackets ([ and ]):

    A < B [. C | . D]

    The left bracket ([) is put before the basic link and the right bracket (]) after the node name.

  • NOT
    Every relationship can be negated. For this you will need an exclamation mark (!). This operator is used to exclude certain results that you don’t want to find. See Basic approach in the Chapter Finding the correct query.

    Example:
    A < B !< C
    A is the parent of B and NOT the parent of C

9 Antworten auf „Boolean Expressions“

Boolean Expressions ist schon ziemlich genau das, was man so erwartet…“Boolean Songs“ oder „Boolean Boolean Baby“ wären bessere Song- bzw. Album-Titel, aber das ist hier ja nicht gefragt.

Contractions (you’re, I’m etc.) sind meines Wissens nach kein guter Stil in der Schrift. Nur so mal als Klugscheißerkommentar 😉

Ok, auch weg jetzt.
Wollt mich ja bloß nicht in Ruhe lassen, dabei hab ich extra mit Apostrophen gearbeitet.

Aber doesn't ist doch ok, oder?
Und soll hinter sowas: „A is the parent of B and NOT the parent of C“ noch immer ein Punkt?

Schreibe einen Kommentar zu Eugê Antworten abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert