typicode / lowdb

Simple and fast JSON database
MIT License
21.49k stars 923 forks source link

Does lowdb include selector functions for queries? #519

Closed laurencefass closed 2 years ago

laurencefass commented 2 years ago

Does this include selector functions for queries or do i treat all data as Javascript arrays?

e.g. (pseudocode...)

const user = ....findFirst({
  where: {
    id: {
      equals: 'abc-123',
    },
  },
})

or

const users = ....findMany({
  where: {
    likes: {
      gte: 1000,
    },
  },
})

thanks

luukdv commented 2 years ago

lowdb doesn't come with built-in queries like findFirst / findMany.

laurencefass commented 2 years ago

thanks