Skip to content

Commit 803bd99

Browse files
authored
Merge pull request #218 from beeing/beeing-patch-1
fix: nested COALESCE in deparser
2 parents 5fa1f79 + 25287f6 commit 803bd99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/deparser/src/deparser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2258,7 +2258,7 @@ export class Deparser implements DeparserVisitor {
22582258
if (isSimpleArgument && (arg.includes('(') || arg.startsWith('-'))) {
22592259
} else {
22602260
const cleanTypeName = typeName.replace('pg_catalog.', '');
2261-
return `${arg}::${cleanTypeName}`;
2261+
return this.context.parens(`${arg}::${cleanTypeName}`);
22622262
}
22632263
}
22642264
}

0 commit comments

Comments
 (0)