Skip to main content
Module

x/typeorm/src/index.ts>Repository#save

Forked from https://github.com/typeorm/typeorm
Latest
method Repository.prototype.save
Re-export
import { Repository } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/index.ts";

Saves all given entities in the database. If entities do not exist in the database then inserts, otherwise updates.

Type Parameters

T extends DeepPartial<Entity>

Parameters

entities: T[]
options: SaveOptions & { reload: false; }

Returns

Promise<T[]>

Saves all given entities in the database. If entities do not exist in the database then inserts, otherwise updates.

Type Parameters

T extends DeepPartial<Entity>

Parameters

entities: T[]
optional
options: SaveOptions

Returns

Promise<(T & Entity)[]>

Saves a given entity in the database. If entity does not exist in the database then inserts, otherwise updates.

Type Parameters

T extends DeepPartial<Entity>

Parameters

entity: T
options: SaveOptions & { reload: false; }

Returns

Promise<T>

Saves a given entity in the database. If entity does not exist in the database then inserts, otherwise updates.

Type Parameters

T extends DeepPartial<Entity>

Parameters

entity: T
optional
options: SaveOptions

Returns

Promise<T & Entity>