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

[Draft] Feature/recursive #1336

Draft
wants to merge 4 commits into
base: beta
Choose a base branch
from

Conversation

neil-ptr
Copy link

@neil-ptr neil-ptr commented Oct 4, 2023

Description

This pr implements recursive queries through the use of the new $withRecursive method to be used as such

const employeeHierarchy = db.$withRecursive('employeeHierarchy').as('recursive query here...');
 
const result = await db.with(employeeHierarchy).select().from(employeeHierarchy);

Comments and suggestions are welcome.

closes #209
depends on PR #1218

@neil-ptr neil-ptr marked this pull request as draft October 5, 2023 06:03
@Angelelz
Copy link
Collaborator

Angelelz commented Oct 6, 2023

@neilZon I see that you started this PR. I have a couple initial commits in my fork as well. I didn't want to create a PR because it depends on #1218 and it will also close #372
Please take a look at how I have working right now: https://x.com/Angelelz/status/1708368486634819916?s=20
You can also check the branch with my commits, currently only working for Mysql. The problem is that the union PR will have substantial changes as there was a lot of changes to the beta branch of drizzle.

@neil-ptr neil-ptr changed the base branch from main to beta October 6, 2023 03:17
@AndriiSherman
Copy link
Member

@neilZon thanks for your work!
@Angelelz was first to start working on it together with union feature. You are free to continue, if you want, but we are working with @Angelelz for some time already and discussing a proper typing and API and I guess we will continue with his work. We would also appreciate if you can help him in his part of work as well!

@Angelelz
Copy link
Collaborator

Angelelz commented Oct 9, 2023

I think we should go back to assigning issues/features. Since we're receiving a lor more PRs than before.
I'm happy to assign a couple to me like we discussed over at discord.

@neil-ptr
Copy link
Author

neil-ptr commented Oct 9, 2023

@AndriiSherman, all good! I really want to contribute to this project so I'll pick up another issue, should I close out this PR?

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.

Support WITH RECURSIVE
3 participants