Skip to content

refactor: introduce FindTriggers query, remove FindTriggerById#5040

Merged
mversic merged 1 commit intohyperledger-iroha:mainfrom
DCNick3:remove-find-trigger-by-id
Sep 10, 2024
Merged

refactor: introduce FindTriggers query, remove FindTriggerById#5040
mversic merged 1 commit intohyperledger-iroha:mainfrom
DCNick3:remove-find-trigger-by-id

Conversation

@DCNick3
Copy link
Copy Markdown
Contributor

@DCNick3 DCNick3 commented Sep 9, 2024

Context

Part of #4933.

Closes #5037.

Solution

  • Introduce FindTriggers query that can be used to retrieve all active triggers with their original wasm code and such
  • Remove FindTriggerById and replace its usages by FindTriggers
  • Leave FindActiveTriggerIds be until we have query projections

Migration Guide

FindTriggerById:

client
  .query(FindTriggers::new())
  .filter_with(|trigger| trigger.id.eq(needle_trigger_id))
  .execute_single()?

Checklist

  • I've read CONTRIBUTING.md.
  • All review comments have been resolved.
  • All CI checks pass.

@github-actions github-actions bot added the api-changes Changes in the API for client libraries label Sep 9, 2024
@s8sato s8sato self-assigned this Sep 9, 2024
Signed-off-by: ⭐️NINIKA⭐️ <dcnick3@users.noreply.github.com>
@mversic mversic force-pushed the remove-find-trigger-by-id branch from fb0c553 to 5b3b91a Compare September 10, 2024 07:59
@mversic mversic merged commit 87f3dbd into hyperledger-iroha:main Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-changes Changes in the API for client libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get rid of FindTriggerById

4 participants