I was writing an automation script for DB manipulation in Prisma. I'm using PostgreSQL as my database. I noticed that whenever I omit "await" keyword on database updations, it wouldn't show any error but the database changes are not reflected.
// Does not work
prisma.model.create({
data: {
name: 'tai',
schema: {
abc: 8,
def: 8,
},
}
})
But once I use "await", the database does get updated. I skimmed through the documentation but did not have any luck. Can anybody explain the purpose of this behaviour. Also how they managed to implement it.
// Works
await prisma.model.create({
data: {
name: 'tai',
schema: {
abc: 8,
def: 8,
},
}
})