axiodb
Version:
The Pure JavaScript Alternative to SQLite. Embedded NoSQL database for Node.js with MongoDB-style queries, zero native dependencies, built-in InMemoryCache, and web GUI. Perfect for desktop apps, CLI tools, and embedded systems. No compilation, no platfor
26 lines (25 loc) • 978 B
TypeScript
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>;
}