Skip to main content
Module

x/cotton/mod.ts>BaseModel

SQL Database Toolkit for Deno
Latest
class BaseModel
Abstract
import { BaseModel } from "https://deno.land/x/cotton@v0.7.5/mod.ts";

Manage your models directly from the model class.

Methods

remove(): Promise<this>

Remove current model from the database.

save(): Promise<this>

Saves current model to the database.

Static Properties

private
manager: Manager

Static Methods

query<T extends BaseModel>(this: ObjectType<T>): ModelQuery<T>

Find records that match given conditions from the database.