diff --git a/src/DataFramesMeta.jl b/src/DataFramesMeta.jl index 4d810b9f..c424b2ba 100644 --- a/src/DataFramesMeta.jl +++ b/src/DataFramesMeta.jl @@ -21,7 +21,7 @@ export @attach, @distinct, @rdistinct, @distinct!, @rdistinct!, @eachrow, @eachrow!, @byrow, @passmissing, @astable, @kwarg, - @based_on, @where # deprecated + @based_on, @where, @with # deprecated const DOLLAR = raw"$" diff --git a/src/eachrow.jl b/src/eachrow.jl index d9079711..d6c4ef50 100644 --- a/src/eachrow.jl +++ b/src/eachrow.jl @@ -68,7 +68,7 @@ function eachrow_helper(df, body, deprecation_warning) let $_df = $df local _N = nrow($_df) local _DF = @transform($_df, $(e_newcols...)) - $(with_helper(:_DF, :(for row = 1:_N + $(attach_helper(:_DF, :(for row = 1:_N $(eachrow_replace(e_body)) end))) _DF @@ -224,7 +224,7 @@ function eachrow!_helper(df, body) let $_df = $df local _N = nrow($_df) local _DF = @transform!($_df, $(e_newcols...)) - $(with_helper(:_DF, :(for row = 1:_N + $(attach_helper(:_DF, :(for row = 1:_N $(eachrow_replace(e_body)) end))) _DF diff --git a/src/linqmacro.jl b/src/linqmacro.jl index 9e77dd34..108b4eb5 100644 --- a/src/linqmacro.jl +++ b/src/linqmacro.jl @@ -111,7 +111,7 @@ end linq(::SymbolParameter{s}, args...) where {s} = Expr(:call, s, args...) function linq(::SymbolParameter{:with}, d, body) - with_helper(d, body) + attach_helper(d, body) end function linq(::SymbolParameter{:where}, d, args...) diff --git a/src/macros.jl b/src/macros.jl index 600b2d5d..73bcfd45 100644 --- a/src/macros.jl +++ b/src/macros.jl @@ -668,7 +668,7 @@ end Deprecated version of `@attach`, see `?@with` for details. """ -macro with(x, args...) +macro with(d, body) @warn "`@with is deprecated, use `@with` instead." esc(attach_helper(d, body)) end