- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 763 for gorm (0.02 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
gorm.go
package gorm import ( "context" "database/sql" "fmt" "reflect" "sort" "sync" "time" "gorm.io/gorm/clause" "gorm.io/gorm/logger" "gorm.io/gorm/schema" ) // for Config.cacheStore store PreparedStmtDB key const preparedStmtDBKey = "preparedStmt" // Config GORM config type Config struct { // GORM perform single create, update, delete operations in transactions by default to ensure database data integrity
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Tue Aug 26 06:24:29 GMT 2025 - 12.8K bytes - Click Count (0) -
README.md
## Getting Started * GORM Guides [https://gorm.io](https://gorm.io) * Gen Guides [https://gorm.io/gen/index.html](https://gorm.io/gen/index.html) ## Contributing [You can help to deliver a better GORM, check out things you can do](https://gorm.io/contribute.html) ## Contributors [Thank you](https://github.com/go-gorm/gorm/graphs/contributors) for contributing to the GORM framework! ## License
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Thu Oct 30 09:30:20 GMT 2025 - 1.8K bytes - Click Count (0) -
tests/error_translator_test.go
package tests_test import ( "errors" "testing" "gorm.io/gorm" "gorm.io/gorm/utils/tests" ) func TestDialectorWithErrorTranslatorSupport(t *testing.T) { // it shouldn't translate error when the TranslateError flag is false translatedErr := errors.New("translated error") untranslatedErr := errors.New("some random error") db, _ := gorm.Open(tests.DummyDialector{TranslatedErr: translatedErr}) err := db.AddError(untranslatedErr)
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Mon Jul 21 02:46:58 GMT 2025 - 3.1K bytes - Click Count (0) -
tests/tests_test.go
"os" "path/filepath" "time" "gorm.io/driver/gaussdb" "gorm.io/driver/mysql" "gorm.io/driver/postgres" "gorm.io/driver/sqlite" "gorm.io/driver/sqlserver" "gorm.io/gorm" "gorm.io/gorm/logger" . "gorm.io/gorm/utils/tests" ) var DB *gorm.DB var ( mysqlDSN = "gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True&loc=Local"
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Mon Jul 21 02:46:58 GMT 2025 - 3.7K bytes - Click Count (0) -
schema/index_test.go
package schema_test import ( "sync" "testing" "gorm.io/gorm/schema" "gorm.io/gorm/utils/tests" ) type UserIndex struct { Name string `gorm:"index"` Name2 string `gorm:"index:idx_name,unique"` Name3 string `gorm:"index:,sort:desc,collate:utf8,type:btree,length:10,where:name3 != 'jinzhu'"` Name4 string `gorm:"uniqueIndex"` Name5 int64 `gorm:"index:,class:FULLTEXT,comment:hello \\, world,where:age > 10"`
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Fri Dec 06 02:27:44 GMT 2024 - 7.9K bytes - Click Count (0) -
tests/generics_test.go
"sort" "strconv" "strings" "sync" "testing" "github.com/google/uuid" "gorm.io/driver/mysql" "gorm.io/gorm" "gorm.io/gorm/clause" . "gorm.io/gorm/utils/tests" ) func TestGenericsCreate(t *testing.T) { ctx := context.Background() user := User{Name: "TestGenericsCreate", Age: 18} err := gorm.G[User](DB).Create(ctx, &user) if err != nil { t.Fatalf("Create failed: %v", err) }
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Sun Nov 02 14:09:18 GMT 2025 - 33.7K bytes - Click Count (0) -
callbacks/delete.go
package callbacks import ( "reflect" "strings" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" "gorm.io/gorm/utils" ) func BeforeDelete(db *gorm.DB) { if db.Error == nil && db.Statement.Schema != nil && !db.Statement.SkipHooks && db.Statement.Schema.BeforeDelete { callMethod(db, func(value interface{}, tx *gorm.DB) bool { if i, ok := value.(BeforeDeleteInterface); ok { db.AddError(i.BeforeDelete(tx))
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Sun May 25 07:40:40 GMT 2025 - 5.8K bytes - Click Count (0) -
tests/serializer_test.go
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Sat Nov 22 03:14:36 GMT 2025 - 9.3K bytes - Click Count (0) -
callbacks/update.go
package callbacks import ( "reflect" "sort" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" "gorm.io/gorm/utils" ) func SetupUpdateReflectValue(db *gorm.DB) { if db.Error == nil && db.Statement.Schema != nil { if !db.Statement.ReflectValue.CanAddr() || db.Statement.Model != db.Statement.Dest { db.Statement.ReflectValue = reflect.ValueOf(db.Statement.Model)
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Sun May 25 07:40:40 GMT 2025 - 9.6K bytes - Click Count (0) -
callbacks/create_test.go
package callbacks import ( "reflect" "sync" "testing" "time" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" ) var schemaCache = &sync.Map{} func TestConvertToCreateValues_DestType_Slice(t *testing.T) { type user struct { ID int `gorm:"primaryKey"` Name string Email string `gorm:"default:(-)"` Age int `gorm:"default:(-)"` }
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Mon Mar 18 05:48:42 GMT 2024 - 1.4K bytes - Click Count (0)