knex js insert two rows

Solutions on MaxInterview for knex js insert two rows by the best coders in the world

showing results for - "knex js insert two rows"
Marta
28 Aug 2020
1let dataList = bookshelf.Collection.extend({
2	model: ModelName,
3});
4
5let multipleSaved = dataList.forge([...Your_listOfData]);
6
7multipleSaved
8.invokeThen("save")
9.then(() => {...})
10.catch(err=>{...})
Agathe
26 Jan 2016
1  .insert([
2    { name: 'Starsky' },
3    { name: 'Hutch' }
4  ])
5