Module

x/kysely_postgrs_js_dialect/deps.ts>kysely.SchemaModule#createView

Kysely dialect for PostgreSQL using the Postgres.js client.
method kysely.SchemaModule.prototype.createView
import { kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.3/deps.ts";
const { SchemaModule } = kysely;

Create a new view.

Examples

await db.schema
  .createView('dogs')
  .orReplace()
  .as(db.selectFrom('pet').selectAll().where('species', '=', 'dog'))
  .execute()

Parameters

viewName: string