Skip to content

Commit 661bed7

Browse files
feat: add RangeFunction context exclusion for funcformat to handle generate_series and chkrolattr functions
Co-Authored-By: Dan Lynch <[email protected]>
1 parent c61c712 commit 661bed7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/transform/src/transformers/v13-to-v14.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ export class V13ToV14Transformer {
184184
return false;
185185
}
186186

187+
if (this.isInRangeFunctionContext(context)) {
188+
return false;
189+
}
190+
187191
return true;
188192
}
189193

@@ -264,6 +268,13 @@ export class V13ToV14Transformer {
264268
);
265269
}
266270

271+
private isInRangeFunctionContext(context: TransformerContext): boolean {
272+
const path = context.path || [];
273+
return path.some((node: any) =>
274+
node && typeof node === 'object' && 'RangeFunction' in node
275+
);
276+
}
277+
267278
CallStmt(node: PG13.CallStmt, context: TransformerContext): any {
268279
const result: any = { ...node };
269280

0 commit comments

Comments
 (0)