docs: Document the ORM upsert methods#701
Open
marcelomendoncasoares wants to merge 2 commits into
Open
Conversation
Use a single-word heading in line with Create, Read, Update, and Delete, give the single-row case its own subsection so it mirrors the Create section, switch to gerund subheadings, and link the transactions and filtering pages instead of naming the concepts in passing.
marcelomendoncasoares
marked this pull request as ready for review
July 21, 2026 18:40
marcelomendoncasoares
marked this pull request as draft
July 21, 2026 18:52
marcelomendoncasoares
marked this pull request as ready for review
July 21, 2026 18:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
upsertRowand the batchupsertare generated on every table model but were missing from the CRUD page, so there was no documented way to insert-or-update a row.Changes
Companyexample model with auniquename,address,employeeCount, andisActive, so the conflict examples have something to conflict on. Theaddressfield was already used by an existing example on the page but missing from the model.upsertRowwithconflictColumns, and explain the default update set.idcolumn can be a conflict target.updateColumnsandupdateWhere, and explain whyupsertRowreturns a nullable value.upsert: atomicity, transaction support, a result that can be shorter than the input, andnoReturn.Reference
idas conflict target onupsertandupsertRowserverpod#5342, fix: Encode column values correctly in upsert insert queries for SQLite serverpod#5353, fix: FixupsertwithupdateWherethat matches rows on SQLite serverpod#5428