UNPKG

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.

16 lines (10 loc) 265 B
import { IPrimaryKey } from '../decorators'; export class EntityIdentifier { constructor(private value?: IPrimaryKey) { } setValue(value: IPrimaryKey): void { this.value = value; } getValue<T = IPrimaryKey>(): T { return this.value as T; } }