undeexcepturi
Version:
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 JavaScript.
16 lines (11 loc) • 560 B
text/typescript
import type { FilterQuery, FindOptions, Loaded } from '@mikro-orm/core';
import { EntityRepository } from '@mikro-orm/mongodb';
import type { Author } from '../entities';
export class AuthorRepository extends EntityRepository<Author> {
magic(data: string): string {
return `111 ${data} 222`;
}
override async find<P extends string = never, F extends string = '*', E extends string = never>(where: FilterQuery<Author> = {}, options?: FindOptions<Author, P, F, E>): Promise<Loaded<Author, P, F, E>[]> {
return super.find(where, options);
}
}