- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for Plugin (0.16 sec)
-
tests/callbacks_test.go
createCallback := db.Callback().Create() createCallback.Before("*").Register("plugin_1_fn1", c1) createCallback.After("*").Register("plugin_1_fn2", c2) if ok, msg := assertCallbacks(createCallback, []string{"c1", "c2"}); !ok { t.Errorf("callbacks tests failed, got %v", msg) } // plugin 2 createCallback.Before("*").Register("plugin_2_fn1", c3)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 26 03:33:36 GMT 2024 - 7.2K bytes - Viewed (0) -
interfaces.go
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 { ParamsFilter(ctx context.Context, sql string, params ...interface{}) (string, []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) -
gorm.go
} } relation.JoinTable = joinSchema return nil } // Use use plugin func (db *DB) Use(plugin Plugin) error { name := plugin.Name() if _, ok := db.Plugins[name]; ok { return ErrRegistered } if err := plugin.Initialize(db); err != nil { return err } db.Plugins[name] = plugin return nil } // ToSQL for generate SQL string. //
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/tests_test.go
// go install github.com/microsoft/go-sqlcmd/cmd/sqlcmd@latest // SQLCMDPASSWORD=LoremIpsum86 sqlcmd -U sa -S localhost:9930 // CREATE DATABASE gorm; // GO // CREATE LOGIN gorm WITH PASSWORD = 'LoremIpsum86'; // CREATE USER gorm FROM LOGIN gorm; // ALTER SERVER ROLE sysadmin ADD MEMBER [gorm]; // GO log.Println("testing sqlserver...") if dbDSN == "" { dbDSN = sqlserverDSN }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Dec 15 08:36:08 GMT 2023 - 3.3K bytes - Viewed (1)