Skip to content

Commit

Permalink
Update cube.md
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov authored Apr 16, 2020
1 parent 0fa7349 commit 1d36a97
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/Schema/cube.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,21 @@ cube(`Orders`, {
});
```

To ensure filter value presents for all requests `requiredFilter` can be used:

```javascript
cube(`Orders`, {
sql: `SELECT * FROM orders WHERE ${USER_CONTEXT.email.requiredFilter('email')}`,

dimensions: {
date: {
sql: `date`,
type: `time`
}
}
});
```

### Unsafe Value

> **NOTE:** Use of this feature entails SQL injection security risk. Use it with caution.
Expand Down

0 comments on commit 1d36a97

Please sign in to comment.