MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / handler

Method handler

packages/cli/src/commands/ImportCommand.ts:16–22  ·  view source on GitHub ↗

* @inheritDoc

(args: ArgumentsCamelCase<ImportArgs>)

Source from the content-addressed store, hash-verified

14 * @inheritDoc
15 */
16 async handler(args: ArgumentsCamelCase<ImportArgs>) {
17 const orm = await CLIHelper.getORM(args.contextName, args.config, { multipleStatements: true });
18 const buf = await readFile(args.file);
19 await orm.em.getConnection().executeDump(buf.toString());
20 CLIHelper.dump(colors.green(`File ${args.file} successfully imported`));
21 await orm.close(true);
22 }
23}

Callers

nothing calls this directly

Calls 7

readFileFunction · 0.85
getORMMethod · 0.80
dumpMethod · 0.80
getConnectionMethod · 0.65
closeMethod · 0.65
executeDumpMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected