Skip to content

Commit

Permalink
Add note to ZQuery#succeed
Browse files Browse the repository at this point in the history
  • Loading branch information
kyri-petrou committed Jun 22, 2024
1 parent a915e60 commit e2fb1de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zio-query/shared/src/main/scala/zio/query/ZQuery.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1657,6 +1657,8 @@ object ZQuery {

/**
* Lazily constructs a query that succeeds with the specified value.
*
* '''NOTE''': If the `value` is side-effect free, prefer using [[succeedNow]] instead
*/
def succeed[A](value: => A)(implicit trace: Trace): ZQuery[Any, Nothing, A] =
ZQuery(ZIO.succeed(Result.done(value)))
Expand Down

0 comments on commit e2fb1de

Please sign in to comment.