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

Is it possible to consider adding support for Oracle Database? #97

Open
smhegde-1979 opened this issue Dec 16, 2024 · 2 comments
Open

Comments

@smhegde-1979
Copy link

Currently, django-cte hard codes "WITH RECURSIVE" based on postgres recommendations. This is just a straight up syntax error. This unfortunately restricts use to postgres (and other DBs that support RECURSIVE).

Is it possible / feasible to consider adding support for Oracle back-end?

Also, we already have a custom Manager for our models, so are there any examples of using CTEManager in addition to our manager?
I think inheriting from django_cte classes has some issues. For e.g. in "With.queryset", an object of CTEQuery is directly instantiated so any subclass I have created from CTEQuery gets ignored.

@millerdev
Copy link
Contributor

@smhegde-1979 would it work on Oracle if the RECURSIVE keyword were added on recursive queries only, or are other changes required in addition to that?

Also, we already have a custom Manager for our models, so are there any examples of using CTEManager in addition to our manager?

Have you looked at the Custom QuerySets and Managers documentation? Is it possible to make your custom manager extend CTEManager?

in "With.queryset", an object of CTEQuery is directly instantiated so any subclass I have created from CTEQuery gets ignored.

Can you provide a code example that demonstrates the issue and report it as a new issue, please?

@smhegde-1979
Copy link
Author

Regarding your first question - If the RECURSIVE keyword is removed, I believe it works for my straightforward use cases.
Regarding the custom-managers, yes I looked into that and that is what I am doing. Good to know that is the way.

For the RECURSIVE keyword realted changes itself, would you need a code example? Really, its any of your examples but the back-end needs to be oracle to reproduce this issue.

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

2 participants