⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
[X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
[X] I'm not able to find an open issue that requests the same enhancement
Problem
Description:
Currently, the database context provider supports Sqlite, Postgres, and MySQL databases. To enhance its versatility and accommodate a wider range of use cases, it is proposed to add support for MongoDB.
Solution
Proposed Changes:
Extend the connection_type enum:
Add the mongodb option to the connection_type enum.
Define MongoDB-specific connection parameters:
Introduce the following parameters within the mongodb connection object:
host (string): The hostname or IP address of the MongoDB server.
port (number): The port number on which the MongoDB server is listening.
username (string): The username for authentication.
password (string): The password for authentication.
database (string): The name of the database to connect to.
authSource (string): The name of the authentication database (optional).
replicaSet (string): The name of the replica set (optional).
ssl (boolean): Whether to enable SSL/TLS encryption (optional).
Implement MongoDB connection logic:
Utilize a suitable MongoDB driver (e.g., pymongo) to establish a connection using the provided parameters.
Handle authentication, replica set configuration, and SSL/TLS settings as needed.
Validations
Problem
Description:
Currently, the database context provider supports Sqlite, Postgres, and MySQL databases. To enhance its versatility and accommodate a wider range of use cases, it is proposed to add support for MongoDB.
Solution
Proposed Changes:
Extend the
connection_type
enum:mongodb
option to theconnection_type
enum.Define MongoDB-specific connection parameters:
mongodb
connection object:host
(string): The hostname or IP address of the MongoDB server.port
(number): The port number on which the MongoDB server is listening.username
(string): The username for authentication.password
(string): The password for authentication.database
(string): The name of the database to connect to.authSource
(string): The name of the authentication database (optional).replicaSet
(string): The name of the replica set (optional).ssl
(boolean): Whether to enable SSL/TLS encryption (optional).Implement MongoDB connection logic:
pymongo
) to establish a connection using the provided parameters.Example Configuration:
Benefits: