Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cotton/src/utils/models.ts>setSaved

SQL Database Toolkit for Deno
Latest
function setSaved
import { setSaved } from "https://deno.land/x/cotton@v0.7.5/src/utils/models.ts";

Update the isSaved status of a model, save the original value, and populate model with default values.

Parameters

model: Object

the model you want to change the status of

value: boolean

the status of the model (saved or not saved)