use iota to unify the enums definition (#3305)

This commit is contained in:
oldme
2024-02-06 11:44:29 +08:00
committed by GitHub
parent 72014689e4
commit e1fa99013a
5 changed files with 33 additions and 24 deletions

View File

@ -384,9 +384,9 @@ const (
type queryType int
const (
queryTypeNormal queryType = 0
queryTypeCount queryType = 1
queryTypeValue queryType = 2
queryTypeNormal queryType = iota
queryTypeCount
queryTypeValue
)
type joinOperator string
@ -400,14 +400,17 @@ const (
type InsertOption int
const (
InsertOptionDefault InsertOption = 0
InsertOptionReplace InsertOption = 1
InsertOptionSave InsertOption = 2
InsertOptionIgnore InsertOption = 3
InsertOperationInsert = "INSERT"
InsertOperationReplace = "REPLACE"
InsertOperationIgnore = "INSERT IGNORE"
InsertOnDuplicateKeyUpdate = "ON DUPLICATE KEY UPDATE"
InsertOptionDefault InsertOption = iota
InsertOptionReplace
InsertOptionSave
InsertOptionIgnore
)
const (
InsertOperationInsert = "INSERT"
InsertOperationReplace = "REPLACE"
InsertOperationIgnore = "INSERT IGNORE"
InsertOnDuplicateKeyUpdate = "ON DUPLICATE KEY UPDATE"
)
const (