- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 1,127 for gorm (0.03 sec)
-
tests/migrate_test.go
"math/rand" "os" "reflect" "strconv" "strings" "testing" "time" "github.com/stretchr/testify/assert" "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/logger" "gorm.io/gorm/migrator" "gorm.io/gorm/schema" "gorm.io/gorm/utils" . "gorm.io/gorm/utils/tests" ) func TestMigrate(t *testing.T) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 11:24:16 UTC 2024 - 56.2K 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 Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Jun 02 02:50:38 UTC 2020 - 1012 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 Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Jun 02 01:18:01 UTC 2020 - 608 bytes - Viewed (0) -
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 Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Jun 02 01:18:01 UTC 2020 - 737 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 Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Oct 19 03:49:03 UTC 2020 - 3.8K bytes - Viewed (0) -
tests/transaction_test.go
package tests_test import ( "context" "errors" "testing" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) func TestTransaction(t *testing.T) { tx := DB.Begin() user := *GetUser("transaction", Config{}) if err := tx.Save(&user).Error; err != nil { t.Fatalf("No error should raise, but got %v", err) } if err := tx.First(&User{}, "name = ?", "transaction").Error; err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Sep 14 12:58:29 UTC 2024 - 12.9K bytes - Viewed (0) -
clause/returning_test.go
package clause_test import ( "fmt" "testing" "gorm.io/gorm/clause" ) func TestReturning(t *testing.T) { results := []struct { Clauses []clause.Interface Result string Vars []interface{} }{ { []clause.Interface{clause.Select{}, clause.From{}, clause.Returning{ []clause.Column{clause.PrimaryColumn}, }}, "SELECT * FROM `users` RETURNING `users`.`id`", nil, }, {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Jun 02 01:18:01 UTC 2020 - 845 bytes - Viewed (0) -
clause/update_test.go
package clause_test import ( "fmt" "testing" "gorm.io/gorm/clause" ) func TestUpdate(t *testing.T) { results := []struct { Clauses []clause.Interface Result string Vars []interface{} }{ { []clause.Interface{clause.Update{}}, "UPDATE `users`", nil, }, { []clause.Interface{clause.Update{Modifier: "LOW_PRIORITY"}}, "UPDATE LOW_PRIORITY `users`", nil, }, {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Jun 02 01:18:01 UTC 2020 - 722 bytes - Viewed (0) -
scan.go
package gorm import ( "database/sql" "database/sql/driver" "reflect" "time" "gorm.io/gorm/schema" "gorm.io/gorm/utils" ) // prepareValues prepare values slice func prepareValues(values []interface{}, db *DB, columnTypes []*sql.ColumnType, columns []string) { if db.Statement.Schema != nil { for idx, name := range columns { if field := db.Statement.Schema.LookUpField(name); field != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 10.1K bytes - Viewed (0) -
callbacks/callmethod.go
package callbacks import ( "reflect" "gorm.io/gorm" ) func callMethod(db *gorm.DB, fc func(value interface{}, tx *gorm.DB) bool) { tx := db.Session(&gorm.Session{NewDB: true}) if called := fc(db.Statement.ReflectValue.Interface(), tx); !called { switch db.Statement.ReflectValue.Kind() { case reflect.Slice, reflect.Array: db.Statement.CurDestIndex = 0 for i := 0; i < db.Statement.ReflectValue.Len(); i++ {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Feb 18 01:20:29 UTC 2023 - 846 bytes - Viewed (0)