Skip to content

Commit

Permalink
fix: deprecate callback stream/1
Browse files Browse the repository at this point in the history
Closes #13
  • Loading branch information
joeljuca committed Jan 29, 2024
1 parent c907115 commit 7b364be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/swiss_schema.ex
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ defmodule SwissSchema do
> See Ecto's [`stream/2`](https://hexdocs.pm/ecto/Ecto.Repo.html#c:stream/2) for extensive info.
"""
@doc deprecated: "Use Ecto.Repo's stream/2 instead"
@doc group: "Ecto.Repo Query API"
@callback stream(opts :: Keyword.t()) :: Enum.t()

Expand Down Expand Up @@ -604,6 +605,7 @@ defmodule SwissSchema do
insert_or_update!.(changeset, opts)
end

@deprecated "Use Ecto.Repo's stream/2 instead"
@impl SwissSchema
def stream(opts \\ []) do
repo = Keyword.get(opts, :repo, unquote(repo))
Expand Down

0 comments on commit 7b364be

Please sign in to comment.