Merge pull request #16517 from MugeSo/sequelize-fix-parent-of-unique-constraint-error

sequelize: fix inheritance of UniqueConstraintError class.
This commit is contained in:
Arthur Ozga
2017-05-15 09:02:54 -07:00
committed by GitHub
4 changed files with 7 additions and 4 deletions

View File

@@ -2097,7 +2097,7 @@ declare namespace sequelize {
}
interface UniqueConstraintError extends DatabaseError {
interface UniqueConstraintError extends ValidationError {
/**
* Thrown when a unique constraint is violated in the database
@@ -3247,8 +3247,8 @@ declare namespace sequelize {
* https://github.com/sequelize/sequelize/blob/master/docs/docs/models-usage.md#user-content-manipulating-the-dataset-with-limit-offset-order-and-group
*/
group?: string | string[] | Object;
/**
* Apply DISTINCT(col) for FindAndCount(all)
*/

View File

@@ -630,6 +630,8 @@ new s.HostNotReachableError( new Error( 'original connection error message' ) );
new s.InvalidConnectionError( new Error( 'original connection error message' ) );
new s.ConnectionTimedOutError( new Error( 'original connection error message' ) );
const uniqueConstraintError: Sequelize.ValidationError = new s.UniqueConstraintError({});
//
// Hooks
// ~~~~~~~

View File

@@ -2096,7 +2096,7 @@ declare namespace sequelize {
}
interface UniqueConstraintError extends DatabaseError {
interface UniqueConstraintError extends ValidationError {
/**
* Thrown when a unique constraint is violated in the database

View File

@@ -628,6 +628,7 @@ new s.HostNotReachableError( new Error( 'original connection error message' ) );
new s.InvalidConnectionError( new Error( 'original connection error message' ) );
new s.ConnectionTimedOutError( new Error( 'original connection error message' ) );
const uniqueConstraintError: Sequelize.ValidationError = new s.UniqueConstraintError({});
//
// Hooks
// ~~~~~~~