-
Notifications
You must be signed in to change notification settings - Fork 6
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
implement dbshell #20
Conversation
In looking at https://www.mongodb.com/docs/mongodb-shell/write-scripts/, I don't see any advantage to using dbshell to execute JavaScript files. The JavaScript has to make its own connection to MongoDB... there's no way to use Django's connection. So let's omit that functionality. My guess is that most Python developers using Django will want to write Python scripts, not JavaScript! For the commit message, use:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squash into a single commit for merge or else we can use the "squash and merge" green button.
django_mongodb/client.py
Outdated
|
||
@classmethod | ||
def settings_to_cmd_args_env(cls, settings_dict, parameters): | ||
raise NotImplementedError | ||
def settings_to_cmd_args_env(cls, settings_dict, parameters): # noqa: ARG003 parameters argument is not being used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could shorten that a bit: # noqa: ARG003 parameters unused
django_mongodb/client.py
Outdated
|
||
host = settings_dict["HOST"] | ||
port = settings_dict["PORT"] | ||
dbname = settings_dict["NAME"] or "test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove "test" now that parameters are gone
fixes #3
Implementation of MongoDB connection setup method in DatabaseClient class.
Description:
This PR introduces the
settings_to_cmd_args_env
method in theDatabaseClient
class.Limitations:
awsIamSessionToken
.Feedback and contributions are welcomed to address these limitations and refine the implementation.