@@ -396,16 +396,6 @@ translate_call(::typeof(take), iterator, number) =
396396 string (translate (iterator), " LIMIT " , number)
397397 end
398398
399- # utilities
400-
401- change_row (arbitrary_function, iterator, arguments... ) = model_row (iterator)
402-
403- ignore_name (new_name_model:: Pair{Symbol, <: OutsideCode} ) =
404- translate (new_name_model. second. code)
405-
406- column_or_columns (row:: NamedTuple ) = map (ignore_name, (pairs (row)... ,))
407- column_or_columns (outside_code:: OutsideCode ) = (translate (outside_code. code),)
408-
409399# SQLite interface
410400
411401using DataFrames: DataFrame
@@ -419,6 +409,8 @@ submit_to(database::DB, text) = DataFrame(SQLite.Query(database, text))
419409
420410# dispatch
421411
412+ change_row (arbitrary_function, iterator, arguments... ) = model_row (iterator)
413+
422414model_row (code:: Expr ) =
423415 if @capture code call_ (arguments__)
424416 change_row (call, arguments... )
@@ -430,7 +422,11 @@ translate(something) = something
430422
431423translate (code:: Expr ) =
432424 if @capture code call_ (arguments__)
433- translate_call (call, arguments... )
425+ translate_call (if call === ifelse
426+ if_else
427+ else
428+ call
429+ end , arguments... )
434430 elseif @capture code left_ && right_
435431 translate_call (& , left, right)
436432 elseif @capture code left_ | right_
0 commit comments