ostafen / clover

A lightweight document-oriented NoSQL database written in pure Golang.
MIT License
680 stars 55 forks source link

Add Exists method to Query #23

Closed ostafen closed 2 years ago

ostafen commented 2 years ago

Sometimes we want to simply check that the result set of a query is not empty, thus it will be handy to add an Exists() method to the Query struct. The can be implemented by simply check whether the document returned by FindAny() is not equal to nil.