UNPKG

@travetto/model-sql

Version:

SQL backing for the travetto model module, with real-time modeling support for SQL schemas.

45 lines (44 loc) 734 B
import { Config } from '@travetto/config'; import { asFull, Runtime } from '@travetto/runtime'; /** * SQL Model Config */ @Config('model.sql') export class SQLModelConfig<T extends {} = {}> { /** * Host to connect to */ host = '127.0.0.1'; /** * Default port */ port = 0; /** * Username */ user = Runtime.production ? '' : 'travetto'; /** * Password */ password = Runtime.production ? '' : 'travetto'; /** * Table prefix */ namespace = ''; /** * Database name */ database = 'app'; /** * Allow storage modification at runtime */ modifyStorage?: boolean; /** * Db version */ version = ''; /** * Raw client options */ options: T = asFull({}); }