UNPKG

axiodb

Version:

A blazing-fast, lightweight, and scalable nodejs package based DBMS for modern application. Supports schemas, encryption, and advanced query capabilities.

26 lines (25 loc) 978 B
import { ErrorInterface, SuccessInterface } from "../../config/Interfaces/Helper/response.helper.interface"; /** * Class representing an insertion operation. */ export default class Insertion { private readonly collectionName; private readonly path; private readonly Converter; /** * Creates an instance of Insertion. * @param {string} collectionName - The name of the collection. * @param {string | any} path - The data to be inserted. */ constructor(collectionName: string, path: string | any); /** * Saves the data to a file. * @returns {Promise<any>} A promise that resolves with the response of the save operation. */ Save(data: object | any, ExistingdocumentId?: string): Promise<SuccessInterface | ErrorInterface>; /** * Generates a unique document ID. * @returns {Promise<string>} A promise that resolves with a unique document ID. */ generateUniqueDocumentId(): Promise<string>; }