Skip to content

Commit

Permalink
doc(readme): add db.collections.exists
Browse files Browse the repository at this point in the history
  • Loading branch information
line-o authored and duncdrum committed Oct 25, 2022
1 parent b76805e commit 8f35e31
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,19 @@ db.collections.describe(collectionPath)
db.collections.read(collectionPath)
```
#### exists
This function checks if the collection exists.
- returns `true` if the collection exists and the current user can open it
- returns `false` if the collection does not exist
- throws an exception if the collection exists but the current user cannot
access it
```js
db.collections.exists(collectionPath)
```
#### existsAndCanOpen
This function checks if the collection exists and if it does, if the current user can access it.
Expand Down

0 comments on commit 8f35e31

Please sign in to comment.