code: func (d *Datum) SetValue(val interface{}) {
  	switch x := val.(type) {
  	case nil:
  		d.SetNull()
  	case bool:
  		if x {
  			d.SetInt64(1)
  		} else {
  			d.SetInt64(0)
  		}
  	case int:
  		d.SetInt64(int64(x))
  	case int64:
  		d.SetInt64(x)
  	case uint64:
  		d.SetUint64(x)
  	case float32:
  		d.SetFloat32(x)
  	case float64:
  		d.SetFloat64(x)
  	case string:
  		d.SetString(x)
  	case []byte:
  		d.SetBytes(x)
  	case *MyDecimal:
  		d.SetMysqlDecimal(x)
  	case Duration:
  		d.SetMysqlDuration(x)
  	case Enum:
  		d.SetMysqlEnum(x)
  	case BinaryLiteral:
  		d.SetBinaryLiteral(x)
  	case BitLiteral: // Store as BinaryLiteral for Bit and Hex literals
  		d.SetBinaryLiteral(BinaryLiteral(x))
  	case HexLiteral:
  		d.SetBinaryLiteral(BinaryLiteral(x))
  	case Set:
  		d.SetMysqlSet(x)
  	case json.BinaryJSON:
  		d.SetMysqlJSON(x)
  	case Time:
  		d.SetMysqlTime(x)
  	default:
  		d.SetInterface(x)
  	}
  }
docs: // SetValue sets any kind of value.