|
|
@@ -38,10 +38,10 @@ description() ->
|
|
|
parse_query(undefined) ->
|
|
|
undefined;
|
|
|
parse_query(Sql) ->
|
|
|
- case re:run(Sql, "'%[ucCad]'", [global, {capture, all, list}]) of
|
|
|
+ case re:run(Sql, ?RE_PLACEHOLDER, [global, {capture, all, list}]) of
|
|
|
{match, Variables} ->
|
|
|
Params = [Var || [Var] <- Variables],
|
|
|
- {re:replace(Sql, "'%[ucCad]'", "?", [global, {return, list}]), Params};
|
|
|
+ {re:replace(Sql, ?RE_PLACEHOLDER, "?", [global, {return, list}]), Params};
|
|
|
nomatch ->
|
|
|
{Sql, []}
|
|
|
end.
|