Skip to main content
Module

x/typeorm/src/index.ts>EntityManager#insert

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

Inserts a given entity into the database. Unlike save method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient INSERT query. Does not check if entity exist in the database, so query will fail if duplicate entity is being inserted. You can execute bulk inserts using this method.

Parameters

target: ObjectType<Entity> | EntitySchema<Entity> | string
entity: QueryDeepPartialEntity<Entity> | (QueryDeepPartialEntity<Entity>[])

Returns

Promise<InsertResult>