update()

Usage

import { useRepo } from 'pinia-orm'import User from './models/User'const userRepo = useRepo(User)// update specific recorduserRepo.update({ id: 1, age: 50 })// update specific recordsuserRepo.update([{ id: 1, age: 50 }, { id: 2, age: 50 }])// throws an warning if the record to update is not founduserRepo.update({ id: 999, age: 50 })

Typescript Declarations

function update(records: Element | Element[]): M | M[]