Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for decimal (0.2 sec)

  1. migrator/column_type.go

    // Consult your driver documentation for a list of driver data types. Length specifiers
    // are not included.
    // Common type names include "VARCHAR", "TEXT", "NVARCHAR", "DECIMAL", "BOOL",
    // "INT", and "BIGINT".
    func (ct ColumnType) DatabaseTypeName() string {
    	if ct.DataTypeValue.Valid {
    		return ct.DataTypeValue.String
    	}
    	return ct.SQLColumnType.DatabaseTypeName()
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 24 01:31:58 GMT 2022
    - 3.3K bytes
    - Viewed (0)
  2. internal/s3select/sql/parser_test.go

    	)
    
    	validCases := []string{
    		"count(*)",
    		"sum(2 + s.id)",
    		"sum(t)",
    		"avg(s.id[1])",
    		"coalesce(s.id[1], 2, 2 + 3)",
    
    		"cast(s as string)",
    		"cast(s AS INT)",
    		"cast(s as DECIMAL)",
    		"extract(YEAR from '2018-01-09')",
    		"extract(month from '2018-01-09')",
    
    		"extract(hour from '2018-01-09')",
    		"extract(day from '2018-01-09')",
    		"substring('abcd' from 2 for 2)",
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  3. src/bufio/example_test.go

    		fmt.Fprintln(os.Stderr, "reading input:", err)
    	}
    	fmt.Printf("%d\n", count)
    	// Output: 15
    }
    
    // Use a Scanner with a custom split function (built by wrapping ScanWords) to validate
    // 32-bit decimal input.
    func ExampleScanner_custom() {
    	// An artificial input source.
    	const input = "1234 5678 1234567901234567890"
    	scanner := bufio.NewScanner(strings.NewReader(input))
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  4. cmd/streaming-signature-v4_test.go

    		err := readCRLF(tt.reader)
    		if err != tt.expectedErr {
    			t.Errorf("Test %d: Expected %s, got %s this", i+1, tt.expectedErr, err)
    		}
    	}
    }
    
    // Tests parsing hex number into its uint64 decimal equivalent.
    func TestParseHexUint(t *testing.T) {
    	type testCase struct {
    		in      string
    		want    uint64
    		wantErr string
    	}
    	tests := []testCase{
    		{"x", 0, "invalid byte in chunk length"},
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 5.7K bytes
    - Viewed (0)
  5. internal/s3select/sql/parser.go

    // CastFunc represents CAST sql function
    type CastFunc struct {
    	Expr     *Expression `parser:" \"CAST\" \"(\" @@ "`
    	CastType string      `parser:" \"AS\" @(\"BOOL\" | \"INT\" | \"INTEGER\" | \"STRING\" | \"FLOAT\" | \"DECIMAL\" | \"NUMERIC\" | \"TIMESTAMP\") \")\" "`
    }
    
    // SubstringFunc represents SUBSTRING sql function
    type SubstringFunc struct {
    	Expr *PrimaryTerm `parser:" \"SUBSTRING\" \"(\" @@ "`
    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)
  6. src/archive/tar/strconv.go

    	// The size field ends at the first space.
    	nStr, rest, ok := strings.Cut(s, " ")
    	if !ok {
    		return "", "", s, ErrHeader
    	}
    
    	// Parse the first token as a decimal integer.
    	n, perr := strconv.ParseInt(nStr, 10, 0) // Intentionally parse as native int
    	if perr != nil || n < 5 || n > int64(len(s)) {
    		return "", "", s, ErrHeader
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 01 14:28:42 GMT 2023
    - 9K bytes
    - Viewed (0)
  7. src/archive/tar/reader.go

    //
    // Note that the GNU manual says that numeric values should be encoded in octal
    // format. However, the GNU tar utility itself outputs these values in decimal.
    // As such, this library treats values as being encoded in decimal.
    func readGNUSparseMap1x0(r io.Reader) (sparseDatas, error) {
    	var (
    		cntNewline int64
    		buf        bytes.Buffer
    		blk        block
    	)
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  8. internal/s3select/sql/funceval.go

    }
    
    // Allowed cast types
    const (
    	castBool      = "BOOL"
    	castInt       = "INT"
    	castInteger   = "INTEGER"
    	castString    = "STRING"
    	castFloat     = "FLOAT"
    	castDecimal   = "DECIMAL"
    	castNumeric   = "NUMERIC"
    	castTimestamp = "TIMESTAMP"
    )
    
    func (e *Expression) castTo(r Record, castType string, tableAlias string) (res *Value, err error) {
    	v, err := e.evalNode(r, tableAlias)
    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)
  9. misc/cgo/gmp/gmp.go

    		return os.ErrInvalid
    	}
    	p := C.CString(s)
    	defer C.free(unsafe.Pointer(p))
    	if C.mpz_set_str(&z.i[0], p, C.int(base)) < 0 {
    		return os.ErrInvalid
    	}
    	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
    }
    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. src/cmd/asm/internal/asm/parse.go

    func (p *Parser) address(operand []lex.Token) obj.Addr {
    	p.start(operand)
    	addr := obj.Addr{}
    	p.operand(&addr)
    	return addr
    }
    
    // parseScale converts a decimal string into a valid scale factor.
    func (p *Parser) parseScale(s string) int8 {
    	switch s {
    	case "1", "2", "4", "8":
    		return int8(s[0] - '0')
    	}
    	p.errorf("bad scale: %s", s)
    	return 0
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Feb 21 14:34:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
Back to top