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

Adds completion for YIELD elements in a procedure call #292

Merged
merged 6 commits into from
Nov 26, 2024

Conversation

anderson4j
Copy link
Collaborator

When we have a procedure call like:

CALL db.labels() YIELD

we want to get completions for the different return elements the procedure can produce.

This PR adds that.

Copy link

changeset-bot bot commented Nov 14, 2024

🦋 Changeset detected

Latest commit: feba9a1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@neo4j-cypher/language-support Patch
@neo4j-cypher/language-server Patch
@neo4j-cypher/react-codemirror-playground Patch
@neo4j-cypher/react-codemirror Patch
@neo4j-cypher/schema-poller Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

});

test('Correctly completes YIELD when we have backticks in the procedure name', () => {
const query1 = 'CALL `dbms`.`components`() YIELD ';
Copy link
Collaborator

@ncordon ncordon Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see a test that works for:

CALL dbms.components() YIELD n // offers name as completion
CALL dbms.components() YIELD name, e // offers edition as completion
CALL dbms.components() YIELD name, edition, // offers version as completion

I think that was not working yesterday and it should

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it would be nice if we can fix these completions:

CALL dbms.components() YIELD name, version RETURN ^

and get name, version as possible completions there

@ncordon ncordon self-requested a review November 25, 2024 14:07
@ncordon ncordon merged commit 22081b0 into main Nov 26, 2024
4 checks passed
@ncordon ncordon deleted the yieldCompletions branch November 26, 2024 10:20
@anderson4j
Copy link
Collaborator Author

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

Successfully merging this pull request may close these issues.

2 participants