-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
const SQLParser = require('@synatic/noql');
Promise.resolve()
.then(async function () {
const query = `select A.name, B.name, C.name
from \`user-books\` as UB, books as B, users as A, authors as C
where UB.book = B._id AND UB.user = A._id AND B.author = C._id
`;
const parsedSQL = SQLParser.parseSQL(query);
console.log(parsedSQL);
})
.catch(err => console.error(err));
Throws an error
TypeError: Cannot read properties of undefined (reading 'left')
at shouldPrefixSide ($project\node_modules\@synatic\noql\lib\make\makeJoinForPipeline.js:236
:30)
at makeJoinPart ($project\node_modules\@synatic\noql\lib\make\makeJoinForPipeline.js:104:24)
at Object.makeJoinForPipeline ($project\node_modules\@synatic\noql\lib\make\makeJoinForPipel
ine.js:48:9)
at Object.makeAggregatePipeline ($project\node_modules\@synatic\noql\lib\make\makeAggregateP
ipeline.js:234:52)
at makeMongoAggregate ($project\node_modules\@synatic\noql\lib\make\index.js:26:47)
at SQLParser.parseSQL ($project\node_modules\@synatic\noql\lib\SQLParser.js:69:16)
at $project\index.js:11:30
Metadata
Metadata
Assignees
Labels
No labels