TryGhost / TryGhost/NQL

Support counting relations

Open
#15 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
JavaScript
Stars
7
Forks
7
Avg merge
9h 4m
Merged PRs (30d)
22

Description

Description

NQL should support counting relations.

The SQL strategy is currently covered in https://github.com/NexesJS/NQL/issues/1.

e.g. You can pass a filter into NQL filter=count.posts>:0 and mongo-knex will receive a mongo JSON object and needs to interpret this object with the help of TryGhost/mongo-knex#4. It has to attach the correct SQL queries.

Tasks

  • add implementation for counting relations

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the SQL strategy described in issue #1 and the referenced mongo-knex#4 behavior. Trace how the filter count.posts>:0 is passed to mongo-knex, then define completion as implementing relation-count support and attaching the correct SQL queries for the resulting query object.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb, sql
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.