@@ -390,16 +390,6 @@ translate_call(::typeof(take), iterator, number) =
390390 string (translate (iterator), " LIMIT " , number)
391391 end
392392
393- # utilities
394-
395- change_row (arbitrary_function, iterator, arguments... ) = model_row (iterator)
396-
397- ignore_name (new_name_model:: Pair{Symbol, <: OutsideCode} ) =
398- translate (new_name_model. second. code)
399-
400- column_or_columns (row:: NamedTuple ) = map (ignore_name, (pairs (row)... ,))
401- column_or_columns (outside_code:: OutsideCode ) = (translate (outside_code. code),)
402-
403393# SQLite interface
404394
405395to_symbols (them) = map_unrolled (Symbol, (them... ,))
@@ -410,6 +400,8 @@ get_column_names(database::DB, table_name) =
410400
411401# dispatch
412402
403+ change_row (arbitrary_function, iterator, arguments... ) = model_row (iterator)
404+
413405model_row (code:: Expr ) =
414406 if @capture code call_ (arguments__)
415407 change_row (call, arguments... )
@@ -421,7 +413,11 @@ translate(something) = something
421413
422414translate (code:: Expr ) =
423415 if @capture code call_ (arguments__)
424- translate_call (call, arguments... )
416+ translate_call (if call === ifelse
417+ if_else
418+ else
419+ call
420+ end , arguments... )
425421 elseif @capture code left_ && right_
426422 translate_call (& , left, right)
427423 elseif @capture code left_ | right_
0 commit comments