Class PgType<Type>

This is a simple wrapper class to represent a Postgres type that will be used to define a table. It also provides a fluent API to set properties of the column (e.g. nullability). You can easily create your own custom types by instantiating this class.

const myCustomType = new PgType<Nullable<string>>("myCustomType");

Type Parameters

  • Type

Hierarchy

Constructors

Properties

_nullable: boolean
_tag: string = "PgType"
dbType: string

Methods