fix: all enums same style (#262)

* fix: all enums same style

* fix: rename process to reduce

* add some missing enum renaming

Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
Fabi
2020-06-23 14:47:47 +02:00
committed by GitHub
co-authored by Livio Amstutz
parent c376b92315
commit 3cd3a238c2
152 changed files with 1026 additions and 1024 deletions
+4 -4
View File
@@ -17,15 +17,15 @@ type currentSequence struct {
type SequenceSearchKey int32
const (
SEQUENCESEARCHKEY_UNDEFINED SequenceSearchKey = iota
SEQUENCESEARCHKEY_VIEW_NAME
SequenceSearchKeyUndefined SequenceSearchKey = iota
SequenceSearchKeyViewName
)
type sequenceSearchKey SequenceSearchKey
func (key sequenceSearchKey) ToColumnName() string {
switch SequenceSearchKey(key) {
case SEQUENCESEARCHKEY_VIEW_NAME:
case SequenceSearchKeyViewName:
return "view_name"
default:
return ""
@@ -44,7 +44,7 @@ func SaveCurrentSequence(db *gorm.DB, table, viewName string, sequence uint64) e
func LatestSequence(db *gorm.DB, table, viewName string) (uint64, error) {
sequence := new(actualSequece)
query := PrepareGetByKey(table, sequenceSearchKey(SEQUENCESEARCHKEY_VIEW_NAME), viewName)
query := PrepareGetByKey(table, sequenceSearchKey(SequenceSearchKeyViewName), viewName)
err := query(db, sequence)
if err == nil {