1
0
Fork 0

Doc - fix issue #4778 (#5081)

This commit is contained in:
maxkernbach 2018-04-11 15:47:38 +02:00 committed by sleto-it
parent 159fefafe9
commit 56497e13f9
3 changed files with 8 additions and 7 deletions

View File

@ -164,13 +164,10 @@ FOR u IN users
RETURN length
```
The above is equivalent to, but more efficient than:
The above is equivalent to, but less efficient than:
```
RETURN LENGTH(
FOR u IN users
RETURN length
)
RETURN LENGTH(users)
```
The *WITH COUNT* clause can also be used to efficiently count the number

View File

@ -98,7 +98,8 @@ documents. For each inserted document, the document key is returned:
```js
FOR i IN 1..100
INSERT { value: i }
INSERT { value: i }
IN users
LET inserted = NEW
RETURN inserted._key
```

View File

@ -233,7 +233,8 @@ documents before modification. For each modified document, the document key is r
```js
FOR u IN users
UPDATE u WITH { value: "test" }
UPDATE u WITH { value: "test" }
IN users
LET previous = OLD
RETURN previous._key
```
@ -244,6 +245,7 @@ without some of the system attributes:
```js
FOR u IN users
UPDATE u WITH { value: "test" }
IN users
LET updated = NEW
RETURN UNSET(updated, "_key", "_id", "_rev")
```
@ -253,5 +255,6 @@ It is also possible to return both `OLD` and `NEW`:
```js
FOR u IN users
UPDATE u WITH { value: "test" }
IN users
RETURN { before: OLD, after: NEW }
```