Skip to content

Commit 7637634

Browse files
committed
Comment doc's of commented functions
1 parent b6d1dc4 commit 7637634

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

lib/vbt/repo.ex

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -48,37 +48,37 @@ defmodule VBT.Repo do
4848
"""
4949
@callback fetch_one(Ecto.Queryable.t(), fetch_opts) :: {:ok, any} | {:error, String.t()}
5050

51-
@doc """
52-
Runs the given function inside a transaction.
51+
# @doc """
52+
# Runs the given function inside a transaction.
5353

54-
This function is a wrapper around `Ecto.Repo.transaction`, with the following differences:
54+
# This function is a wrapper around `Ecto.Repo.transaction`, with the following differences:
5555

56-
- It accepts only a lambda of arity 0 or 1 (i.e. it doesn't work with multi).
57-
- If the lambda returns `{:ok, result}` the transaction is committed, and `{:ok, result}` is
58-
returned.
59-
- If the lambda returns `{:error, reason}` the transaction is rolled back, and
60-
`{:error, reason}` is returned.
61-
- If the lambda returns any other kind of result, an exception is raised, and the transaction
62-
is rolled back.
63-
"""
56+
# - It accepts only a lambda of arity 0 or 1 (i.e. it doesn't work with multi).
57+
# - If the lambda returns `{:ok, result}` the transaction is committed, and `{:ok, result}` is
58+
# returned.
59+
# - If the lambda returns `{:error, reason}` the transaction is rolled back, and
60+
# `{:error, reason}` is returned.
61+
# - If the lambda returns any other kind of result, an exception is raised, and the transaction
62+
# is rolled back.
63+
# """
6464

6565
# @callback transact((-> result) | (module -> result), Keyword.t()) :: result
6666
# when result: {:ok, any} | {:error, any}
6767

68-
@doc """
69-
Deletes a single database row matching the given query.
68+
# @doc """
69+
# Deletes a single database row matching the given query.
7070

71-
This function allows you to delete a single database row, without needing to load it from the
72-
database first.
71+
# This function allows you to delete a single database row, without needing to load it from the
72+
# database first.
7373

74-
The function can optionally return the deleted row if you provide the `:select` clause in the
75-
input query. In this case, the function will return `{:ok, selected_term}` on success. If
76-
the `:select` clause is not present, the function will return `:ok` on success.
74+
# The function can optionally return the deleted row if you provide the `:select` clause in the
75+
# input query. In this case, the function will return `{:ok, selected_term}` on success. If
76+
# the `:select` clause is not present, the function will return `:ok` on success.
7777

78-
The function succeeds only if exactly one row is matched by the given query. If there are
79-
multiple rows matching the given query, nothing will be deleted, and an error is returned.
80-
Likewise, the function returns an error if there are no rows matching the given query.
81-
"""
78+
# The function succeeds only if exactly one row is matched by the given query. If there are
79+
# multiple rows matching the given query, nothing will be deleted, and an error is returned.
80+
# Likewise, the function returns an error if there are no rows matching the given query.
81+
# """
8282

8383
# @callback delete_one(Ecto.Queryable.t()) ::
8484
# :ok | {:ok, any} | {:error, :not_found | :multiple_rows}
@@ -164,7 +164,7 @@ defmodule VBT.Repo do
164164
end
165165
end
166166

167-
@doc false
167+
# @doc false
168168
# credo:disable-for-next-line Credo.Check.Readability.Specs
169169
# def transact(repo, fun, opts) do
170170
# repo.transaction(

0 commit comments

Comments
 (0)