==================
WARNING: DATA RACE
Write at 0x00c00001200c by goroutine 36:
  runtime.slicecopy()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/runtime/slice.go:310 +0x0
  fmt.(*buffer).writeString()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/print.go:108 +0xfc
  fmt.(*fmt).padString()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/format.go:110 +0x70
  fmt.(*fmt).fmtS()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/format.go:359 +0x78
  fmt.(*pp).fmtString()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/print.go:494 +0x130
  fmt.(*pp).handleMethods()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/print.go:673 +0x448
  fmt.(*pp).printArg()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/print.go:756 +0x9cc
  fmt.(*pp).doPrintf()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/print.go:1077 +0x418
  fmt.Sprintf()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/print.go:239 +0x50
  gorm.io/gorm/logger.logger.Trace()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/logger/logger.go:169 +0x154
  gorm.io/gorm/logger.(*logger).Trace()
      <autogenerated>:1 +0xd4
  gorm.io/gorm.(*DB).Scan()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/finisher_api.go:539 +0x514
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).FetchOriginalTabler()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:104 +0x2c0
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).FetchWithList()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:455 +0x6c
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Fetch()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:450 +0x60
  github.com/eruca/gobisel.(*GormModel[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Query()
      /Users/nick/Coding/Projects/gobisel/gorm_model.go:62 +0x2c
  github.com/eruca/goecmo/models/scores.(*Score).Query()
      /Users/nick/Coding/Projects/goecmo/models/scores/scores.go:68 +0x58
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Call()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:468 +0x94
  github.com/eruca/gobisel.(*QueryParam[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]).Call()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:466 +0x40
  github.com/eruca/gobisel.HandlerGenericFunc[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score,go.shape.struct { Conds []string "json:\"conds,omitempty\""; Offset uint64 "json:\"offset,omitempty\""; Size int64 "json:\"size,omitempty\""; Orderby string "json:\"orderby,omitempty\""; ForceUpdate bool "json:\"force_update,omitempty\"" },go.shape.*github.com/eruca/gobisel.QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]].func1.1()
      /Users/nick/Coding/Projects/gobisel/action.go:45 +0x64
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).Next()
      /Users/nick/Coding/Projects/gobisel/context.go:174 +0x94
  github.com/eruca/gobisel.noneExistInCache()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:100 +0x48
  github.com/eruca/gobisel.UseCache()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:68 +0x600
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).Next()
      /Users/nick/Coding/Projects/gobisel/context.go:174 +0x90
  github.com/eruca/gobisel.TimeElapsed()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:28 +0x40
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).workFlow()
      /Users/nick/Coding/Projects/gobisel/context.go:165 +0x1b4
  github.com/eruca/gobisel.(*Manager).TakeAction()
      /Users/nick/Coding/Projects/gobisel/manager.go:201 +0x1ac
  github.com/eruca/gobisel.(*websocketSession).Process()
      /Users/nick/Coding/Projects/gobisel/websocket.go:179 +0x190
  github.com/eruca/gobisel/ws.(*Hub).ReadProcess()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:155 +0xf4
  github.com/eruca/gobisel/ws.NewHub.func2()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:93 +0x4c

Previous write at 0x00c000012008 by goroutine 39:
  runtime.slicecopy()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/runtime/slice.go:310 +0x0
  fmt.(*buffer).writeString()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/print.go:108 +0xfc
  fmt.(*fmt).padString()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/format.go:110 +0x70
  fmt.(*fmt).fmtS()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/format.go:359 +0x78
  fmt.(*pp).fmtString()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/print.go:497 +0x14c
  fmt.(*pp).printArg()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/print.go:741 +0x17c
  fmt.(*pp).doPrintf()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/print.go:1077 +0x418
  fmt.Appendf()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/fmt/print.go:249 +0x5c
  log.(*Logger).Printf.func1()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/log/log.go:269 +0x78
  log.(*Logger).output()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/log/log.go:238 +0x28c
  log.(*Logger).Printf()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/log/log.go:268 +0xa0
  gorm.io/gorm/logger.logger.Trace()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/logger/logger.go:180 +0x920
  gorm.io/gorm/logger.(*logger).Trace()
      <autogenerated>:1 +0xd4
  gorm.io/gorm.(*processor).Execute()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/callbacks.go:134 +0x9f0
  gorm.io/gorm.(*DB).Find()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/finisher_api.go:170 +0x1dc
  github.com/eruca/gobisel.fetchForeigns[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score].func1()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:246 +0x264
  gorm.io/gorm.(*DB).Transaction()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/finisher_api.go:647 +0x314
  github.com/eruca/gobisel.fetchForeigns[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:230 +0x708
  github.com/eruca/gobisel.BuildForeigns[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:437 +0x310
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).FetchWithList()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:456 +0xa4
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Fetch()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:450 +0x60
  github.com/eruca/gobisel.(*GormModel[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Query()
      /Users/nick/Coding/Projects/gobisel/gorm_model.go:62 +0x2c
  github.com/eruca/goecmo/models/scores.(*Score).Query()
      /Users/nick/Coding/Projects/goecmo/models/scores/scores.go:68 +0x58
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Call()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:468 +0x94
  github.com/eruca/gobisel.(*QueryParam[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]).Call()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:466 +0x40
  github.com/eruca/gobisel.HandlerGenericFunc[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score,go.shape.struct { Conds []string "json:\"conds,omitempty\""; Offset uint64 "json:\"offset,omitempty\""; Size int64 "json:\"size,omitempty\""; Orderby string "json:\"orderby,omitempty\""; ForceUpdate bool "json:\"force_update,omitempty\"" },go.shape.*github.com/eruca/gobisel.QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]].func1.1()
      /Users/nick/Coding/Projects/gobisel/action.go:45 +0x64
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).Next()
      /Users/nick/Coding/Projects/gobisel/context.go:174 +0x94
  github.com/eruca/gobisel.noneExistInCache()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:100 +0x48
  github.com/eruca/gobisel.UseCache()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:68 +0x600
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).Next()
      /Users/nick/Coding/Projects/gobisel/context.go:174 +0x90
  github.com/eruca/gobisel.TimeElapsed()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:28 +0x40
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).workFlow()
      /Users/nick/Coding/Projects/gobisel/context.go:165 +0x1b4
  github.com/eruca/gobisel.(*Manager).TakeAction()
      /Users/nick/Coding/Projects/gobisel/manager.go:201 +0x1ac
  github.com/eruca/gobisel.(*websocketSession).Process()
      /Users/nick/Coding/Projects/gobisel/websocket.go:179 +0x190
  github.com/eruca/gobisel/ws.(*Hub).ReadProcess()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:155 +0xf4
  github.com/eruca/gobisel/ws.NewHub.func2()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:93 +0x4c

Goroutine 36 (running) created at:
  github.com/eruca/gobisel/ws.NewHub()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:93 +0xa24
  github.com/eruca/gobisel.websocketHandler()
      /Users/nick/Coding/Projects/gobisel/websocket.go:29 +0xb8
  github.com/eruca/gobisel.(*Manager).InitSystem()
      /Users/nick/Coding/Projects/gobisel/manager.go:145 +0x240
  main.main()
      /Users/nick/Coding/Projects/goecmo/main.go:59 +0xc14

Goroutine 39 (running) created at:
  github.com/eruca/gobisel/ws.NewHub()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:93 +0xa24
  github.com/eruca/gobisel.websocketHandler()
      /Users/nick/Coding/Projects/gobisel/websocket.go:29 +0xb8
  github.com/eruca/gobisel.(*Manager).InitSystem()
      /Users/nick/Coding/Projects/gobisel/manager.go:145 +0x240
  main.main()
      /Users/nick/Coding/Projects/goecmo/main.go:59 +0xc14
==================

2023/12/26 21:39:38 /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:104 SLOW SQL >= 200ms
[385.173ms] [rows:1] SELECT COUNT(*) FROM scores WHERE deleted_at IS NULL AND "name" = 'GCS 格拉斯哥昏迷评分'
==================
WARNING: DATA RACE
Write at 0x00c00017e440 by goroutine 30:
  runtime.slicecopy()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/runtime/slice.go:310 +0x0
  github.com/jackc/pgx/v5/pgproto3.(*Parse).Encode()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgproto3/parse.go:62 +0x384
  github.com/jackc/pgx/v5/pgproto3.(*Frontend).SendParse()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgproto3/frontend.go:133 +0x74
  github.com/jackc/pgx/v5/pgconn.(*PgConn).Prepare()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgconn/pgconn.go:835 +0x428
  github.com/jackc/pgx/v5.(*Conn).Prepare()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/conn.go:329 +0x350
  github.com/jackc/pgx/v5.(*Conn).getStatementDescription()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/conn.go:855 +0x244
  github.com/jackc/pgx/v5.(*Conn).Query()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/conn.go:764 +0xa6c
  github.com/jackc/pgx/v5/stdlib.(*Conn).QueryContext()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/stdlib/sql.go:506 +0x3ec
  database/sql.ctxDriverQuery()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/ctxutil.go:48 +0xa4
  database/sql.(*DB).queryDC.func1()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:1748 +0x1b4
  database/sql.withLock()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:3502 +0x98
  database/sql.(*DB).queryDC()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:1743 +0x200
  database/sql.(*Tx).QueryContext()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:2497 +0xd8
  gorm.io/gorm/callbacks.Query()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/callbacks/query.go:20 +0x1b8
  gorm.io/gorm.(*processor).Execute()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/callbacks.go:130 +0x88c
  gorm.io/gorm.(*DB).Find()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/finisher_api.go:170 +0x1dc
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).FetchOriginalTabler()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:148 +0x67c
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).FetchWithList()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:455 +0x6c
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Fetch()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:450 +0x60
  github.com/eruca/gobisel.(*GormModel[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Query()
      /Users/nick/Coding/Projects/gobisel/gorm_model.go:62 +0x2c
  github.com/eruca/goecmo/models/scores.(*Score).Query()
      /Users/nick/Coding/Projects/goecmo/models/scores/scores.go:68 +0x58
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Call()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:468 +0x94
  github.com/eruca/gobisel.(*QueryParam[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]).Call()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:466 +0x40
  github.com/eruca/gobisel.HandlerGenericFunc[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score,go.shape.struct { Conds []string "json:\"conds,omitempty\""; Offset uint64 "json:\"offset,omitempty\""; Size int64 "json:\"size,omitempty\""; Orderby string "json:\"orderby,omitempty\""; ForceUpdate bool "json:\"force_update,omitempty\"" },go.shape.*github.com/eruca/gobisel.QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]].func1.1()
      /Users/nick/Coding/Projects/gobisel/action.go:45 +0x64
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).Next()
      /Users/nick/Coding/Projects/gobisel/context.go:174 +0x94
  github.com/eruca/gobisel.noneExistInCache()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:100 +0x48
  github.com/eruca/gobisel.UseCache()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:68 +0x600
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).Next()
      /Users/nick/Coding/Projects/gobisel/context.go:174 +0x90
  github.com/eruca/gobisel.TimeElapsed()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:28 +0x40
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).workFlow()
      /Users/nick/Coding/Projects/gobisel/context.go:165 +0x1b4
  github.com/eruca/gobisel.(*Manager).TakeAction()
      /Users/nick/Coding/Projects/gobisel/manager.go:201 +0x1ac
  github.com/eruca/gobisel.(*websocketSession).Process()
      /Users/nick/Coding/Projects/gobisel/websocket.go:179 +0x190
  github.com/eruca/gobisel/ws.(*Hub).ReadProcess()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:155 +0xf4
  github.com/eruca/gobisel/ws.NewHub.func2()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:93 +0x4c

Previous write at 0x00c00017e446 by goroutine 39:
  github.com/jackc/pgx/v5/pgproto3.(*Sync).Encode()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgproto3/sync.go:24 +0x124
  github.com/jackc/pgx/v5/pgproto3.(*Frontend).SendSync()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgproto3/frontend.go:173 +0x44
  github.com/jackc/pgx/v5/pgconn.(*PgConn).execExtendedSuffix()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgconn/pgconn.go:1180 +0xc8
  github.com/jackc/pgx/v5/pgconn.(*PgConn).ExecPrepared()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgconn/pgconn.go:1137 +0x190
  github.com/jackc/pgx/v5.(*Conn).Query()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/conn.go:798 +0x1710
  github.com/jackc/pgx/v5/stdlib.(*Conn).QueryContext()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/stdlib/sql.go:506 +0x3ec
  database/sql.ctxDriverQuery()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/ctxutil.go:48 +0xa4
  database/sql.(*DB).queryDC.func1()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:1748 +0x1b4
  database/sql.withLock()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:3502 +0x98
  database/sql.(*DB).queryDC()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:1743 +0x200
  database/sql.(*Tx).QueryContext()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:2497 +0xd8
  gorm.io/gorm/callbacks.Query()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/callbacks/query.go:20 +0x1b8
  gorm.io/gorm.(*processor).Execute()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/callbacks.go:130 +0x88c
  gorm.io/gorm.(*DB).Find()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/finisher_api.go:170 +0x1dc
  github.com/eruca/gobisel.fetchForeigns[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score].func1()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:246 +0x264
  gorm.io/gorm.(*DB).Transaction()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/finisher_api.go:647 +0x314
  github.com/eruca/gobisel.fetchForeigns[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:230 +0x708
  github.com/eruca/gobisel.BuildForeigns[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:437 +0x310
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).FetchWithList()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:456 +0xa4
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Fetch()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:450 +0x60
  github.com/eruca/gobisel.(*GormModel[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Query()
      /Users/nick/Coding/Projects/gobisel/gorm_model.go:62 +0x2c
  github.com/eruca/goecmo/models/scores.(*Score).Query()
      /Users/nick/Coding/Projects/goecmo/models/scores/scores.go:68 +0x58
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Call()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:468 +0x94
  github.com/eruca/gobisel.(*QueryParam[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]).Call()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:466 +0x40
  github.com/eruca/gobisel.HandlerGenericFunc[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score,go.shape.struct { Conds []string "json:\"conds,omitempty\""; Offset uint64 "json:\"offset,omitempty\""; Size int64 "json:\"size,omitempty\""; Orderby string "json:\"orderby,omitempty\""; ForceUpdate bool "json:\"force_update,omitempty\"" },go.shape.*github.com/eruca/gobisel.QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]].func1.1()
      /Users/nick/Coding/Projects/gobisel/action.go:45 +0x64
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).Next()
      /Users/nick/Coding/Projects/gobisel/context.go:174 +0x94
  github.com/eruca/gobisel.noneExistInCache()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:100 +0x48
  github.com/eruca/gobisel.UseCache()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:68 +0x600
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).Next()
      /Users/nick/Coding/Projects/gobisel/context.go:174 +0x90
  github.com/eruca/gobisel.TimeElapsed()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:28 +0x40
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).workFlow()
      /Users/nick/Coding/Projects/gobisel/context.go:165 +0x1b4
  github.com/eruca/gobisel.(*Manager).TakeAction()
      /Users/nick/Coding/Projects/gobisel/manager.go:201 +0x1ac
  github.com/eruca/gobisel.(*websocketSession).Process()
      /Users/nick/Coding/Projects/gobisel/websocket.go:179 +0x190
  github.com/eruca/gobisel/ws.(*Hub).ReadProcess()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:155 +0xf4
  github.com/eruca/gobisel/ws.NewHub.func2()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:93 +0x4c

==================
WARNING: DATA RACE
Write at 0x00c000676298 by goroutine 30:
  runtime.racewriterange()
      <autogenerated>:1 +0x14
  internal/poll.ignoringEINTRIO()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/internal/poll/fd_unix.go:736 +0x308
  internal/poll.(*FD).Read()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/internal/poll/fd_unix.go:160 +0x20
  net.(*netFD).Read()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/net/fd_posix.go:55 +0x44
  net.(*conn).Read()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/net/net.go:179 +0x88
  net.(*TCPConn).Read()
      <autogenerated>:1 +0x4c
  github.com/jackc/pgx/v5/pgconn/internal/bgreader.(*BGReader).Read()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgconn/internal/bgreader/bgreader.go:100 +0x150
  io.ReadAtLeast()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/io/io.go:335 +0xc8
  github.com/jackc/pgx/v5/pgproto3.(*chunkReader).Next()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgproto3/chunkreader.go:80 +0x644
  github.com/jackc/pgx/v5/pgproto3.(*Frontend).Receive()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgproto3/frontend.go:220 +0x5c
  github.com/jackc/pgx/v5/pgconn.(*PgConn).peekMessage()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgconn/pgconn.go:518 +0x184
  github.com/jackc/pgx/v5/pgconn.(*ResultReader).readUntilRowDescription()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgconn/pgconn.go:1605 +0x4c
  github.com/jackc/pgx/v5/pgconn.(*PgConn).execExtendedSuffix()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgconn/pgconn.go:1192 +0x25c
  github.com/jackc/pgx/v5/pgconn.(*PgConn).ExecPrepared()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgconn/pgconn.go:1137 +0x190
  github.com/jackc/pgx/v5.(*Conn).Query()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/conn.go:798 +0x1710
  github.com/jackc/pgx/v5/stdlib.(*Conn).QueryContext()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/stdlib/sql.go:506 +0x3ec
  database/sql.ctxDriverQuery()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/ctxutil.go:48 +0xa4
  database/sql.(*DB).queryDC.func1()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:1748 +0x1b4
  database/sql.withLock()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:3502 +0x98
  database/sql.(*DB).queryDC()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:1743 +0x200
  database/sql.(*Tx).QueryContext()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:2497 +0xd8
  gorm.io/gorm/callbacks.Query()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/callbacks/query.go:20 +0x1b8
  gorm.io/gorm.(*processor).Execute()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/callbacks.go:130 +0x88c
  gorm.io/gorm.(*DB).Find()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/finisher_api.go:170 +0x1dc
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).FetchOriginalTabler()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:148 +0x67c
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).FetchWithList()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:455 +0x6c
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Fetch()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:450 +0x60
  github.com/eruca/gobisel.(*GormModel[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Query()
      /Users/nick/Coding/Projects/gobisel/gorm_model.go:62 +0x2c
  github.com/eruca/goecmo/models/scores.(*Score).Query()
      /Users/nick/Coding/Projects/goecmo/models/scores/scores.go:68 +0x58
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Call()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:468 +0x94
  github.com/eruca/gobisel.(*QueryParam[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]).Call()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:466 +0x40
  github.com/eruca/gobisel.HandlerGenericFunc[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score,go.shape.struct { Conds []string "json:\"conds,omitempty\""; Offset uint64 "json:\"offset,omitempty\""; Size int64 "json:\"size,omitempty\""; Orderby string "json:\"orderby,omitempty\""; ForceUpdate bool "json:\"force_update,omitempty\"" },go.shape.*github.com/eruca/gobisel.QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]].func1.1()
      /Users/nick/Coding/Projects/gobisel/action.go:45 +0x64
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).Next()
      /Users/nick/Coding/Projects/gobisel/context.go:174 +0x94
  github.com/eruca/gobisel.noneExistInCache()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:100 +0x48
  github.com/eruca/gobisel.UseCache()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:68 +0x600
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).Next()
      /Users/nick/Coding/Projects/gobisel/context.go:174 +0x90
  github.com/eruca/gobisel.TimeElapsed()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:28 +0x40
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).workFlow()
      /Users/nick/Coding/Projects/gobisel/context.go:165 +0x1b4
  github.com/eruca/gobisel.(*Manager).TakeAction()
      /Users/nick/Coding/Projects/gobisel/manager.go:201 +0x1ac
  github.com/eruca/gobisel.(*websocketSession).Process()
      /Users/nick/Coding/Projects/gobisel/websocket.go:179 +0x190
  github.com/eruca/gobisel/ws.(*Hub).ReadProcess()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:155 +0xf4
  github.com/eruca/gobisel/ws.NewHub.func2()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:93 +0x4c

Previous read at 0x00c000676298 by goroutine 39:
  runtime.slicebytetostring()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/runtime/string.go:81 +0x0
  github.com/jackc/pgx/v5/pgconn.(*PgConn).convertRowDescription()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgconn/pgconn.go:795 +0x19c
  github.com/jackc/pgx/v5/pgconn.(*ResultReader).receiveMessage()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgconn/pgconn.go:1639 +0xd4
  github.com/jackc/pgx/v5/pgconn.(*ResultReader).readUntilRowDescription()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgconn/pgconn.go:1611 +0x64
  github.com/jackc/pgx/v5/pgconn.(*PgConn).execExtendedSuffix()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgconn/pgconn.go:1192 +0x25c
  github.com/jackc/pgx/v5/pgconn.(*PgConn).ExecPrepared()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/pgconn/pgconn.go:1137 +0x190
  github.com/jackc/pgx/v5.(*Conn).Query()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/conn.go:798 +0x1710
  github.com/jackc/pgx/v5/stdlib.(*Conn).QueryContext()
      /Users/nick/go/pkg/mod/github.com/jackc/pgx/v5@v5.5.1/stdlib/sql.go:506 +0x3ec
  database/sql.ctxDriverQuery()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/ctxutil.go:48 +0xa4
  database/sql.(*DB).queryDC.func1()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:1748 +0x1b4
  database/sql.withLock()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:3502 +0x98
  database/sql.(*DB).queryDC()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:1743 +0x200
  database/sql.(*Tx).QueryContext()
      /opt/homebrew/Cellar/go/1.21.5/libexec/src/database/sql/sql.go:2497 +0xd8
  gorm.io/gorm/callbacks.Query()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/callbacks/query.go:20 +0x1b8
  gorm.io/gorm.(*processor).Execute()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/callbacks.go:130 +0x88c
  gorm.io/gorm.(*DB).Find()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/finisher_api.go:170 +0x1dc
  github.com/eruca/gobisel.fetchForeigns[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score].func1()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:246 +0x264
  gorm.io/gorm.(*DB).Transaction()
      /Users/nick/go/pkg/mod/gorm.io/gorm@v1.25.5/finisher_api.go:647 +0x314
  github.com/eruca/gobisel.fetchForeigns[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:230 +0x708
  github.com/eruca/gobisel.BuildForeigns[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:437 +0x310
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).FetchWithList()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:456 +0xa4
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Fetch()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:450 +0x60
  github.com/eruca/gobisel.(*GormModel[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Query()
      /Users/nick/Coding/Projects/gobisel/gorm_model.go:62 +0x2c
  github.com/eruca/goecmo/models/scores.(*Score).Query()
      /Users/nick/Coding/Projects/goecmo/models/scores/scores.go:68 +0x58
  github.com/eruca/gobisel.(*QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]).Call()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:468 +0x94
  github.com/eruca/gobisel.(*QueryParam[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]).Call()
      /Users/nick/Coding/Projects/gobisel/parameter_impl_query.go:466 +0x40
  github.com/eruca/gobisel.HandlerGenericFunc[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score,go.shape.struct { Conds []string "json:\"conds,omitempty\""; Offset uint64 "json:\"offset,omitempty\""; Size int64 "json:\"size,omitempty\""; Orderby string "json:\"orderby,omitempty\""; ForceUpdate bool "json:\"force_update,omitempty\"" },go.shape.*github.com/eruca/gobisel.QueryParam[go.shape.struct { GormModel = github.com/eruca/gobisel.GormModel[github.com/eruca/goecmo/models/scores.Score,*github.com/eruca/goecmo/models/scores.Score]; Score = github.com/eruca/goecmo/types.Score[gorm.io/datatypes.JSON] },go.shape.*github.com/eruca/goecmo/models/scores.Score]].func1.1()
      /Users/nick/Coding/Projects/gobisel/action.go:45 +0x64
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).Next()
      /Users/nick/Coding/Projects/gobisel/context.go:174 +0x94
  github.com/eruca/gobisel.noneExistInCache()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:100 +0x48
  github.com/eruca/gobisel.UseCache()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:68 +0x600
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).Next()
      /Users/nick/Coding/Projects/gobisel/context.go:174 +0x90
  github.com/eruca/gobisel.TimeElapsed()
      /Users/nick/Coding/Projects/gobisel/middlewares.go:28 +0x40
  github.com/eruca/gobisel.(*Context).exec()
      /Users/nick/Coding/Projects/gobisel/context.go:168 +0x11c
  github.com/eruca/gobisel.(*Context).workFlow()
      /Users/nick/Coding/Projects/gobisel/context.go:165 +0x1b4
  github.com/eruca/gobisel.(*Manager).TakeAction()
      /Users/nick/Coding/Projects/gobisel/manager.go:201 +0x1ac
  github.com/eruca/gobisel.(*websocketSession).Process()
      /Users/nick/Coding/Projects/gobisel/websocket.go:179 +0x190
  github.com/eruca/gobisel/ws.(*Hub).ReadProcess()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:155 +0xf4
  github.com/eruca/gobisel/ws.NewHub.func2()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:93 +0x4c

Goroutine 30 (running) created at:
  github.com/eruca/gobisel/ws.NewHub()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:93 +0xa24
  github.com/eruca/gobisel.websocketHandler()
      /Users/nick/Coding/Projects/gobisel/websocket.go:29 +0xb8
  github.com/eruca/gobisel.(*Manager).InitSystem()
      /Users/nick/Coding/Projects/gobisel/manager.go:145 +0x240
  main.main()
      /Users/nick/Coding/Projects/goecmo/main.go:59 +0xc14

Goroutine 39 (running) created at:
  github.com/eruca/gobisel/ws.NewHub()
      /Users/nick/Coding/Projects/gobisel/ws/hub.go:93 +0xa24
  github.com/eruca/gobisel.websocketHandler()
      /Users/nick/Coding/Projects/gobisel/websocket.go:29 +0xb8
  github.com/eruca/gobisel.(*Manager).InitSystem()
      /Users/nick/Coding/Projects/gobisel/manager.go:145 +0x240
  main.main()
      /Users/nick/Coding/Projects/goecmo/main.go:59 +0xc14
==================

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking

Comment From: jinzhu

When using GORM for database transactions in Go, remember that transactions are not safe for concurrent use by default. Each goroutine should work with its own transaction instance. Here are some key points:

  1. Avoid Sharing Transaction Instances: Do not share a transaction instance across multiple goroutines.

  2. Synchronize Access: If synchronization is necessary, use mutexes (sync.Mutex) or other synchronization methods to ensure that only one goroutine accesses the transaction at a time.

  3. Check for Errors: Always check for and handle errors after each transaction operation.

  4. Commit or Rollback: Use defer to ensure transactions are either committed or rolled back properly.

Here's a brief example:

func processWithTransaction(db *gorm.DB) error {
    tx := db.Begin()
    defer func() {
        if r := recover(); r != nil {
            tx.Rollback()
        }
    }()

    if err := tx.Error; err != nil {
        return err
    }

    // Perform database operations here

    return tx.Commit().Error
}

In this example, each call to processWithTransaction uses a new transaction instance, avoiding concurrent access issues. Always manage concurrency and transactions with care to maintain data integrity and avoid unexpected behaviors.