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.
30 lines (21 loc) • 653 B
text/typescript
import { NamingStrategy, UnderscoreNamingStrategy } from '../naming-strategy';
import { Platform } from './Platform';
import { PostgreSqlSchemaHelper } from '../schema/PostgreSqlSchemaHelper';
export class PostgreSqlPlatform extends Platform {
protected schemaHelper = new PostgreSqlSchemaHelper();
supportsSavePoints(): boolean {
return true;
}
getNamingStrategy(): { new(): NamingStrategy} {
return UnderscoreNamingStrategy;
}
getParameterPlaceholder(index?: number): string {
return '$' + index;
}
usesReturningStatement(): boolean {
return true;
}
usesCascadeStatement(): boolean {
return true;
}
}