Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve interface of lens.find method #52

Closed
karelklima opened this issue May 18, 2023 · 3 comments
Closed

Improve interface of lens.find method #52

karelklima opened this issue May 18, 2023 · 3 comments
Labels
feature New feature or request
Milestone

Comments

@karelklima
Copy link
Owner

The interface should enable user to do more powerful queries, order results, and find specific resources more easily.

Prisma could be a good inspiration in what to accomplish:

const results = await prisma.post.findMany({
  skip: 200,
  take: 20,
  where: {
    email: {
      contains: 'Prisma',
    },
  },
  orderBy: {
    title: 'desc',
  },
})
@karelklima
Copy link
Owner Author

karelklima commented May 18, 2023

As for the operators = they should correspond to sparql boolean FILTER functions, e.g. regex, contains, lang, is.

Alternatively, there could be a filter definition that would translate directly to SPARQL, e.g.:

{
  where: {
    someNumber: {
      filter: "? > 10",
    },
  },
}

@karelklima karelklima added this to the 2.0 milestone Nov 22, 2023
@karelklima
Copy link
Owner Author

Partially resolved by #65.

@karelklima
Copy link
Owner Author

Ordering is out of scope and not really aligned with the Linked Data concepts supported by LDkit. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant