Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for val (0.11 sec)

  1. scan.go

    								}
    								relFields = append(relFields, field)
    								joinFields[idx] = relFields
    								continue
    							}
    						}
    						var val interface{}
    						values[idx] = &val
    					} else {
    						var val interface{}
    						values[idx] = &val
    					}
    				}
    			}
    		}
    
    		switch reflectValue.Kind() {
    		case reflect.Slice, reflect.Array:
    			var (
    				elem        reflect.Value
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 09:53:11 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  2. utils/utils.go

    }
    
    // CheckTruth check string true or not
    func CheckTruth(vals ...string) bool {
    	for _, val := range vals {
    		if val != "" && !strings.EqualFold(val, "false") {
    			return true
    		}
    	}
    	return false
    }
    
    func ToStringKey(values ...interface{}) string {
    	results := make([]string, len(values))
    
    	for idx, value := range values {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  3. logger/sql_test.go

    		myrole             = role("admin")
    		pwd                = password("pass")
    		jsVal              = []byte(`{"Name":"test","Val":"test"}`)
    		js                 = JSON(jsVal)
    		esVal              = []byte(`{"Name":"test","Val":"test"}`)
    		es                 = ExampleStruct{Name: "test", Val: "test"}
    		intVal   intType   = 1
    		floatVal floatType = 1.23
    	)
    
    	results := []struct {
    		SQL           string
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  4. tests/scanner_valuer_test.go

    		t.Fatalf("no error should happen when query scanner, valuer struct, but got %v", err)
    	}
    
    	if result.ExampleStructPtr.Val != "value2" {
    		t.Errorf(`ExampleStructPtr.Val should equal to "value2", but got %v`, result.ExampleStructPtr.Val)
    	}
    
    	if result.ExampleStruct.Val != "value1" {
    		t.Errorf(`ExampleStruct.Val should equal to "value1", but got %#v`, result.ExampleStruct)
    	}
    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)
  5. schema/utils.go

    		if len(values) >= 2 {
    			settings[k] = strings.Join(values[1:], ":")
    		} else if k != "" {
    			settings[k] = k
    		}
    	}
    
    	return settings
    }
    
    func toColumns(val string) (results []string) {
    	if val != "" {
    		for _, v := range strings.Split(val, ",") {
    			results = append(results, strings.TrimSpace(v))
    		}
    	}
    	return
    }
    
    func removeSettingFromTag(tag reflect.StructTag, names ...string) reflect.StructTag {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Aug 19 13:35:14 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  6. schema/field.go

    		}
    	}
    
    	if field.GORMDataType == "" {
    		field.GORMDataType = field.DataType
    	}
    
    	if val, ok := field.TagSettings["TYPE"]; ok {
    		switch DataType(strings.ToLower(val)) {
    		case Bool, Int, Uint, Float, String, Time, Bytes:
    			field.DataType = DataType(strings.ToLower(val))
    		default:
    			field.DataType = DataType(val)
    		}
    	}
    
    	if field.Size == 0 {
    		switch reflect.Indirect(fieldValue).Kind() {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  7. tests/query_test.go

    		t.Errorf("invalid query SQL, got %v", result.Statement.SQL.String())
    	}
    }
    
    type DoubleInt64 struct {
    	data int64
    }
    
    func (t *DoubleInt64) Scan(val interface{}) error {
    	switch v := val.(type) {
    	case int64:
    		t.data = v * 2
    		return nil
    	default:
    		return fmt.Errorf("DoubleInt64 cant not scan with:%v", v)
    	}
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
Back to top