appy-one / acebase

A fast, low memory, transactional, index & query enabled NoSQL database engine and server for node.js and browser with realtime data change notifications
MIT License
491 stars 27 forks source link

Allow wildcard path queries with given filter values #210

Closed appy-one closed 1 year ago

appy-one commented 1 year ago

Allows queries to be executed on non-indexed paths with $variables if values for those variables are passed as a filter.

Example:

const messageCount = await db.query('users/$username/messages').filter('$username', 'in', ['user1', 'user2']).count();

Above essentially performs 2 queries (for user1 and user2) and combines the results