Skip to content

How to execute an update query only (no RETURNING) #571

@stephenafamo

Description

@stephenafamo

Discussed in #570

Originally posted by atoncetti September 10, 2025
Hello,

I cannot find a way to execute a simple UPDATE query without the RETURNING part:

I have tried:

models.Records.Update(input.UpdateMod()).Exec(ctx, bob.Debug(options.Executor))

And

rec, err := models.Records.Query(...).One(ctx, options.Executor)

rec.Update(ctx, bob.Debug(options.Executor), &input.RecordSetter)

Both approaches generate a UPDATE ... RETURNING query and the RETURNING part, for my case, is triggering a RLS SELECT policy that fails.

What is the correct way to do it?

Thank you for your inputs!

bob v0.41.1
go 1.24.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions