Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for formattedName (0.21 sec)

  1. schema/naming.go

    	formattedName := strings.ReplaceAll(strings.Join([]string{
    		prefix, table, name,
    	}, "_"), ".", "_")
    
    	if ns.IdentifierMaxLength == 0 {
    		ns.IdentifierMaxLength = 64
    	}
    
    	if utf8.RuneCountInString(formattedName) > ns.IdentifierMaxLength {
    		h := sha1.New()
    		h.Write([]byte(formattedName))
    		bs := h.Sum(nil)
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  2. schema/naming_test.go

    	ns := NamingStrategy{IdentifierMaxLength: 63}
    
    	formattedName := ns.formatName("prefix", "table", "thisIsAVeryVeryVeryVeryVeryVeryVeryVeryVeryLongString")
    	if formattedName != "prefix_table_thisIsAVeryVeryVeryVeryVeryVeryVeryVeryVer180f2c67" {
    		t.Errorf("invalid formatted name generated, got %v", formattedName)
    	}
    }
    
    func TestFormatNameWithStringLongerThan64Characters(t *testing.T) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue May 30 02:00:48 GMT 2023
    - 7K bytes
    - Viewed (0)
  3. maven-compat/src/main/java/org/apache/maven/project/interpolation/BuildTimestampValueSource.java

        private String formattedDate;
    
        public BuildTimestampValueSource(Date startTime, String format) {
            super(false);
            this.startTime = startTime;
            this.format = format;
        }
    
        public Object getValue(String expression) {
            if ("build.timestamp".equals(expression) || "maven.build.timestamp".equals(expression)) {
                if (formattedDate == null && startTime != null) {
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Mon Dec 26 15:12:32 GMT 2022
    - 1.7K bytes
    - Viewed (0)
Back to top