Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for to_string (0.18 sec)

  1. internal/s3select/sql/value.go

    	}
    	return 0, false
    }
    
    // ToInt returns the value if int.
    func (v Value) ToInt() (val int64, ok bool) {
    	val, ok = v.value.(int64)
    	return
    }
    
    // ToString returns the value if string.
    func (v Value) ToString() (val string, ok bool) {
    	val, ok = v.value.(string)
    	return
    }
    
    // Equals returns whether the values strictly match.
    // Both type and value must match.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 20.2K bytes
    - Viewed (0)
  2. internal/logger/target/console/console.go

    	for i, element := range entry.Trace.Source {
    		trace[i] = fmt.Sprintf("%8v: %s", traceLength-i, element)
    	}
    
    	tagString := ""
    	for key, value := range entry.Trace.Variables {
    		if value != "" {
    			if tagString != "" {
    				tagString += ", "
    			}
    			tagString += fmt.Sprintf("%s=%#v", key, value)
    		}
    	}
    
    	var apiString string
    	if entry.API != nil {
    		apiString = "API: " + entry.API.Name
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 17:57:52 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  3. internal/s3select/sql/parser.go

    }
    
    // SimpleArgFunc represents functions with simple expression
    // arguments.
    type SimpleArgFunc struct {
    	FunctionName string `parser:" @(\"AVG\" | \"MAX\" | \"MIN\" | \"SUM\" |  \"COALESCE\" | \"NULLIF\" | \"TO_STRING\" | \"TO_TIMESTAMP\" | \"UTCNOW\" | \"CHAR_LENGTH\" | \"CHARACTER_LENGTH\" | \"LOWER\" | \"UPPER\") "`
    
    	ArgsList []*Expression `parser:"\"(\" (@@ (\",\" @@)*)?\")\""`
    }
    
    // CountFunc represents the COUNT sql function
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  4. internal/s3select/sql/funceval.go

    	// Conversion
    	sqlFnCast FuncName = "CAST"
    
    	// Date and time
    	sqlFnDateAdd     FuncName = "DATE_ADD"
    	sqlFnDateDiff    FuncName = "DATE_DIFF"
    	sqlFnExtract     FuncName = "EXTRACT"
    	sqlFnToString    FuncName = "TO_STRING"
    	sqlFnToTimestamp FuncName = "TO_TIMESTAMP"
    	sqlFnUTCNow      FuncName = "UTCNOW"
    
    	// String
    	sqlFnCharLength      FuncName = "CHAR_LENGTH"
    	sqlFnCharacterLength FuncName = "CHARACTER_LENGTH"
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 13.2K bytes
    - Viewed (0)
  5. internal/s3select/json/record.go

    		v = b
    	} else if f, ok := value.ToFloat(); ok {
    		v = f
    	} else if i, ok := value.ToInt(); ok {
    		v = i
    	} else if t, ok := value.ToTimestamp(); ok {
    		v = sql.FormatSQLTimestamp(t)
    	} else if s, ok := value.ToString(); ok {
    		v = s
    	} else if value.IsNull() {
    		v = nil
    	} else if value.IsMissing() {
    		return r, nil
    	} else if b, ok := value.ToBytes(); ok {
    		// This can either be raw json or a CSV value.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  6. utils/utils_test.go

    		{"string", "abc", "abc"},
    		{"other", true, ""},
    	}
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			if out := ToString(test.in); test.out != out {
    				t.Fatalf("ToString(%v) want: %s, got: %s", test.in, test.out, out)
    			}
    		})
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Feb 19 03:42:25 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  7. internal/s3select/sql/evaluate.go

    	inferTypeAsString(arg)
    
    	s, ok := arg.ToString()
    	if !ok {
    		err := errLikeNonStrArg
    		return nil, errLikeInvalidInputs(err)
    	}
    
    	pattern, err1 := e.Pattern.evalNode(r, tableAlias)
    	if err1 != nil {
    		return nil, err1
    	}
    
    	// Infer pattern as string (in case it is untyped)
    	inferTypeAsString(pattern)
    
    	patternStr, ok := pattern.ToString()
    	if !ok {
    		err := errLikeNonStrArg
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 12K bytes
    - Viewed (0)
  8. src/cmd/cgo/gcc.go

    			if c.incompleteStructs[tag] {
    				tt.Go = c.Ident(incomplete)
    			}
    			typedef[name.Name] = &tt
    		}
    
    	case *dwarf.TypedefType:
    		// Record typedef for printing.
    		if dt.Name == "_GoString_" {
    			// Special C name for Go string type.
    			// Knows string layout used by compilers: pointer plus length,
    			// which rounds up to 2 pointers after alignment.
    			t.Go = c.string
    			t.Size = c.ptrSize * 2
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  9. misc/cgo/gmp/gmp.go

    	return nil
    }
    
    // String returns the decimal representation of z.
    func (z *Int) String() string {
    	if z == nil {
    		return "nil"
    	}
    	z.doinit()
    	p := C.mpz_get_str(nil, 10, &z.i[0])
    	s := C.GoString(p)
    	C.free(unsafe.Pointer(p))
    	return s
    }
    
    func (z *Int) destroy() {
    	if z.init {
    		C.mpz_clear(&z.i[0])
    	}
    	z.init = false
    }
    
    /*
     * arithmetic
     */
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 9.5K bytes
    - Viewed (0)
  10. schema/field.go

    			case []byte:
    				field.ReflectValueOf(ctx, value).SetString(string(data))
    			case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:
    				field.ReflectValueOf(ctx, value).SetString(utils.ToString(data))
    			case float64, float32:
    				field.ReflectValueOf(ctx, value).SetString(fmt.Sprintf("%."+strconv.Itoa(field.Precision)+"f", data))
    			default:
    				return fallbackSetter(ctx, value, v, field.Set)
    			}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
Back to top