code: func getUintFromNode(ctx sessionctx.Context, n ast.Node) (uVal uint64, isNull bool, isExpectedType bool) {
  	var val interface{}
  	switch v := n.(type) {
  	case *driver.ValueExpr:
  		val = v.GetValue()
  	case *driver.ParamMarkerExpr:
  		if !v.InExecute {
  			return 0, false, true
  		}
  		param, err := expression.GetParamExpression(ctx, v)
  		if err != nil {
  			return 0, false, false
  		}
  		str, isNull, err := expression.GetStringFromConstant(ctx, param)
  		if err != nil {
  			return 0, false, false
  		}
  		if isNull {
  			return 0, true, true
  		}
  		val = str
  	default:
  		return 0, false, false
  	}
  	switch v := val.(type) {
  	case uint64:
  		return v, false, true
  	case int64:
  		if v >= 0 {
  			return uint64(v), false, true
  		}
  	case string:
  		sc := ctx.GetSessionVars().StmtCtx
  		uVal, err := types.StrToUint(sc, v)
  		if err != nil {
  			return 0, false, false
  		}
  		return uVal, false, true
  	}
  	return 0, false, false
  }
docs: // getUintFromNode gets uint64 value from ast.Node.
  // For ordinary statement, node should be uint64 constant value.
  // For prepared statement, node is string. We should convert it to uint64.