不要怂,就是干,撸起袖子干!

Commit 4f098998 by javiertury Committed by Sushant

feat: support include option in bulkInsert (#11307)

1 parent de06ac3f
...@@ -152,7 +152,7 @@ describe(Support.getTestDialectTeaser('Model'), () => { ...@@ -152,7 +152,7 @@ describe(Support.getTestDialectTeaser('Model'), () => {
if (dialect === 'postgres') { if (dialect === 'postgres') {
expect(sql).to.include('INSERT INTO "Beers" ("id","style","createdAt","updatedAt") VALUES (DEFAULT'); expect(sql).to.include('INSERT INTO "Beers" ("id","style","createdAt","updatedAt") VALUES (DEFAULT');
} else if (dialect === 'mssql') { } else if (dialect === 'mssql') {
expect(sql).to.include('INSERT INTO [Beers] ([style],[createdAt],[updatedAt]) VALUES'); expect(sql).to.include('INSERT INTO [Beers] ([style],[createdAt],[updatedAt]) ');
} else { // mysql, sqlite } else { // mysql, sqlite
expect(sql).to.include('INSERT INTO `Beers` (`id`,`style`,`createdAt`,`updatedAt`) VALUES (NULL'); expect(sql).to.include('INSERT INTO `Beers` (`id`,`style`,`createdAt`,`updatedAt`) VALUES (NULL');
} }
......
...@@ -741,6 +741,11 @@ export interface BulkCreateOptions extends Logging, Transactionable { ...@@ -741,6 +741,11 @@ export interface BulkCreateOptions extends Logging, Transactionable {
updateOnDuplicate?: string[]; updateOnDuplicate?: string[];
/** /**
* Include options. See `find` for details
*/
include?: Includeable[];
/**
* Return all columns or only the specified columns for the affected rows (only for postgres) * Return all columns or only the specified columns for the affected rows (only for postgres)
*/ */
returning?: boolean | string[]; returning?: boolean | string[];
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!