... | @@ -11,6 +11,12 @@ true and false # result: false |
... | @@ -11,6 +11,12 @@ true and false # result: false |
|
true or false # result: true
|
|
true or false # result: true
|
|
```
|
|
```
|
|
|
|
|
|
|
|
## And and Or conditional statements
|
|
|
|
```python
|
|
|
|
.age > 18 and "Ask an adult question?" # result: only when the age is over 18 the text is displayed
|
|
|
|
.title or "Untitled Note" # result: a string with the title or "Untitled Note" when title is not set
|
|
|
|
```
|
|
|
|
|
|
## Conditions
|
|
## Conditions
|
|
```python
|
|
```python
|
|
true ? 'yes' : 'no' # result: 'yes
|
|
true ? 'yes' : 'no' # result: 'yes
|
... | @@ -50,7 +56,15 @@ true ? false and true ? -1 : false or true ? 'yes' : 'no' : -1 # result: 'yes |
... | @@ -50,7 +56,15 @@ true ? false and true ? -1 : false or true ? 'yes' : 'no' : -1 # result: 'yes |
|
"{fetchName()} Hello"
|
|
"{fetchName()} Hello"
|
|
```
|
|
```
|
|
|
|
|
|
## Example
|
|
## Edge traversal
|
|
```python
|
|
```python
|
|
!(test + -5.63537) or 4/3 ? variable.func() : me.address[primary = true].country ? ((4+5 * 10) + test[10]) : 'asdads\\'asdad' + ''
|
|
.label[] # Returns a list of items that are connect with edge type label
|
|
``` |
|
._label[] # Returns a list of edges with edge type label
|
|
|
|
.label # Returns the first item with edge type label
|
|
|
|
.label[.firstName = "James"] # Returns a list of item for which firstName is "Koen"
|
|
|
|
._label[.sequence > 3] # Returns a list of edges for which sequence is larger than 3
|
|
|
|
._~label # Returns the first reverse edge for which edge type is label
|
|
|
|
._~label[] # Returns a list of reverse edges for which edge type is label
|
|
|
|
.~label # Returns an item connected via a reverse edges for which edge type is label
|
|
|
|
.~label[] # Returns a list of items connected via a reverse edges for which edge type is label
|
|
|
|
``` |
|
|
|
\ No newline at end of file |