Skip to content

Conversation

@jonasfj
Copy link
Member

@jonasfj jonasfj commented Nov 21, 2025

Interested in your thoughts.

This will make it so that:

  • QuerySingle<T> has .update (as is right now)
  • Query<T> has .updateAll (instead of it being named .update).

The idea is that this will it slightly more likely that someone will notice something concerning when write:

await db.myTable.updateAll(...).execute();

instead of:

await db.myTable.byKey(...).update(...).execute();

Granted you'll now also have to write .updateAll if you have a .where clause.


IMO, it's a bit ugly, and All is a bit inappropriate, because it really means update multiple.

I think perhaps we should stick with .update() in both cases, and accept that SQL has sharp edges if you update a table with a WHERE clause :D

@jonasfj jonasfj requested review from isoos and sigurdm November 21, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant