add params

This commit is contained in:
HSunboy 2018-08-28 11:35:00 +08:00
parent 4d1b0a3838
commit d789e06e41

View File

@ -29,14 +29,26 @@ function parseSyntax(sql, type) {
if (typeof type == "undefined") { if (typeof type == "undefined") {
type = "hive" type = "hive"
} }
return sqlSyntaxParser.parser.parseSyntax(sql, '', type, false) let sql1=sql;
let sql2='';
if(sql instanceof Array){
sql1=sql[0];
sql2=sql[1];
}
return sqlSyntaxParser.parser.parseSyntax(sql1, sql2, type, false)
} }
function parserSql(sql, type) { function parserSql(sql, type) {
if (typeof type == "undefined") { if (typeof type == "undefined") {
type = "hive" type = "hive"
} }
return sqlAutoCompleteParser.parser.parseSql(sql, '', type, false) let sql1=sql;
let sql2='';
if(sql instanceof Array){
sql1=sql[0];
sql2=sql[1];
}
return sqlAutoCompleteParser.parser.parseSql(sql1, sql2, type, false)
} }
exports.parse = parse; exports.parse = parse;