function doUpdate (body, res) {
    var db = new sqlite3.Database(file);
    db.serialize(function() {
        var stmt = db.prepare("INSERT INTO ytvids(vid_raga, vid_artist, vid_instrument, vid_ytid, vid_decade) VALUES (?, ?, ?, ?, ?)");
        stmt.run(body.raga,
                 body.artist,
                 body.instrument,
                 body.id,
                 1990,
                 function (err) {
                     res.json({ status: (err == null) ? "success" : "failure" });
                 });
        stmt.finalize(); //stmt cannot be used any more
    });
    db.close();
}
/**
 * Execute video details updation and send out response
 *
 * @param body json object sent in request
 * @param res http response object
*/
Execute video details updation and send out response
@param body json object sent in request
@param res http response object
Execute video details updation and send out response @param body json object sent in request @param res http response object
function doUpdate (body, res) {
    var db = new sqlite3.Database(file);
    db.serialize(function() {
        var stmt = db.prepare("INSERT INTO ytvids(vid_raga, vid_artist, vid_instrument, vid_ytid, vid_decade) VALUES (?, ?, ?, ?, ?)");
        stmt.run(body.raga,
                 body.artist,
                 body.instrument,
                 body.id,
                 1990,
                 function (err) {
                     res.json({ status: (err == null) ? "success" : "failure" });
                 });
        stmt.finalize(); 
    });
    db.close();
}
function doUpdate ( body , res ) { var db = new sqlite3 . Database ( file ) ; db . serialize ( function ( ) { var stmt = db . prepare ( "INSERT INTO ytvids(vid_raga, vid_artist, vid_instrument, vid_ytid, vid_decade) VALUES (?, ?, ?, ?, ?)" ) ; stmt . run ( body . raga , body . artist , body . instrument , body . id , 1990 , function ( err ) { res . json ( { status : ( err == null ) ? "success" : "failure" } ) ; } ) ; stmt . finalize ( ) ; } ) ; db . close ( ) ; }
Execute video details updation and send out response
 @param body json object sent in request
 @param res http response object
Execute video details updation and send out response @param body json object sent in request @param res http response object
//stmt cannot be used any more