Skip to content

postgrelize / InsertFromOptions

Type Alias: InsertFromOptions<T> ​

InsertFromOptions<T> = QueryOptionsBase & Readonly<{ columns: readonly (keyof T & string)[]; onConflict?: OnConflictOptions<T>; returningOld?: boolean; }>

Defined in: src/model/write-options.ts:151

postgrelize extension

Options of Model.insertFrom, which inserts the result of a subquery (INSERT ... SELECT). PostgreSQL extension.

Type Parameters ​

T ​

T = Values

See ​

Model.insertFrom

Example ​

ts
const opts: InsertFromOptions<Task> = {
  columns: ['title', 'projectId'],
  onConflict: { action: 'nothing' },
};

Released under the MIT License.