@mikro-orm/sql
Advanced tools
+2
-2
| { | ||
| "name": "@mikro-orm/sql", | ||
| "version": "7.1.9-dev.17", | ||
| "version": "7.1.9-dev.18", | ||
| "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.", | ||
@@ -56,3 +56,3 @@ "keywords": [ | ||
| "peerDependencies": { | ||
| "@mikro-orm/core": "7.1.9-dev.17" | ||
| "@mikro-orm/core": "7.1.9-dev.18" | ||
| }, | ||
@@ -59,0 +59,0 @@ "engines": { |
@@ -57,2 +57,4 @@ import { type ClearDatabaseOptions, type CreateSchemaOptions, type DropSchemaOptions, type EnsureDatabaseOptions, type EntityMetadata, type ISchemaGenerator, type MikroORM, type Options, type Transaction, type UpdateSchemaOptions } from '@mikro-orm/core'; | ||
| }): Promise<void>; | ||
| /** Whether the statement has to be the first one in a query batch, e.g. `create trigger` on MSSQL. */ | ||
| protected startsBatch(_statement: string): boolean; | ||
| dropTableIfExists(name: string, schema?: string): Promise<void>; | ||
@@ -59,0 +61,0 @@ private wrapSchema; |
@@ -446,3 +446,4 @@ import { CommitOrderCalculator, TableNotFoundException, Utils, } from '@mikro-orm/core'; | ||
| for (const line of lines) { | ||
| if (line.trim() === '') { | ||
| const stmt = line.trim(); | ||
| if (stmt === '') { | ||
| if (groups[i]?.length > 0) { | ||
@@ -453,4 +454,8 @@ i++; | ||
| } | ||
| // same boundary an empty line creates, for statements that have to start their own batch | ||
| if (groups[i]?.length > 0 && this.startsBatch(stmt)) { | ||
| i++; | ||
| } | ||
| groups[i] ??= []; | ||
| groups[i].push(line.trim()); | ||
| groups[i].push(stmt); | ||
| } | ||
@@ -476,2 +481,6 @@ if (groups.length === 0) { | ||
| } | ||
| /** Whether the statement has to be the first one in a query batch, e.g. `create trigger` on MSSQL. */ | ||
| startsBatch(_statement) { | ||
| return false; | ||
| } | ||
| async dropTableIfExists(name, schema) { | ||
@@ -478,0 +487,0 @@ const sql = this.helper.dropTableIfExists(name, schema); |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
1061587
0.05%22154
0.05%