Ecto.Adapters.SQL.query/4

Parsed documentation:
View on GitHub
Runs custom SQL query on given repo.

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. `nil` may 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 a `delete` command without returning would)

## Options

  * `:timeout` - The time in milliseconds to wait for the call to finish,
    `:infinity` will wait indefinitely (default: 5000)

  * `:log` - When false, does not log the query

## Examples

    iex> Ecto.Adapters.SQL.query(MyRepo, "SELECT $1 + $2", [40, 2])
    %{rows: [{42}], num_rows: 1}
Suggestions:
Please help! Open an issue on GitHub if this assessment is incorrect.