Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ZEROVALUE (0.03 sec)

  1. soft_delete.go

    	return []clause.Interface{SoftDeleteQueryClause{Field: f, ZeroValue: parseZeroValueTag(f)}}
    }
    
    func parseZeroValueTag(f *schema.Field) sql.NullString {
    	if v, ok := f.TagSettings["ZEROVALUE"]; ok {
    		if _, err := now.Parse(v); err == nil {
    			return sql.NullString{String: v, Valid: true}
    		}
    	}
    	return sql.NullString{Valid: false}
    }
    
    type SoftDeleteQueryClause struct {
    	ZeroValue sql.NullString
    	Field     *schema.Field
    }
    
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Feb 01 06:40:55 UTC 2023
    - 4.5K bytes
    - Viewed (1)
  2. src/test/java/jcifs/dcerpc/ndr/NdrLongTest.java

            assertEquals(negativeValue, ndrLongNegative.value, "Constructor should correctly initialize with a negative value.");
    
            // Test case 3: Zero value
            int zeroValue = 0;
            NdrLong ndrLongZero = new NdrLong(zeroValue);
            assertEquals(zeroValue, ndrLongZero.value, "Constructor should correctly initialize with zero.");
    
            // Test case 4: Max int value
            int maxIntValue = Integer.MAX_VALUE;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  3. tests/soft_delete_test.go

    	}
    }
    
    func TestSoftDeleteZeroValue(t *testing.T) {
    	type SoftDeleteBook struct {
    		ID        uint
    		Name      string
    		Pages     uint
    		DeletedAt gorm.DeletedAt `gorm:"zeroValue:'1970-01-01 00:00:01'"`
    	}
    	DB.Migrator().DropTable(&SoftDeleteBook{})
    	if err := DB.AutoMigrate(&SoftDeleteBook{}); err != nil {
    		t.Fatalf("failed to auto migrate soft delete table")
    	}
    
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Feb 01 06:40:55 UTC 2023
    - 5.7K bytes
    - Viewed (0)
Back to top