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

Function getJsonIndexDefinition

packages/sql/src/AbstractSqlPlatform.ts:133–142  ·  view source on GitHub ↗
(index: IndexDef)

Source from the content-addressed store, hash-verified

131 }
132
133 override getJsonIndexDefinition(index: IndexDef): string[] {
134 return index.columnNames.map(column => {
135 if (!column.includes('.')) {
136 return column;
137 }
138
139 const [root, ...path] = column.split('.');
140 return `(json_extract(${root}, '$.${path.join('.')}'))`;
141 });
142 }
143
144 override supportsUnionWhere(): boolean {
145 return true;

Callers

nothing calls this directly

Calls 2

joinMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected