- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 89 for insert (0.25 sec)
-
tests/create_test.go
}, { "name": "dog", "user_id": gorm.Expr("@uid"), }, }) if !regexp.MustCompile(`INSERT INTO .pets. \(.name.,.user_id.\) .*VALUES \(.+,\(SELECT @uid:=id FROM \(SELECT id FROM .users. WHERE name=.+\) as tmp\)\),\(.+,@uid\)`).MatchString(result.Statement.SQL.String()) { t.Errorf("invalid insert SQL, got %v", result.Statement.SQL.String()) } } func TestCreateNilPointer(t *testing.T) { var user *User
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 26.4K bytes - Viewed (0) -
callbacks/create.go
if db.RowsAffected == 0 { return } var ( pkField *schema.Field pkFieldName = "@id" ) insertID, err := result.LastInsertId() insertOk := err == nil && insertID > 0 if !insertOk { if !supportReturning { db.AddError(err) } return } if db.Statement.Schema != nil {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 08 03:29:55 GMT 2024 - 12.5K bytes - Viewed (0) -
istioctl/pkg/injector/injector-list.go
} func injectionDisabled(pod *corev1.Pod) bool { inject := pod.ObjectMeta.GetAnnotations()[annotation.SidecarInject.Name] if lbl, labelPresent := pod.ObjectMeta.GetLabels()[label.SidecarInject.Name]; labelPresent { inject = lbl } return strings.EqualFold(inject, "false") } func renderCounts(injectedRevision string, counts revisionCount) string { if counts.pods == 0 {
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Thu Jan 04 03:08:06 GMT 2024 - 10.4K bytes - Viewed (0) -
tests/scanner_valuer_test.go
if stmt.SQL.String() == "" || len(stmt.Vars) != 2 { t.Errorf("Failed to generate sql, got %v", stmt.SQL.String()) } if !regexp.MustCompile(`INSERT INTO .user_with_points. \(.name.,.point.\) VALUES \(.+,ST_PointFromText\(.+\)\)`).MatchString(stmt.SQL.String()) { t.Errorf("insert with sql.Expr, but got %v", stmt.SQL.String()) } if !reflect.DeepEqual([]interface{}{"jinzhu", "POINT(100 100)"}, stmt.Vars) {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Jun 07 07:02:07 GMT 2023 - 10.6K bytes - Viewed (0) -
internal/event/target/mysql.go
ROW_FORMAT = Dynamic;` mysqlUpdateRow = `INSERT INTO %s (key_name, value) VALUES (?, ?) ON DUPLICATE KEY UPDATE value=VALUES(value);` mysqlDeleteRow = `DELETE FROM %s WHERE key_hash = SHA2(?, 256);` mysqlInsertRow = `INSERT INTO %s (event_time, event_data) VALUES (?, ?);` ) // MySQL related constants const ( MySQLFormat = "format"
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sat Oct 07 15:07:38 GMT 2023 - 11.5K bytes - Viewed (0) -
istioctl/pkg/precheck/precheck.go
} } return msgs, nil } func extractCRDVersions(r *crd.CustomResourceDefinition) sets.String { res := sets.New[string]() for _, v := range r.Spec.Versions { if v.Served { res.Insert(v.Name) } } return res } func checkInstallPermissions(cli kube.CLIClient, istioNamespace string) diag.Messages { Resources := []struct { namespace string group string
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 02:57:30 GMT 2024 - 19.3K bytes - Viewed (0) -
cmd/server_test.go
c.Assert(err, nil) response, err = s.client.Do(request) c.Assert(err, nil) c.Assert(response.StatusCode, http.StatusOK) deleteResp = DeleteObjectsResponse{} delRespBytes, err = io.ReadAll(response.Body) c.Assert(err, nil) err = xml.Unmarshal(delRespBytes, &deleteResp) c.Assert(err, nil) c.Assert(len(deleteResp.DeletedObjects), len(delObjReq.Objects))
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 108K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/route.go
stripFull := strings.TrimSuffix(h, ".svc.cluster.local") if unique.Contains(stripFull) && stripFull != h { shouldDelete.Insert(h) } stripPartial := strings.TrimSuffix(h, ".svc") if unique.Contains(stripPartial) && stripPartial != h { shouldDelete.Insert(h) } } // Filter from original list to keep original order ret := make([]string, 0, len(domains)) for _, h := range domains {
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Thu May 11 05:38:17 GMT 2023 - 7.2K bytes - Viewed (0) -
tests/sql_builder_test.go
// create user := &User{Name: "foo", Age: 20} user.CreatedAt = date user.UpdatedAt = date sql = DB.ToSQL(func(tx *gorm.DB) *gorm.DB { return tx.Model(&User{}).Create(user) }) assertEqualSQL(t, `INSERT INTO "users" ("created_at","updated_at","deleted_at","name","age","birthday","company_id","manager_id","active") VALUES ('2021-10-18 00:00:00','2021-10-18 00:00:00',NULL,'foo',20,NULL,NULL,NULL,false) RETURNING "id"`, sql) // save
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 16.7K bytes - Viewed (0) -
tests/upsert_test.go
} } func TestUpsertSlice(t *testing.T) { langs := []Language{ {Code: "upsert-slice1", Name: "Upsert-slice1"}, {Code: "upsert-slice2", Name: "Upsert-slice2"}, {Code: "upsert-slice3", Name: "Upsert-slice3"}, } DB.Clauses(clause.OnConflict{DoNothing: true}).Create(&langs) var langs2 []Language if err := DB.Find(&langs2, "code LIKE ?", "upsert-slice%").Error; err != nil {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Sep 05 07:39:19 GMT 2022 - 11.4K bytes - Viewed (0)