Skip to content

Commit

Permalink
fix(return): pass options from query interface to return clause
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesfer committed Aug 25, 2019
1 parent e5fedf3 commit f35ebda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -620,15 +620,15 @@ export abstract class Builder<Q> extends SetBlock<Q> {
*
* You can also pass an array of any of the above methods.
*
* The return method also accepts a `distinct` option which will cause a `RETURN DISTINCT` to be
* emitted instead.
* The return method also accepts a `distinct` option which will cause a `RETURN DISTINCT` clause
* to be emitted instead.
* ```javascript
* query.return('people', { distinct: true })
* // RETURN DISTINCT people
* ```
*/
return(terms: Many<Term>, options?: ReturnOptions) {
return this.continueChainClause(new Return(terms));
return this.continueChainClause(new Return(terms, options));
}

/**
Expand Down

0 comments on commit f35ebda

Please sign in to comment.