Skip to main content
Module

x/denodb_esgi/mod.ts>Model.join

MySQL, SQLite, MariaDB, PostgreSQL and MongoDB ORM for Deno
Latest
method Model.join
import { Model } from "https://deno.land/x/denodb_esgi@1.0.15.1/mod.ts";

Join a table to the current query.

await Flight.where(
  Flight.field("departure"),
  "Paris",
).join(
  Airport,
  Airport.field("id"),
  Flight.field("airportId"),
).get()

Type Parameters

T extends ModelSchema

Parameters

this: T
joinTable: ModelSchema
originField: string
targetField: string