added support for specifying @collection.* aliases
This commit is contained in:
+8
-8
@@ -1055,14 +1055,14 @@ func (app *BaseApp) initDataDB() error {
|
||||
nonconcurrentDB.DB().SetConnMaxIdleTime(3 * time.Minute)
|
||||
|
||||
// @todo benchmark whether it will have an impact if always enabled as TRACE log
|
||||
// nonconcurrentDB.QueryLogFunc = func(ctx context.Context, t time.Duration, sql string, rows *sql.Rows, err error) {
|
||||
// color.HiBlack("[%.2fms] %v\n", float64(t.Milliseconds()), sql)
|
||||
// }
|
||||
// concurrentDB.QueryLogFunc = nonconcurrentDB.QueryLogFunc
|
||||
// nonconcurrentDB.ExecLogFunc = func(ctx context.Context, t time.Duration, sql string, result sql.Result, err error) {
|
||||
// color.HiBlack("[%.2fms] %v\n", float64(t.Milliseconds()), sql)
|
||||
// }
|
||||
// concurrentDB.ExecLogFunc = nonconcurrentDB.ExecLogFunc
|
||||
// nonconcurrentDB.QueryLogFunc = func(ctx context.Context, t time.Duration, sql string, rows *sql.Rows, err error) {
|
||||
// color.HiBlack("[%.2fms] %v\n", float64(t.Milliseconds()), sql)
|
||||
// }
|
||||
// concurrentDB.QueryLogFunc = nonconcurrentDB.QueryLogFunc
|
||||
// nonconcurrentDB.ExecLogFunc = func(ctx context.Context, t time.Duration, sql string, result sql.Result, err error) {
|
||||
// color.HiBlack("[%.2fms] %v\n", float64(t.Milliseconds()), sql)
|
||||
// }
|
||||
// concurrentDB.ExecLogFunc = nonconcurrentDB.ExecLogFunc
|
||||
|
||||
app.dao = app.createDaoWithHooks(concurrentDB, nonconcurrentDB)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user