Initial commit - Event Planner application

This commit is contained in:
mberlin
2026-03-18 14:55:56 -03:00
commit 86d779eb4d
7548 changed files with 1006324 additions and 0 deletions

61
node_modules/@mikro-orm/sql/SqlEntityManager.js generated vendored Normal file
View File

@@ -0,0 +1,61 @@
import { EntityManager } from '@mikro-orm/core';
import { MikroKyselyPlugin } from './plugin/index.js';
/**
* @inheritDoc
*/
export class SqlEntityManager extends EntityManager {
/**
* Creates a QueryBuilder instance
*/
createQueryBuilder(entityName, alias, type, loggerContext) {
const context = this.getContext(false);
return this.driver.createQueryBuilder(
entityName,
context.getTransactionContext(),
type,
true,
loggerContext ?? context.loggerContext,
alias,
this,
);
}
/**
* Shortcut for `createQueryBuilder()`
*/
qb(entityName, alias, type, loggerContext) {
return this.createQueryBuilder(entityName, alias, type, loggerContext);
}
/**
* Returns configured Kysely instance.
*/
getKysely(options = {}) {
let kysely = this.getConnection(options.type).getClient();
if (
options.columnNamingStrategy != null ||
options.tableNamingStrategy != null ||
options.processOnCreateHooks != null ||
options.processOnUpdateHooks != null ||
options.convertValues != null
) {
kysely = kysely.withPlugin(new MikroKyselyPlugin(this, options));
}
return kysely;
}
/** Executes a raw SQL query, using the current transaction context if available. */
async execute(query, params = [], method = 'all', loggerContext) {
return this.getDriver().execute(
query,
params,
method,
this.getContext(false).getTransactionContext(),
loggerContext,
);
}
getRepository(entityName) {
return super.getRepository(entityName);
}
applyDiscriminatorCondition(entityName, where) {
// this is handled in QueryBuilder now for SQL drivers
return where;
}
}