Initial commit - Event Planner application
This commit is contained in:
27
node_modules/@mikro-orm/sql/SqlEntityRepository.js
generated
vendored
Normal file
27
node_modules/@mikro-orm/sql/SqlEntityRepository.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import { EntityRepository } from '@mikro-orm/core';
|
||||
/** SQL-specific entity repository with QueryBuilder support. */
|
||||
export class SqlEntityRepository extends EntityRepository {
|
||||
em;
|
||||
constructor(em, entityName) {
|
||||
super(em, entityName);
|
||||
this.em = em;
|
||||
}
|
||||
/**
|
||||
* Creates a QueryBuilder instance
|
||||
*/
|
||||
createQueryBuilder(alias) {
|
||||
return this.getEntityManager().createQueryBuilder(this.entityName, alias);
|
||||
}
|
||||
/**
|
||||
* Shortcut for `createQueryBuilder()`
|
||||
*/
|
||||
qb(alias) {
|
||||
return this.createQueryBuilder(alias);
|
||||
}
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
getEntityManager() {
|
||||
return this.em;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user