mongodb-rag-core
Version:
Common elements used by MongoDB Chatbot Framework components.
28 lines (26 loc) • 1.07 kB
TypeScript
import { MongoClient } from "mongodb";
import { DatabaseExecutionResult } from "./DatabaseExecutionResult";
export interface ExecuteGeneratedDriverCodeParams {
/**
MongoDB client instance to use for executing the generated driver code.
*/
mongoClient: MongoClient;
/**
The generated driver code to execute.
@example database.collection("myCollection").find({}).toArray();
*/
generatedDriverCode: string;
/**
The name of the database to use for executing the generated driver code.
*/
databaseName: string;
}
/**
Execute the Node.js driver code using the provided MongoDB client instance.
This function expects that the driver code
uses the `database` variable of type `Db` to access the MongoDB database.
If you do not provide a `database` variable in the driver code,
this function will not work as expected.
*/
export declare function executeNodeJsDriverCode(params: ExecuteGeneratedDriverCodeParams): Promise<DatabaseExecutionResult>;
//# sourceMappingURL=executeNodeJsDriverCode.d.ts.map