Added support of "Violates Foreign Key Constraint"
Updated the translator and added the support of "foreign key constraint violation". For this, this error type is needed here.
This commit is contained in:
		
							parent
							
								
									f5837deef3
								
							
						
					
					
						commit
						566fa32435
					
				@ -47,4 +47,6 @@ var (
 | 
				
			|||||||
	ErrPreloadNotAllowed = errors.New("preload is not allowed when count is used")
 | 
						ErrPreloadNotAllowed = errors.New("preload is not allowed when count is used")
 | 
				
			||||||
	// ErrDuplicatedKey occurs when there is a unique key constraint violation
 | 
						// ErrDuplicatedKey occurs when there is a unique key constraint violation
 | 
				
			||||||
	ErrDuplicatedKey = errors.New("duplicated key not allowed")
 | 
						ErrDuplicatedKey = errors.New("duplicated key not allowed")
 | 
				
			||||||
 | 
						// ErrForeignKeyViolated occurs when there is a foreign key constraint violation
 | 
				
			||||||
 | 
						ErrForeignKeyViolated = errors.New("Violates foreign key constraint")
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user