UNPKG

nestjs-reverse-engineering

Version:

A powerful TypeScript/NestJS library for database reverse engineering, entity generation, and CRUD operations

40 lines 1.12 kB
import { TableSchema } from '../types/database.types'; export interface EntityParseOptions { entitiesPath: string; filePattern: string; } export declare class EntityParser { /** * Parse TypeORM entity files and extract table schemas */ static parseEntityFiles(options: EntityParseOptions): Promise<TableSchema[]>; /** * Parse a single entity file and extract table schema */ private static parseEntityFile; /** * Get table name from class name if not specified in @Entity */ private static getTableNameFromClass; /** * Parse columns from entity file content */ private static parseColumns; /** * Parse column options from decorator string */ private static parseColumnOptions; /** * Map TypeScript type to column type */ private static mapTsTypeToColumnType; /** * Convert camelCase to snake_case */ private static camelToSnakeCase; /** * Extract table comment from class comment */ private static extractTableComment; } //# sourceMappingURL=entity-parser.d.ts.map