File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -733,6 +733,18 @@ func isNotNull(v interface{}) bool {
733
733
return reflect .ValueOf (v ).FieldByName ("Valid" ).Bool ()
734
734
}
735
735
736
+ // Took the error from the real database.
737
+ var deletedUserLinkError = & pq.Error {
738
+ Severity : "ERROR" ,
739
+ // "raise_exception" error
740
+ Code : "P0001" ,
741
+ Message : "Cannot create user_link for deleted user" ,
742
+ Where : "PL/pgSQL function insert_user_links_fail_if_user_deleted() line 7 at RAISE" ,
743
+ File : "pl_exec.c" ,
744
+ Line : "3864" ,
745
+ Routine : "exec_stmt_raise" ,
746
+ }
747
+
736
748
func (* FakeQuerier ) AcquireLock (_ context.Context , _ int64 ) error {
737
749
return xerrors .New ("AcquireLock must only be called within a transaction" )
738
750
}
@@ -5573,18 +5585,6 @@ func (q *FakeQuerier) InsertUserGroupsByName(_ context.Context, arg database.Ins
5573
5585
return nil
5574
5586
}
5575
5587
5576
- // Took the error from the real database.
5577
- var deletedUserLinkError = & pq.Error {
5578
- Severity : "ERROR" ,
5579
- // "raise_exception" error
5580
- Code : "P0001" ,
5581
- Message : "Cannot create user_link for deleted user" ,
5582
- Where : "PL/pgSQL function insert_user_links_fail_if_user_deleted() line 7 at RAISE" ,
5583
- File : "pl_exec.c" ,
5584
- Line : "3864" ,
5585
- Routine : "exec_stmt_raise" ,
5586
- }
5587
-
5588
5588
func (q * FakeQuerier ) InsertUserLink (_ context.Context , args database.InsertUserLinkParams ) (database.UserLink , error ) {
5589
5589
q .mutex .Lock ()
5590
5590
defer q .mutex .Unlock ()
You can’t perform that action at this time.
0 commit comments