mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Merge pull request #23256 from Raigen/master
[sequelize] extend RetryOptions with RegExp and Error
This commit is contained in:
commit
ea43a0f23a
3
types/sequelize/index.d.ts
vendored
3
types/sequelize/index.d.ts
vendored
@ -10,6 +10,7 @@
|
||||
// Philippe D'Alva <https://github.com/TitaneBoy>
|
||||
// Carven Zhang <https://github.com/zjy01>
|
||||
// Nikola Vidic <https://github.com/nidzov>
|
||||
// Florian Oellerich <https://github.com/Raigen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@ -5313,7 +5314,7 @@ declare namespace sequelize {
|
||||
/**
|
||||
* Only retry a query if the error matches one of these strings.
|
||||
*/
|
||||
match?: string[];
|
||||
match?: (string|RegExp|Error)[];
|
||||
|
||||
/**
|
||||
* How many times a failing query is automatically retried. Set to 0 to disable retrying on SQL_BUSY error.
|
||||
|
||||
@ -1235,7 +1235,7 @@ new Sequelize( {
|
||||
username: 'user',
|
||||
password: 'pass',
|
||||
retry: {
|
||||
match: ['failed'],
|
||||
match: ['failed', /failed/i, Sequelize.ForeignKeyConstraintError],
|
||||
max: 3
|
||||
},
|
||||
typeValidation: true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user