UNPKG

artmapper

Version:

Spring Boot clone for Node.js with TypeScript/JavaScript - JPA-like ORM, Lombok decorators, dependency injection, and MySQL support

35 lines 846 B
import 'reflect-metadata'; import { Pool } from 'mysql2/promise'; export declare class SchemaGenerator { private pool; constructor(pool: Pool); /** * Generate and execute CREATE TABLE statements for all entities */ generateSchema(entities: Function[]): Promise<void>; /** * Create a table for an entity */ private createTable; /** * Check if a table exists */ private tableExists; /** * Convert TypeScript type to SQL type */ private getSqlType; /** * Check if a type is numeric */ private isNumericType; /** * Escape string for SQL */ private escapeString; /** * Drop all tables for entities (use with caution!) */ dropSchema(entities: Function[]): Promise<void>; } //# sourceMappingURL=SchemaGenerator.d.ts.map