Skip to content

Commit

Permalink
Properly document command in Postgrex.Result, closes #546
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed May 30, 2021
1 parent 6cc68d8 commit af1d931
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/postgrex/result.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ defmodule Postgrex.Result do
@moduledoc """
Result struct returned from any successful query. Its fields are:
* `command` - An atom of the query command, for example: `:select` or `:insert`;
* `command` - An atom or a list of atoms of the query command, for example:
`:select`, `:insert`, or `[:rollback, :release]`;
* `columns` - The column names;
* `rows` - The result set. A list of lists, each inner list corresponding to a
row, each element in the inner list corresponds to a column;
Expand All @@ -13,7 +14,7 @@ defmodule Postgrex.Result do
"""

@type t :: %__MODULE__{
command: atom,
command: atom | [atom],
columns: [String.t()] | nil,
rows: [[term] | binary] | nil,
num_rows: integer,
Expand Down

0 comments on commit af1d931

Please sign in to comment.