in dexie.js, how do i define and query field of type set?

35 Views Asked by At

here is my typescript definion:

interface MyBlogPost{
  tx:string
  labels: Set<number>
}

Basicly a blog post with text and mutiple lables of type number. I have many of those that i need to store in indexeddb

I need to query by a set of labels:

function get_all_posts_by_labels(labels_subset:Set<number>){}

the function will return an array(or iterator) of the posts that have at least one label of labels_subset

in Dexie (or any other indexeddb wrapper), how do i create the database query method?

0

There are 0 best solutions below