- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for explained (0.17 sec)
-
callbacks.go
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() stmt.Vars = nil } if resetBuildClauses { stmt.BuildClauses = nil } return db
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 26 03:33:36 GMT 2024 - 8.6K bytes - Viewed (1) -
migrator/migrator.go
defaultStmt := &gorm.Statement{Vars: []interface{}{field.DefaultValueInterface}} m.Dialector.BindVarTo(defaultStmt, defaultStmt, field.DefaultValueInterface) expr.SQL += " DEFAULT " + m.Dialector.Explain(defaultStmt.SQL.String(), field.DefaultValueInterface) } else if field.DefaultValue != "(-)" { expr.SQL += " DEFAULT " + field.DefaultValue } } return }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 07:15:49 GMT 2024 - 29K bytes - Viewed (0) -
logger/sql_test.go
}, } for idx, r := range results { if result := logger.ExplainSQL(r.SQL, r.NumericRegexp, `"`, r.Vars...); result != r.Result { t.Errorf("Explain SQL #%v expects %v, but got %v", idx, r.Result, result) } }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 21 08:00:02 GMT 2024 - 8.4K bytes - Viewed (0) -
utils/tests/dummy_dialecter.go
} writer.WriteByte(v) } shiftDelimiter++ } if continuousBacktick > 0 && !selfQuoted { writer.WriteString("``") } writer.WriteByte('`') } func (DummyDialector) Explain(sql string, vars ...interface{}) string { return logger.ExplainSQL(sql, nil, `"`, vars...) } func (DummyDialector) DataTypeOf(*schema.Field) string { return "" }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 06 06:03:31 GMT 2023 - 2.2K bytes - Viewed (0) -
interfaces.go
Migrator(db *DB) Migrator DataTypeOf(*schema.Field) string DefaultValueOf(*schema.Field) clause.Expression BindVarTo(writer clause.Writer, stmt *Statement, v interface{}) 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 {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Aug 19 13:33:31 GMT 2023 - 2.2K bytes - Viewed (0) -
tests/sql_builder_test.go
func (ageFloat) String() string { return "age" } func TestExplainSQL(t *testing.T) { user := *GetUser("explain-sql", Config{}) dryRunDB := DB.Session(&gorm.Session{DryRun: true}) stmt := dryRunDB.Model(&user).Where("id = ?", 1).Updates(map[string]interface{}{"age": ageInt(8)}).Statement sql := DB.Dialector.Explain(stmt.SQL.String(), stmt.Vars...) if !regexp.MustCompile(`.*age.*=8,`).MatchString(sql) {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 16.7K bytes - Viewed (0) -
gorm.go
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Aug 20 11:46:56 GMT 2023 - 11.6K bytes - Viewed (0) -
tests/query_test.go
stmt := dryDB.Clauses(clause.OrderBy{ Expression: clause.Expr{SQL: "FIELD(id,?)", Vars: []interface{}{[]int{1, 2, 3}}, WithoutParentheses: true}, }).Find(&User{}).Statement explainedSQL := dryDB.Dialector.Explain(stmt.SQL.String(), stmt.Vars...) if !regexp.MustCompile("SELECT \\* FROM .*users.* ORDER BY FIELD\\(id,1,2,3\\)").MatchString(explainedSQL) { t.Fatalf("Build Order condition, but got %v", explainedSQL) } }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:22:53 GMT 2024 - 49.8K bytes - Viewed (0)