Skip to content

postgrelize / CreateOptions

Type Alias: CreateOptions<T> ​

CreateOptions<T> = SaveOptions<T> & object

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

Options of create.

Extends SaveOptions.

Type Parameters ​

T ​

T = Values

Type Declaration ​

include? ​

optional include?: IncludeOption

Create associated rows from nested values (Sequelize v6).

onConflict? ​

optional onConflict?: OnConflictOptions<T>

postgrelize extension

Advanced ON CONFLICT handling. PostgreSQL extension.

See ​

Model.create

Example ​

ts
const post = await Post.create(
  { title: 'Hello', author: { name: 'Ann' } },
  { include: [{ association: 'author' }], transaction },
);

Released under the MIT License.