mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Retry create issue to cope with duplicate keys (#7898)
* Retry create issue to cope with duplicate keys * Use .SetExpr().Where().Insert()
This commit is contained in:
		
				
					committed by
					
						
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							541fab196f
						
					
				
				
					commit
					5fe2ec264f
				
			
							
								
								
									
										8
									
								
								vendor/xorm.io/core/mapper.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								vendor/xorm.io/core/mapper.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -9,7 +9,7 @@ import (
 | 
			
		||||
	"sync"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// name translation between struct, fields names and table, column names
 | 
			
		||||
// IMapper represents a name convertation between struct's fields name and table's column name
 | 
			
		||||
type IMapper interface {
 | 
			
		||||
	Obj2Table(string) string
 | 
			
		||||
	Table2Obj(string) string
 | 
			
		||||
@@ -184,7 +184,7 @@ func (mapper GonicMapper) Table2Obj(name string) string {
 | 
			
		||||
	return string(newstr)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// A GonicMapper that contains a list of common initialisms taken from golang/lint
 | 
			
		||||
// LintGonicMapper is A GonicMapper that contains a list of common initialisms taken from golang/lint
 | 
			
		||||
var LintGonicMapper = GonicMapper{
 | 
			
		||||
	"API":   true,
 | 
			
		||||
	"ASCII": true,
 | 
			
		||||
@@ -221,7 +221,7 @@ var LintGonicMapper = GonicMapper{
 | 
			
		||||
	"XSS":   true,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// provide prefix table name support
 | 
			
		||||
// PrefixMapper provides prefix table name support
 | 
			
		||||
type PrefixMapper struct {
 | 
			
		||||
	Mapper IMapper
 | 
			
		||||
	Prefix string
 | 
			
		||||
@@ -239,7 +239,7 @@ func NewPrefixMapper(mapper IMapper, prefix string) PrefixMapper {
 | 
			
		||||
	return PrefixMapper{mapper, prefix}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// provide suffix table name support
 | 
			
		||||
// SuffixMapper provides suffix table name support
 | 
			
		||||
type SuffixMapper struct {
 | 
			
		||||
	Mapper IMapper
 | 
			
		||||
	Suffix string
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user