Skip to content

postgrelize / ReferenceOptions

Type Alias: ReferenceOptions ​

ReferenceOptions = Readonly<{ deferrable?: DeferrableValue; key?: string; model: string | ReferencedTable | ReferencedModel; }>

Defined in: src/model/attribute-options.ts:53

Foreign key target of an attribute.

Example ​

ts
const ref: ReferenceOptions = { model: 'Users', key: 'id', deferrable: Deferrable.INITIALLY_DEFERRED };

Released under the MIT License.