Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

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

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

Return the table name followed by a field name. Can also rename a field using nameAs.

Flight.field("departure") => "flights.departure"

Flight.field("id", "flight_id") => { flight_id: "flights.id" }

Parameters

field: string

Returns

string

Parameters

field: string
nameAs: string