@mikro-orm/sql
Advanced tools
@@ -324,6 +324,12 @@ import { DeferMode, EnumType, Type, Utils } from '@mikro-orm/core'; | ||
| const ret = {}; | ||
| const seen = new Set(); | ||
| for (const check of allChecks) { | ||
| const key = this.getTableKey(check); | ||
| const dedupeKey = `${key}:${check.name}`; | ||
| if (seen.has(dedupeKey)) { | ||
| continue; | ||
| } | ||
| seen.add(dedupeKey); | ||
| ret[key] ??= []; | ||
| const m = check.expression.match(/^check \(\((.*)\)\)$/i); | ||
| const m = check.expression.match(/^check \(\((.*)\)\)$/is); | ||
| const def = m?.[1].replace(/\((.*?)\)::\w+/g, '$1'); | ||
@@ -706,3 +712,3 @@ ret[key].push({ | ||
| join pg_class cls on pgc.conrelid = cls.oid | ||
| join information_schema.constraint_column_usage ccu on pgc.conname = ccu.constraint_name and nsp.nspname = ccu.constraint_schema | ||
| join information_schema.constraint_column_usage ccu on pgc.conname = ccu.constraint_name and nsp.nspname = ccu.constraint_schema and cls.relname = ccu.table_name | ||
| where contype = 'c' and (${[...tablesBySchemas.entries()].map(([schema, tables]) => `ccu.table_name in (${tables.map(t => this.platform.quoteValue(t.table_name)).join(',')}) and ccu.table_schema = ${this.platform.quoteValue(schema)}`).join(' or ')}) | ||
@@ -709,0 +715,0 @@ order by pgc.conname`; |
+2
-2
| { | ||
| "name": "@mikro-orm/sql", | ||
| "version": "7.0.0-dev.283", | ||
| "version": "7.0.0-dev.284", | ||
| "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.283" | ||
| "@mikro-orm/core": "7.0.0-dev.284" | ||
| } | ||
| } |
Sorry, the diff of this file is too big to display
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
915480
0.03%16281
0.04%92
1.1%