Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for nullint16 (0.42 sec)

  1. src/database/sql/sql_test.go

    	spec := nullTestSpec{"nullint16", "int16", [6]nullTestRow{
    		{NullInt16{31, true}, 1, NullInt16{31, true}},
    		{NullInt16{-22, false}, 1, NullInt16{0, false}},
    		{22, 1, NullInt16{22, true}},
    		{NullInt16{33, true}, 1, NullInt16{33, true}},
    		{NullInt16{222, false}, 1, NullInt16{0, false}},
    		{0, NullInt16{31, false}, nil},
    	}}
    	nullTestRun(t, spec)
    }
    
    func TestNullByteParam(t *testing.T) {
    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 ns.String, nil
    }
    
    // NullInt64 represents an int64 that may be null.
    // NullInt64 implements the [Scanner] interface so
    // it can be used as a scan destination, similar to [NullString].
    type NullInt64 struct {
    	Int64 int64
    	Valid bool // Valid is true if Int64 is not NULL
    }
    
    // Scan implements the [Scanner] interface.
    func (n *NullInt64) 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)
  3. scan.go

    			*dest = append(*dest, mapValue)
    		}
    	case *int, *int8, *int16, *int32, *int64,
    		*uint, *uint8, *uint16, *uint32, *uint64, *uintptr,
    		*float32, *float64,
    		*bool, *string, *time.Time,
    		*sql.NullInt32, *sql.NullInt64, *sql.NullFloat64,
    		*sql.NullBool, *sql.NullString, *sql.NullTime:
    		for initialized || rows.Next() {
    			initialized = false
    			db.RowsAffected++
    			db.AddError(rows.Scan(dest))
    		}
    	default:
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:57:36 UTC 2024
    - 10K bytes
    - Viewed (0)
Back to top