Closed
Description
const result = parseQuerySync(`select from test_table WHERE status = 'complete'::text`);
const stmts = result.stmts.map(mapStmt);
deparse(stmts, {})
=>
deparser/deparser.ts:720
if (node.val.String) {
^
TypeError: Cannot read properties of undefined (reading 'String')
after fix:
https://github.com/launchql/pgsql-parser/blob/main/packages/deparser/src/deparser.ts#L720
if (node.val.String) {
=> if (node?.val?.String) {
result is
SELECT FROM test_table WHERE null::undefined
Metadata
Metadata
Assignees
Labels
No labels