function getCurrentId () {
var data;
var query = "INSERT INTO photos (path) VALUES (''); SELECT SCOPE_IDENTITY() AS id ";
var request = new mssql.Request(connection);
return new Promise(function(resolve, reject) {
request.query(query, function(err, data) {
resolve(data.recordset)
});
})
}
var main = async () =>{
var quote = await getCurrentId();
return quote; enter code here
};
我想要返回值,而不是打印。