quaerateum
Version:
Simple typescript ORM for node.js based on data-mapper, unit-of-work and identity-map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JS.
34 lines (26 loc) • 743 B
text/typescript
export interface NamingStrategy {
/**
* Return a table name for an entity class
*/
classToTableName(entityName: string): string;
/**
* Return a column name for a property
*/
propertyToColumnName(propertyName: string): string;
/**
* Return the default reference column name
*/
referenceColumnName(): string;
/**
* Return a join column name for a property
*/
joinColumnName(propertyName: string): string;
/**
* Return a join table name
*/
joinTableName(sourceEntity: string, targetEntity: string, propertyName?: string): string;
/**
* Return the foreign key column name for the given parameters
*/
joinKeyColumnName(entityName: string, referencedColumnName?: string): string;
}