add params
This commit is contained in:
		@ -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;
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user