Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/denodb/lib/model.ts>Model.update

MySQL, SQLite, MariaDB, PostgreSQL and MongoDB ORM for Deno
Latest
method Model.update
import { Model } from "https://deno.land/x/denodb@v1.4.0/lib/model.ts";

Update one or multiple records. Also update updated_at if timestamps is true.

await Flight.where("departure", "Dublin").update("departure", "Tokyo");

await Flight.where("departure", "Dublin").update({ destination: "Tokyo" });

Parameters

fieldOrFields: string | Values
optional
fieldValue: FieldValue