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

Function unquoteIdentifier

packages/sql/src/schema/partitioning.ts:169–177  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

167};
168
169const unquoteIdentifier = (value: string): string => {
170 const trimmed = value.trim();
171
172 if (trimmed.length >= 2 && trimmed.startsWith('"') && trimmed.endsWith('"')) {
173 return trimmed.slice(1, -1).replaceAll('""', '"');
174 }
175
176 return trimmed;
177};
178
179/**
180 * Split a user-supplied partition name into `{ schema, name }`. Supports bare (`child`),

Callers 1

splitPartitionNameFunction · 0.85

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected