So if you have reviewed the function and yes it should return a struct but I’m getting an error something like this
** (ArgumentError) parameters must be of length 0 for query
But if I don’t provide any argument it’s giving me this
Ecto.Adapters.SQL.query(Wizex.Repo, "SELECT * FROM game WHERE name ILIKE '$1#%'", [])
[debug] QUERY OK db=33.9ms queue=5.2ms idle=9048.4ms
SELECT * FROM game WHERE name ILIKE '$1#%' []
{:ok,
%Postgrex.Result{
columns: ["id", "name"],
command: :select,
connection_id: 1605,
messages: [],
num_rows: 0,
rows: []
}}
So from the docs
In case of success, it must return an :ok tuple containing a map with at least two keys:
:num_rows- the number of rows affected:rows- the result set as a list.nilmay be returned instead of the list if the command does not yield any row as result (but still yields the number of affected rows, like adeletecommand without returning would)






















