Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for nullfloat64 (0.29 sec)

  1. src/database/sql/sql_test.go

    func TestNullFloat64Param(t *testing.T) {
    	spec := nullTestSpec{"nullfloat64", "float64", [6]nullTestRow{
    		{NullFloat64{31.2, true}, 1, NullFloat64{31.2, true}},
    		{NullFloat64{13.1, false}, 1, NullFloat64{0, false}},
    		{-22.9, 1, NullFloat64{-22.9, true}},
    		{NullFloat64{33.81, true}, 1, NullFloat64{33.81, true}},
    		{NullFloat64{222, false}, 1, NullFloat64{0, false}},
    		{10, NullFloat64{31.2, false}, nil},
    	}}
    	nullTestRun(t, spec)
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 111.6K bytes
    - Viewed (0)
  2. src/database/sql/sql.go

    	}
    	return int64(n.Byte), nil
    }
    
    // NullFloat64 represents a float64 that may be null.
    // NullFloat64 implements the [Scanner] interface so
    // it can be used as a scan destination, similar to [NullString].
    type NullFloat64 struct {
    	Float64 float64
    	Valid   bool // Valid is true if Float64 is not NULL
    }
    
    // Scan implements the [Scanner] interface.
    func (n *NullFloat64) Scan(value any) error {
    	if value == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 103.6K bytes
    - Viewed (0)
Back to top