Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit db6d5ec6
authored
Mar 15, 2021
by
Wong Yong Jie
Committed by
GitHub
Mar 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(types): allow transaction to be `null` (#13093) (#13101)
1 parent
d89dedea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
types/lib/model.d.ts
types/test/transaction.ts
types/lib/model.d.ts
View file @
db6d5ec
...
@@ -47,7 +47,7 @@ export interface Transactionable {
...
@@ -47,7 +47,7 @@ export interface Transactionable {
/**
/**
* Transaction to run query under
* Transaction to run query under
*/
*/
transaction
?:
Transaction
;
transaction
?:
Transaction
|
null
;
}
}
export
interface
SearchPathable
{
export
interface
SearchPathable
{
...
...
types/test/transaction.ts
View file @
db6d5ec
...
@@ -78,3 +78,9 @@ async function nestedTransact() {
...
@@ -78,3 +78,9 @@ async function nestedTransact() {
});
});
await
tr
.
commit
();
await
tr
.
commit
();
}
}
async
function
excludeFromTransaction
()
{
await
sequelize
.
transaction
(
async
t
=>
await
sequelize
.
query
(
'SELECT 1'
,
{
transaction
:
null
})
);
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment