@mikro-orm/sql
Advanced tools
@@ -51,8 +51,6 @@ import { type ControlledTransaction, type Dialect, Kysely } from 'kysely'; | ||
| stream<T extends EntityData<AnyEntity>>(query: string | NativeQueryBuilder | RawQueryFragment, params?: readonly unknown[], ctx?: Transaction<Kysely<any>>, loggerContext?: LoggingOptions): AsyncIterableIterator<T>; | ||
| /** | ||
| * Execute raw SQL queries from file | ||
| */ | ||
| loadFile(path: string): Promise<void>; | ||
| /** @inheritDoc */ | ||
| executeDump(dump: string): Promise<void>; | ||
| private getSql; | ||
| protected transformRawResult<T>(res: any, method?: 'all' | 'get' | 'run'): T; | ||
| } |
@@ -199,11 +199,7 @@ import { CompiledQuery, Kysely } from 'kysely'; | ||
| } | ||
| /** | ||
| * Execute raw SQL queries from file | ||
| */ | ||
| async loadFile(path) { | ||
| /** @inheritDoc */ | ||
| async executeDump(dump) { | ||
| await this.ensureConnection(); | ||
| const { readFile } = globalThis.process.getBuiltinModule('node:fs/promises'); | ||
| const buf = await readFile(path); | ||
| try { | ||
| const raw = CompiledQuery.raw(buf.toString()); | ||
| const raw = CompiledQuery.raw(dump); | ||
| await this.getClient().executeQuery(raw); | ||
@@ -210,0 +206,0 @@ } |
+2
-2
| { | ||
| "name": "@mikro-orm/sql", | ||
| "version": "7.0.0-dev.105", | ||
| "version": "7.0.0-dev.106", | ||
| "description": "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.", | ||
@@ -59,4 +59,4 @@ "type": "module", | ||
| "peerDependencies": { | ||
| "@mikro-orm/core": "7.0.0-dev.105" | ||
| "@mikro-orm/core": "7.0.0-dev.106" | ||
| } | ||
| } |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
628562
-0.03%13323
-0.05%