Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 123 for savyje (0.07 sec)

  1. tests/non_std_test.go

    	if err := DB.AutoMigrate(&Animal{}); err != nil {
    		t.Fatalf("no error should happen when migrate but got %v", err)
    	}
    
    	animal := Animal{Name: "Ferdinand"}
    	DB.Save(&animal)
    	updatedAt1 := animal.UpdatedAt
    
    	DB.Save(&animal).Update("name", "Francis")
    	if updatedAt1.Format(time.RFC3339Nano) == animal.UpdatedAt.Format(time.RFC3339Nano) {
    		t.Errorf("UpdatedAt should be updated")
    	}
    
    	var animals []Animal
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  2. tests/hooks_test.go

    	DB.AutoMigrate(&Product{})
    
    	p := Product{Code: "Invalid", Price: 100}
    	if DB.Save(&p).Error == nil {
    		t.Fatalf("An error from before create callbacks happened when create with invalid value")
    	}
    
    	if DB.Where("code = ?", "Invalid").First(&Product{}).Error == nil {
    		t.Fatalf("Should not save record that have errors")
    	}
    
    	if DB.Save(&Product{Code: "dont_save", Price: 100}).Error == nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 17 03:59:06 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  3. tests/scan_test.go

    	}
    }
    
    func TestScanToEmbedded(t *testing.T) {
    	person1 := Person{Name: "person 1"}
    	person2 := Person{Name: "person 2"}
    	DB.Save(&person1).Save(&person2)
    
    	address1 := Address{Name: "address 1"}
    	address2 := Address{Name: "address 2"}
    	DB.Save(&address1).Save(&address2)
    
    	DB.Create(&PersonAddress{PersonID: person1.ID, AddressID: int(address1.ID)})
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 10:57:36 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  4. tests/transaction_test.go

    	tx := DB.Begin()
    
    	user := *GetUser("transaction-save-point", Config{})
    	tx.Create(&user)
    
    	if err := tx.First(&User{}, "name = ?", user.Name).Error; err != nil {
    		t.Fatalf("Should find saved record")
    	}
    
    	if err := tx.SavePoint("save_point1").Error; err != nil {
    		t.Fatalf("Failed to save point, got error %v", err)
    	}
    
    	user1 := *GetUser("transaction-save-point-1", Config{})
    	tx.Create(&user1)
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Sep 14 12:58:29 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_header_param_models/test_tutorial001.py

        client = TestClient(mod.app)
        return client
    
    
    def test_header_param_model(client: TestClient):
        response = client.get(
            "/items/",
            headers=[
                ("save-data", "true"),
                ("if-modified-since", "yesterday"),
                ("traceparent", "123"),
                ("x-tag", "one"),
                ("x-tag", "two"),
            ],
        )
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  6. compat/maven-embedder/src/test/java/org/apache/maven/cli/props/MavenPropertiesTest.java

            MavenProperties props = new MavenProperties();
            props.load(new StringReader(sw.toString()));
            props.save(System.err);
            System.err.println("=====");
    
            props.put("key2", props.get("key2"));
            props.put("key3", "foo");
            props.save(System.err);
            System.err.println("=====");
        }
    
        @Test
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  7. cmd/erasure.go

    					continue
    				}
    				scannerLogOnceIf(ctx, cache.save(ctx, er, dataUsageCacheName), "nsscanner-cache-update")
    				updates <- cache.clone()
    
    				lastSave = cache.Info.LastUpdate
    			case v, ok := <-bucketResults:
    				if !ok {
    					// Save final state...
    					cache.Info.NextCycle = wantCycle
    					cache.Info.LastUpdate = time.Now()
    					scannerLogOnceIf(ctx, cache.save(ctx, er, dataUsageCacheName), "nsscanner-channel-closed")
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 04 22:23:33 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_header_param_models/test_tutorial002.py

        client = TestClient(mod.app)
        client.headers.clear()
        return client
    
    
    def test_header_param_model(client: TestClient):
        response = client.get(
            "/items/",
            headers=[
                ("save-data", "true"),
                ("if-modified-since", "yesterday"),
                ("traceparent", "123"),
                ("x-tag", "one"),
                ("x-tag", "two"),
            ],
        )
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  9. tests/embedded_struct_test.go

    		if !DB.Migrator().HasColumn(&HNPost{}, name) {
    			t.Errorf("should has prefixed column %v", name)
    		}
    	}
    
    	// save embedded struct
    	DB.Save(&HNPost{BasePost: BasePost{Title: "news"}})
    	DB.Save(&HNPost{BasePost: BasePost{Title: "hn_news"}})
    	var news HNPost
    	if err := DB.First(&news, "title = ?", "hn_news").Error; err != nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  10. compat/maven-embedder/src/main/java/org/apache/maven/cli/props/MavenProperties.java

            loadLayout(reader, false);
        }
    
        public void save() throws IOException {
            save(this.location);
        }
    
        public void save(Path location) throws IOException {
            try (OutputStream os = Files.newOutputStream(location)) {
                save(os);
            }
        }
    
        public void save(OutputStream os) throws IOException {
            save(new OutputStreamWriter(os, DEFAULT_ENCODING));
        }
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 38.2K bytes
    - Viewed (0)
Back to top