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

Add query manager #36

Open
beechnut opened this issue Dec 8, 2021 · 0 comments
Open

Add query manager #36

beechnut opened this issue Dec 8, 2021 · 0 comments

Comments

@beechnut
Copy link
Collaborator

beechnut commented Dec 8, 2021

I'd like to add someplace—a queries.yml in an appropriate location—that stores plain-language queries and their Cypher equivalents. The CLI could then be used to run them, either by number or by text. There's templating built into it, so you can write a query for a specific person, etc.

$ aspen queries:list

1)  Who supervises the most people?
2)  Who does { Person } supervise?
3)  Order teams by psychological safety metrics.

$ aspen query 1
    > MATCH ... # Cypher goes here

Hickory

$ aspen query Who does Holly supervise?
    > MATCH ... # Cypher goes here

Magnolia
Cottonwood
Apple

The queries would be defined sort of like this, I imagine:

-
  name: Who does { Person } supervise?
  intake: Who does { Person a } supervise?
  query: |
    WITH (Person { name: {{{a}}} }) as supervisor ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant