Skip to content

Commit

Permalink
Merge pull request #232 from mbuhot/master
Browse files Browse the repository at this point in the history
Fix typespec and README for rows as lists not tuples
  • Loading branch information
liveforeverx committed Aug 30, 2018
2 parents 6f108eb + fd50d8e commit 78cd8a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -29,7 +29,7 @@ After you are done, run `mix deps.get` in your shell to fetch and compile Mariae
iex(5)> Mariaex.query(p, "SELECT id, title FROM test1")
{:ok,
%Mariaex.Result{columns: ["id", "title"], command: :select, num_rows: 2,
rows: [{1, "test"}, {2, "test2"}]}}
rows: [[1, "test"], [2, "test2"]}}
```

## Configuration
Expand Down
6 changes: 3 additions & 3 deletions lib/mariaex/structs.ex
Expand Up @@ -3,14 +3,14 @@ defmodule Mariaex.Result do
Result struct returned from any successful query. Its fields are:
* `columns` - The column names;
* `rows` - The result set. A list of tuples, each tuple corresponding to a
row, each element in the tuple corresponds to a column;
* `rows` - The result set. A list of lists, each list corresponding to a
row, each element of the inner list corresponds to a column value;
* `num_rows` - The number of fetched or affected rows;
"""

@type t :: %__MODULE__{
columns: [String.t] | nil,
rows: [tuple] | nil,
rows: [[any]] | nil,
last_insert_id: integer,
num_rows: integer,
connection_id: nil}
Expand Down

0 comments on commit 78cd8a7

Please sign in to comment.