# Create commands with result :none

**URL:** <https://discourse.rom-rb.org/t/create-commands-with-result-none/479>\
**Category:** Issues\
**Created:** [September 14, 2021, 11:45am UTC](https://discourse.rom-rb.org/t/create-commands-with-result-none/479 "2021-09-14T11:45:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wuarmin](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/wuarmin/32/233_2.png) [@wuarmin](https://discourse.rom-rb.org/u/wuarmin)\
**Post date:** [September 14, 2021, 11:45am UTC](https://discourse.rom-rb.org/t/create-commands-with-result-none/479/1 "2021-09-14T11:45:59Z")

</div>

Hey,

I have the use-case of returning nothing from a command. Here’s an example of an bulk-update-command:

```ruby
def update_status(old_status_id:, new_status_id:)
  records
    .where(status_id: old_status_id)
    .command(:update)
    .call({ status_id: "created" })
end

```

I don’t know how many records will be updated and I don’t want all data records to be queried with a select at the end. At the moment you can’t prevent that. You have to choose between result: :one(default), or :many.

What do you think? Did I miss something?

Thank you and best regards!

---

<div class="post-metadata">

**Author:** ![paddor](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/paddor/32/231_2.png) [@paddor](https://discourse.rom-rb.org/u/paddor)\
**Post date:** [May 18, 2022, 2:37pm UTC](https://discourse.rom-rb.org/t/create-commands-with-result-none/479/2 "2022-05-18T14:37:48Z")

</div>

I wanna know this too. I don’t need the appended SELECT query after INSERTing multiple records.
