destroy()

Usage

import { useRepo } from 'pinia-orm'
import User from './models/User'
const userRepo = useRepo(User)
console.log(userRepo.destroy(1)) // User
console.log(userRepo.destroy([1,2,5])) // User[]
If you want also relations to be deleted with the deleted record look at Deleting Relationships

Typescript Declarations

function destroy(id: string | number): Item<M>
function destroy(ids: (string | number)[]): Collection<M>