demos/moviedb/demo-binding.js
function addSampleData() {
  return Promise.all([
    insertPersonData('actor.json', db.getSchema().table('Actor')),
    insertPersonData('director.json', db.getSchema().table('Director')),
    insertData('movie.json', db.getSchema().table('Movie')),
    insertData('movieactor.json', db.getSchema().table('MovieActor')),
    insertData('moviedirector.json', db.getSchema().table('MovieDirector')),
    insertData('moviegenre.json', db.getSchema().table('MovieGenre'))
  ]).then(function(queries) {
    var tx = db.createTransaction();
    return tx.exec(queries);
  });
}
function addSampleData() {
  return Promise.all([
    insertPersonData('actor.json', db.getSchema().table('Actor')),
    insertPersonData('director.json', db.getSchema().table('Director')),
    insertData('movie.json', db.getSchema().table('Movie')),
    insertData('movieactor.json', db.getSchema().table('MovieActor')),
    insertData('moviedirector.json', db.getSchema().table('MovieDirector')),
    insertData('moviegenre.json', db.getSchema().table('MovieGenre'))
  ]).then(function(queries) {
    var tx = db.createTransaction();
    return tx.exec(queries);
  });
}
function addSampleData ( ) { return Promise . all ( [ insertPersonData ( 'actor.json' , db . getSchema ( ) . table ( 'Actor' ) ) , insertPersonData ( 'director.json' , db . getSchema ( ) . table ( 'Director' ) ) , insertData ( 'movie.json' , db . getSchema ( ) . table ( 'Movie' ) ) , insertData ( 'movieactor.json' , db . getSchema ( ) . table ( 'MovieActor' ) ) , insertData ( 'moviedirector.json' , db . getSchema ( ) . table ( 'MovieDirector' ) ) , insertData ( 'moviegenre.json' , db . getSchema ( ) . table ( 'MovieGenre' ) ) ] ) . then ( function ( queries ) { var tx = db . createTransaction ( ) ; return tx . exec ( queries ) ; } ) ; }
Adds sample data to the database.
@return {!IThenable}
Adds sample data to the database .