@@ -311,24 +311,27 @@ defmodule Ecto.Adapters.SQL do
311
311
312
312
Adapter | Supported opts
313
313
---------------- | --------------
314
- Postgrex | `analyze`, `verbose`, `costs`, `settings`, `buffers`, `timing`, `summary`
315
- MyXQL | None
314
+ Postgrex | `analyze`, `verbose`, `costs`, `settings`, `buffers`, `timing`, `summary`, `format`
315
+ MyXQL | `format`
316
316
317
- _Postgrex_: Check [PostgreSQL doc](https://www.postgresql.org/docs/current/sql-explain.html)
318
- for version compatibility.
317
+ All options except `format` are boolean valued and default to `false`.
319
318
320
- Also note that:
319
+ The allowed `format` values are `:map`, `:yaml`, and `:text`:
320
+ * `:map` is the deserialized JSON encoding.
321
+ * `:yaml` and `:text` return the result as a string.
321
322
322
- * Currently `:map`, `:yaml`, and `:text` format options are supported
323
- for PostgreSQL. Only `map` and `text` are supported for MyXQL.
324
- * `:map` is the deserialized JSON encoding.
325
- * `:yaml` and `text` return the result as a string;
323
+ The built-in adapters support the following formats:
324
+ * Postgrex: `:map`, `:yaml` and `:text`
325
+ * MyXQL: `:map` and `:text`
326
326
327
- * Any other value passed to `opts` will be forwarded to the underlying
328
- adapter query function, including Repo shared options such as `:timeout`;
327
+ Any other value passed to `opts` will be forwarded to the underlying adapter query function, including
328
+ shared Repo options such as `:timeout`. Non built-in adapters may have specific behaviour and you should
329
+ consult their documentation for more details.
329
330
330
- * Non built-in adapters may have specific behavior and you should consult
331
- their own documentation.
331
+ For version compatiblity, please check your database's documentation:
332
+
333
+ * _Postgrex_: [PostgreSQL doc](https://www.postgresql.org/docs/current/sql-explain.html).
334
+ * _MyXQL_: [MySQL doc](https://dev.mysql.com/doc/refman/8.0/en/explain.html).
332
335
333
336
"""
334
337
@ spec explain ( pid ( ) | Ecto.Repo . t | Ecto.Adapter . adapter_meta ,
0 commit comments