Skip to content

Comments

switch to repl print#128

Merged
drizk1 merged 2 commits intomainfrom
repl_print
Apr 13, 2025
Merged

switch to repl print#128
drizk1 merged 2 commits intomainfrom
repl_print

Conversation

@drizk1
Copy link
Member

@drizk1 drizk1 commented Apr 12, 2025

switches to repl print.

only down side is this seems to make @aside @show_query _ no longer print the query at all.

Not sure if theres away around that.

besides something like where @collect gets put in the aside and the df gets saved

julia> @chain mtcars begin
           DB.@filter(!starts_with(model, "M"))
           DB.@group_by(cyl)
           DB.@summarize(mpg = mean(mpg))
           DB.@mutate(mpg_squared = mpg^2,
                      mpg_rounded = round(mpg),
                      mpg_efficiency = case_when(
                                        mpg >= cyl^2 , "efficient",
                                        mpg < 15.2 , "inefficient",
                                        "moderate"))
           DB.@filter(mpg_efficiency in ("moderate", "efficient"))
           DB.@arrange(desc(mpg_rounded))
       @aside a = DB.@collect _ 
       DB.@show_query
       end

@drizk1
Copy link
Member Author

drizk1 commented Apr 13, 2025

fixes the aside issue above by wrapping it in display()

should print to the repl now

@drizk1 drizk1 merged commit 506a9e1 into main Apr 13, 2025
4 checks passed
@drizk1 drizk1 deleted the repl_print branch April 19, 2025 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant