- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 60 for nmap (0.14 sec)
-
schema/utils.go
} return } // GetIdentityFieldValuesMap get identity map from fields func GetIdentityFieldValuesMap(ctx context.Context, reflectValue reflect.Value, fields []*Field) (map[string][]reflect.Value, [][]interface{}) { var ( results = [][]interface{}{} dataResults = map[string][]reflect.Value{} loaded = map[interface{}]bool{} notZero, zero bool )
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Sat Aug 19 13:35:14 GMT 2023 - 5.5K bytes - Viewed (0) -
tests/update_test.go
lastUpdatedAt := users[0].UpdatedAt // update with map if res := DB.Model(users[0]).Updates(map[string]interface{}{"name": "updates_01_newname", "age": 100}); res.Error != nil || res.RowsAffected != 1 { t.Errorf("Failed to update users") } if users[0].Name != "updates_01_newname" || users[0].Age != 100 { t.Errorf("Record should be updated also with map") }
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Mon Dec 04 03:50:58 GMT 2023 - 30.3K bytes - Viewed (0) -
schema/index_test.go
Data2B string `gorm:"index:,unique,composite:comp_id2,priority:3"` } func TestParseIndex(t *testing.T) { user, err := schema.Parse(&UserIndex{}, &sync.Map{}, schema.NamingStrategy{}) if err != nil { t.Fatalf("failed to parse user index, got error %v", err) } results := map[string]schema.Index{ "idx_user_indices_name": { Name: "idx_user_indices_name", Fields: []schema.IndexOption{{Field: &schema.Field{Name: "Name"}}},
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 8K bytes - Viewed (0) -
prepare_stmt.go
prepared chan struct{} prepareErr error } type PreparedStmtDB struct { Stmts map[string]*Stmt PreparedSQL []string Mux *sync.RWMutex ConnPool } func NewPreparedStmtDB(connPool ConnPool) *PreparedStmtDB { return &PreparedStmtDB{ ConnPool: connPool, Stmts: make(map[string]*Stmt), Mux: &sync.RWMutex{}, PreparedSQL: make([]string, 0, 100), } }
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Thu Mar 28 08:47:39 GMT 2024 - 6.4K bytes - Viewed (0) -
schema/index.go
*Field Expression string Sort string // DESC, ASC Collate string Length int priority int } // ParseIndexes parse schema indexes func (schema *Schema) ParseIndexes() map[string]Index { indexes := map[string]Index{} for _, field := range schema.Fields { if field.TagSettings["INDEX"] != "" || field.TagSettings["UNIQUEINDEX"] != "" { fieldIndexes, err := parseFieldIndexes(field) if err != nil {
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 3.7K bytes - Viewed (0) -
schema/callbacks_test.go
return nil } func (UserWithCallback) AfterCreate(*gorm.DB) error { return nil } func TestCallback(t *testing.T) { user, err := schema.Parse(&UserWithCallback{}, &sync.Map{}, schema.NamingStrategy{}) if err != nil { t.Fatalf("failed to parse user with callback, got error %v", err) } for _, str := range []string{"BeforeSave", "AfterCreate"} {
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 939 bytes - Viewed (0) -
tests/scanner_valuer_test.go
} if !reflect.DeepEqual([]interface{}{"jinzhu", "POINT(100 100)"}, stmt.Vars) { t.Errorf("generated vars is not equal, got %v", stmt.Vars) } stmt = dryRunDB.Model(UserWithPoint{}).Create(map[string]interface{}{ "Name": "jinzhu", "Point": clause.Expr{SQL: "ST_PointFromText(?)", Vars: []interface{}{"POINT(100 100)"}}, }).Statement
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Wed Jun 07 07:02:07 GMT 2023 - 10.6K bytes - Viewed (0) -
tests/scan_test.go
return strings.Compare(results[i].Name, results[j].Name) <= -1 }) if len(results) != 2 || results[0].Name != user2.Name || results[1].Name != user3.Name { t.Errorf("Scan into struct map, got %#v", results) } type ID uint64 var id ID DB.Raw("select id from users where id = ?", user2.ID).Scan(&id) if uint(id) != user2.ID { t.Errorf("Failed to scan to customized data type") }
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Sat May 28 14:18:07 GMT 2022 - 8.2K bytes - Viewed (0) -
callbacks/visit_map_test.go
chenrui <******@****.***> 1647532411 +0800
Go - Registered: Sun Feb 25 09:35:10 GMT 2024 - Last Modified: Thu Mar 17 15:53:31 GMT 2022 - 780 bytes - Viewed (0) -
tests/create_test.go
t.Fatalf("failed to create data from map, got error: %v", err) } var result1 User if err := DB.Where("name = ?", "create_from_map_1").First(&result1).Error; err != nil || result1.Age != 18 { t.Fatalf("failed to create from map, got error %v", err) } datas := []map[string]interface{}{ {"Name": "create_from_map_2", "Age": 19},
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 26.4K bytes - Viewed (0)