Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jnosql-dev] add cont() method to the MongoDBTemplate

Hi, Dmitry!

I hope you're doing well!

I've just opened a PR with this enhancement: 

*PS*: This feature is not part of the Jakarta NoSQL spec. It's part of the Eclipse JNoSQL implementation only.

Thanks for the message!



On Wed, Jun 21, 2023 at 11:19 AM Dmitry Repchevsky via jnosql-dev <jnosql-dev@xxxxxxxxxxx> wrote:

Hi all,

Could you add the count() method to the MongoDBTemplate ?
Currently I use select(collectionName, bson).count(), but this is a huge performance hog.

Something like:

     * Returns the number of items in the collection that match the given query filter.
     * @param collectionName the collection name
     * @param filter         the query filter
     * @return the number of documents from query
     * @throws NullPointerException when filter or collectionName is null
    long count(String collectionName, Bson filter);

Thank you.


jnosql-dev mailing list
To unsubscribe from this list, visit

Back to the top