UNPKG

mongosuper

Version:

mongosuper is a superset of mongoose. It is a wrapper around mongoose. It manage your mongoose connection and keep it alive always. It also provide you some extra features like CRUD operations, etc.

45 lines 1.79 kB
type str = string; type bool = boolean; type globe = any; type int = number; export declare class Mongo { private MongoURL; private Database_Name; private ConnectionState; private NeverDisconnect; private Schema?; private models; private CollectionName?; private connection; private InstantConnect; private isTimeStamps; /** * This is a constructor function that initializes properties for a MongoDB connection, including * the URL and logging options. * @param {str} [MongoURL=mongodb://localhost:27017/test] - A string representing the URL of the * MongoDB database to connect to. The default value is 'mongodb://localhost:27017/test', which * connects to a local MongoDB instance on the default port and uses a database named 'test'. * @param {bool} [Log=true] - The "Log" parameter is a boolean value that determines whether or not * to enable logging. If set to true, the code will log information about the database connection. * If set to false, no logging will occur. */ constructor(Details: { MongoURL: str; Database_Name?: str; NeverDisconnect: bool; Schema?: globe; CollectionName?: str; isTimeStamps?: bool; }); private LogGen; private listen; Connect(): Promise<globe>; disconnect(): Promise<globe>; find(type?: str, Filter?: globe[], limit?: int, skip?: int): Promise<globe>; findAndCount(type?: str, Filter?: globe[], limit?: int, skip?: int): Promise<globe>; create(Data: globe): Promise<globe>; update(Filter: any[] | undefined, Data: globe, MultiUpdate?: bool): Promise<globe>; delete(Filter?: globe[], MultiDelete?: bool): Promise<globe>; } export {}; //# sourceMappingURL=Connection.d.ts.map