Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ParamsFilter (0.57 sec)

  1. logger/logger.go

    		} else {
    			l.Printf(l.traceStr, utils.FileWithLineNum(), float64(elapsed.Nanoseconds())/1e6, rows, sql)
    		}
    	}
    }
    
    // ParamsFilter filter params
    func (l *logger) ParamsFilter(ctx context.Context, sql string, params ...interface{}) (string, []interface{}) {
    	if l.Config.ParameterizedQueries {
    		return sql, nil
    	}
    	return sql, params
    }
    
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sun Jan 12 10:19:28 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  2. interfaces.go

    	QuoteTo(clause.Writer, string)
    	Explain(sql string, vars ...interface{}) string
    }
    
    // Plugin GORM plugin interface
    type Plugin interface {
    	Name() string
    	Initialize(*DB) error
    }
    
    type ParamsFilter interface {
    	ParamsFilter(ctx context.Context, sql string, params ...interface{}) (string, []interface{})
    }
    
    // ConnPool db conns pool interface
    type ConnPool interface {
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sat Aug 19 13:33:31 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. logger/slog.go

    		return
    	}
    
    	r := slog.NewRecord(time.Now(), level, msg, utils.CallerFrame().PC)
    	r.Add(args...)
    	_ = l.Logger.Handler().Handle(ctx, r)
    }
    
    // ParamsFilter filter params
    func (l *slogLogger) ParamsFilter(ctx context.Context, sql string, params ...interface{}) (string, []interface{}) {
    	if l.Parameterized {
    		return sql, nil
    	}
    	return sql, params
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Thu Oct 30 10:56:26 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  4. callbacks.go

    		f(db)
    	}
    
    	if stmt.SQL.Len() > 0 {
    		db.Logger.Trace(stmt.Context, curTime, func() (string, int64) {
    			sql, vars := stmt.SQL.String(), stmt.Vars
    			if filter, ok := db.Logger.(ParamsFilter); ok {
    				sql, vars = filter.ParamsFilter(stmt.Context, stmt.SQL.String(), stmt.Vars...)
    			}
    			return db.Dialector.Explain(sql, vars...), db.RowsAffected
    		}, db.Error)
    	}
    
    	if !stmt.DB.DryRun {
    		stmt.SQL.Reset()
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Tue Aug 26 06:24:29 UTC 2025
    - 8.8K bytes
    - Viewed (0)
Back to top