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
488 stars 27 forks source link

.get include with wildcards doesn't work on localStorage/IndexedDB #115

Closed Bubz43 closed 2 years ago

Bubz43 commented 2 years ago

When used the node version it works as expected, but with AceBase.WithLocalStorage or AceBase.WithIndexedDB it doesn't.

// Include specific nested data:
db.ref('users/someuser/posts')
  .get({ include: ['*/title', '*/posted'] })
  .then(snap => {
    // snapshot will be an empty object
});

// Combine include & exclude:
db.ref('users/someuser')
  .get({ exclude: ['comments'], include: ['posts/*/title'] })
  .then(snap => {
    // snapshot will exclude comments but won't contain a posts property at all
});
appy-one commented 2 years ago

Thanks for reporting! I ran a quick test and was able to reproduce. I'll look into it asap

appy-one commented 2 years ago

I've published a fix for this in v1.21.3, let me know if all works as expected!

Spread the word contribute Sponsor AceBase

Bubz43 commented 2 years ago

Works great, thanks for the quick fix.