Skip to content

Commit a999e25

Browse files
committed
fix
1 parent 6fd2045 commit a999e25

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/code_instead.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ struct SourceCode{Source}
44
code::Expr
55
end
66

7-
# Every time two `SourceCode` objects are combined, check to see whether they both come from the same source
7+
# Every time `SourceCode` objects are combined, check to see whether they all come from the same source
88
function pop_sources!(sources, something)
99
something
1010
end

src/translate.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ function translate(call::Expr; primary = true)
1616
translate_call(split_call(call)...; primary = primary)
1717
end
1818

19-
# The default translate implementation assumes a 1-1 mapping between Julia functions and SQL functions
20-
function translate_default(location, function_type, SQL_call)
19+
# A 1-1 mapping between Julia functions and SQL functions
20+
function translate_default(location, a_function, SQL_call)
2121
result = :(
22-
function translate_call(::typeof($function_type), arguments...; primary = true)
22+
function translate_call(::typeof($a_function), arguments...; primary = true)
2323
$SQLExpression($SQL_call, $map_unrolled(
2424
argument -> $translate(argument; primary = primary),
2525
arguments
@@ -144,6 +144,7 @@ translate_call(::typeof(occursin), needle::Regex, haystack; primary = true) =
144144
SQLExpression(
145145
:LIKE,
146146
translate(haystack; primary = primary),
147+
# * => %, . => _
147148
replace(replace(needle.pattern, r"(?<!\\)\.\*" => "%"), r"(?<!\\)\." => "_")
148149
)
149150
@translate_default occursin :LIKE

0 commit comments

Comments
 (0)