UNPKG

@dataql/node

Version:

DataQL core SDK for unified data management with MongoDB and GraphQL - Production Multi-Cloud Ready

24 lines (23 loc) 962 B
/** * Utility functions for unique document creation */ /** * Identifies which fields in a schema should be excluded from uniqueness comparison * @param schema The schema object to analyze * @returns Array of field names to exclude (ID fields and subdocument fields) */ export declare function getExcludedFieldsForComparison(schema: any): string[]; /** * Extracts comparable fields from a document, excluding ID and subdocument fields * @param document The document to extract fields from * @param schema The schema to determine which fields to exclude * @returns Object with only comparable fields */ export declare function extractComparableFields(document: any, schema: any): any; /** * Checks if two objects have matching field values * @param obj1 First object to compare * @param obj2 Second object to compare * @returns True if all fields match, false otherwise */ export declare function areFieldsMatching(obj1: any, obj2: any): boolean;