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

anyway to see translation from ORM->SQL->mongodb(like advertised on djongomapper site) #691

Open
Assassin9520 opened this issue Apr 3, 2024 · 0 comments

Comments

@Assassin9520
Copy link

Assassin9520 commented Apr 3, 2024

One line description of the issue

I want to see the transpiled(translated) query from DjangoORM -> SQL -> mongodb.
How can i see it?

Python script

content_db_exact = Domains.objects.filter(domains__startswith='{"0": ')
#for example i want to see how this query will translate into pymongo(mongodb) query?
i need this for deeper research and cannot see it anywhere in the djongomapper docs.

Example of my need:
#python type:
Context.objects.filter(someField__contains="something")
#retrieve mongodb djongo translate output
I know that djongo translates something like this internally:
filter = {
'blog.name': {
'$regex': '^Beatles.*$'
}
}

How can i output this? i need it for testing.

Traceback

NO_traceback

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