Skip to content

Commit 70a46e1

Browse files
committed
Refactor loader
1 parent ea9f657 commit 70a46e1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

0

Whitespace-only changes.

loader.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,10 @@ func (s *Loader) Exist(ctx context.Context, id interface{}) (bool, error) {
225225
return false, nil
226226
}
227227
}
228-
229228
func (s *Loader) LoadAndDecode(ctx context.Context, id interface{}, result interface{}) (bool, error) {
229+
return s.Get(ctx, id, result)
230+
}
231+
func (s *Loader) Get(ctx context.Context, id interface{}, result interface{}) (bool, error) {
230232
var values []interface{}
231233
sql, values := BuildFindByIdWithDB(s.Database, s.table, id, s.mapJsonColumnKeys, s.keys, s.BuildParam)
232234
var rowData interface{}

0 commit comments

Comments
 (0)