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

[DOC-12145] Added missing query to example 3 of WITH RECURSIVE page - Server #196

Merged
merged 7 commits into from
May 2, 2024

Conversation

julia-cb
Copy link
Contributor

@julia-cb julia-cb commented Apr 26, 2024

Jira ticket: DOC-12145
Capella doc PR: #201
Preview doc page (preview site password here)

Changes in this PR:

  • Added new query and CREATE INDEX to example 3 of WITH RECURSIVE page in Server (will copy query over to the capella branch once this PR is approved)
  • Added new query handling hierarchical/tree-structured data from the Recursive CTE google doc which I hadn't added to the page before

@julia-cb julia-cb self-assigned this Apr 26, 2024
@julia-cb julia-cb requested a review from simon-dew April 27, 2024 05:12
@julia-cb julia-cb changed the title [DOC-12145] Added missing query to example 3 of WITH RECURSIVE page [DOC-12145] Added missing query to example 3 of WITH RECURSIVE page - Server Apr 29, 2024
Copy link
Collaborator

@simon-dew simon-dew left a comment

Choose a reason for hiding this comment

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

Thanks @julia-cb ! Some changes required to set the query context for the examples, create the required collections, and show the results.

julia-cb and others added 4 commits April 30, 2024 18:39
Co-authored-by: Simon Dew <39966290+simon-dew@users.noreply.github.com>
Co-authored-by: Simon Dew <39966290+simon-dew@users.noreply.github.com>
@julia-cb julia-cb requested a review from simon-dew May 1, 2024 05:26
@julia-cb
Copy link
Contributor Author

julia-cb commented May 1, 2024

@simon-dew Thanks for all the feedback!! Super helpful and all great suggestions, I applied all of them :) (also totally agree on the name diversity for the employee example - I updated it with different names)

I updated the preview site to reflect all the changes you requested! https://preview.docs-test.couchbase.com/fixwithrecursive/server/current/n1ql/n1ql-language-reference/with-recursive.html

Copy link
Collaborator

@simon-dew simon-dew left a comment

Choose a reason for hiding this comment

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

LGTM 👍 a couple of notes if you want, but I think this is good to merge as-is.

@@ -226,6 +501,17 @@ WITH RECURSIVE similar_items AS (
SELECT * FROM similar_items;
----

.Results
Copy link
Collaborator

@simon-dew simon-dew May 2, 2024

Choose a reason for hiding this comment

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

This is fine as-is, but for this one example I think it would also be okay just to say "this query will run until the Query service runs out of memory".

WHERE r.sourceairport!="TLV" and recroute.depth<2
)
SELECT * FROM recroute LIMIT 2000;
----

.Results
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need to repeat the results here: you could just have a line saying "The results are the same as for the previous query."

@julia-cb julia-cb merged commit 54bd1d5 into release/7.6 May 2, 2024
@julia-cb julia-cb deleted the DOC-12145_MissingQueriesWithRecursive branch May 2, 2024 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants