- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 144 for GORM (0.01 sec)
-
utils/tests/dummy_dialecter.go
package tests import ( "gorm.io/gorm" "gorm.io/gorm/callbacks" "gorm.io/gorm/clause" "gorm.io/gorm/logger" "gorm.io/gorm/schema" ) type DummyDialector struct { TranslatedErr error } func (DummyDialector) Name() string { return "dummy" } func (DummyDialector) Initialize(db *gorm.DB) error { callbacks.RegisterDefaultCallbacks(db, &callbacks.Config{Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Mon Mar 06 06:03:31 UTC 2023 - 2.2K bytes - Viewed (0) -
.github/labels.json
"colour": "#43952A", "description": "feature request" }, "invalid_question": { "name": "type:invalid question", "colour": "#CF2E1F", "description": "invalid question (not related to GORM or described in document or not enough information provided)" }, "with_playground": { "name": "type:with reproduction steps", "colour": "#00ff00", "description": "with reproduction steps" },
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Mon Oct 19 03:49:03 UTC 2020 - 3.8K bytes - Viewed (0) -
tests/customize_field_test.go
FieldAllowUpdate string `gorm:"<-:update"` FieldAllowSave string `gorm:"<-"` FieldAllowSave2 string `gorm:"<-:create,update"` FieldAllowSave3 string `gorm:"->:false;<-:create"` FieldReadonly string `gorm:"->"` FieldIgnore string `gorm:"-"` AutoUnixCreateTime int32 `gorm:"autocreatetime"` AutoUnixMilliCreateTime int `gorm:"autocreatetime:milli"`
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Fri Sep 11 09:33:31 UTC 2020 - 6.9K bytes - Viewed (0) -
tests/migrate_test.go
"math/rand" "reflect" "strconv" "strings" "testing" "time" "github.com/stretchr/testify/assert" "gorm.io/driver/gaussdb" "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/migrator" "gorm.io/gorm/schema" "gorm.io/gorm/utils" . "gorm.io/gorm/utils/tests" ) func TestMigrate(t *testing.T) {
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Wed Aug 20 04:51:17 UTC 2025 - 65.2K bytes - Viewed (0) -
tests/upsert_test.go
package tests_test import ( "regexp" "testing" "time" "gorm.io/gorm" "gorm.io/gorm/clause" . "gorm.io/gorm/utils/tests" ) func TestUpsert(t *testing.T) { lang := Language{Code: "upsert", Name: "Upsert"} if err := DB.Clauses(clause.OnConflict{DoNothing: true}).Create(&lang).Error; err != nil { t.Fatalf("failed to upsert, got %v", err) } lang2 := Language{Code: "upsert", Name: "Upsert"}
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Tue Jul 29 11:06:13 UTC 2025 - 13.1K bytes - Viewed (0) -
clause/clause_test.go
package clause_test import ( "reflect" "strings" "sync" "testing" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" "gorm.io/gorm/utils/tests" ) var db, _ = gorm.Open(tests.DummyDialector{}, nil) func checkBuildClauses(t *testing.T, clauses []clause.Interface, result string, vars []interface{}) { var ( buildNames []string buildNamesMap = map[string]bool{}
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Tue Jun 02 02:50:38 UTC 2020 - 1012 bytes - Viewed (0) -
utils/utils.go
func init() { _, file, _, _ := runtime.Caller(0) // compatible solution to get gorm source directory with various operating systems gormSourceDir = sourceDir(file) } func sourceDir(file string) string { dir := filepath.Dir(file) dir = filepath.Dir(dir) s := filepath.Dir(dir) if filepath.Base(s) != "gorm.io" { s = dir } return filepath.ToSlash(s) + "/" }
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Thu Oct 30 10:56:26 UTC 2025 - 4.5K bytes - Viewed (0) -
clause/delete_test.go
package clause_test import ( "fmt" "testing" "gorm.io/gorm/clause" ) func TestDelete(t *testing.T) { results := []struct { Clauses []clause.Interface Result string Vars []interface{} }{ { []clause.Interface{clause.Delete{}, clause.From{}}, "DELETE FROM `users`", nil, }, { []clause.Interface{clause.Delete{Modifier: "LOW_PRIORITY"}, clause.From{}},
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Tue Jun 02 01:18:01 UTC 2020 - 608 bytes - Viewed (0) -
soft_delete.go
package gorm import ( "database/sql" "database/sql/driver" "encoding/json" "reflect" "github.com/jinzhu/now" "gorm.io/gorm/clause" "gorm.io/gorm/schema" ) type DeletedAt sql.NullTime // Scan implements the Scanner interface. func (n *DeletedAt) Scan(value interface{}) error { return (*sql.NullTime)(n).Scan(value) } // Value implements the driver Valuer interface.
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 4.5K bytes - Viewed (1) -
clause/insert_test.go
package clause_test import ( "fmt" "testing" "gorm.io/gorm/clause" ) func TestInsert(t *testing.T) { results := []struct { Clauses []clause.Interface Result string Vars []interface{} }{ { []clause.Interface{clause.Insert{}}, "INSERT INTO `users`", nil, }, { []clause.Interface{clause.Insert{Modifier: "LOW_PRIORITY"}}, "INSERT LOW_PRIORITY INTO `users`", nil, }, {
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Tue Jun 02 01:18:01 UTC 2020 - 737 bytes - Viewed (0)