Skip to content

Commit

Permalink
Adding canQuery to public interface
Browse files Browse the repository at this point in the history
  • Loading branch information
eXigentCoder committed Jun 23, 2022
1 parent cd8f7bc commit f29e460
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/SQLParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ class SQLParser {
static makeMongoQuery(sqlOrAST, options) {
return makeMongoQuery(sqlOrAST, options);
}
/**
* Checks whether a mongo query can be performed or an aggregate is required
*
* @param {import('./types').ParserInput} sqlOrAST - the SQL statement or AST to parse
* @param {import('./types').ParserOptions} [options] - the parser options
* @returns {boolean}
* @throws
*/
static canQuery(sqlOrAST, options) {
return canQuery(sqlOrAST, options);
}
}

module.exports = SQLParser;

0 comments on commit f29e460

Please sign in to comment.