UNPKG

@techmmunity/symbiosis

Version:

Symbiosis - The Ultimate OM For All Databases

36 lines (35 loc) 1.5 kB
import type { EntityManager } from "../../entity-manager"; import type { CustomClass } from "../../entity-manager/types/metadata-type"; interface GetMultipleLevelColumnNameParams { entity: CustomClass; entityManager: EntityManager; /** * When the father function receives an string of multilevel columns, * like "columnOne.columnTwo.columnThree", it splits the string in an * array (Ex: ["columnOne", "columnTwo", "columnThree"]). * * This parameter is this raw value, with no modifications. It is used * to throw errors with more details. */ originalColumnsNames: Array<string>; /** * The array of columns that is handled inside the loop. * * The default values is the same as "originalColumnsNames", * because this function handles all the entity->database conversion, * and starts from the first item of "originalColumnsNames". * * Each time that it pass through the loop, the first it of the array * is removed, so the function can be called recursively * * Is an internal parameter and SHOULD NOT BE USED! */ currentColumnsNames?: Array<string>; /** * Accumulator to the database columns names * Is an internal parameter and SHOULD NOT BE USED! */ acc?: Array<string>; } export declare const getMultipleLevelColumnName: ({ entity, entityManager, originalColumnsNames, currentColumnsNames, acc, }: GetMultipleLevelColumnNameParams) => string; export {};