Skip to content

Remove TryInsertResult::Empty#3103

Open
Huliiiiii wants to merge 1 commit into
SeaQL:masterfrom
Huliiiiii:try-insert-empty
Open

Remove TryInsertResult::Empty#3103
Huliiiiii wants to merge 1 commit into
SeaQL:masterfrom
Huliiiiii:try-insert-empty

Conversation

@Huliiiiii

Copy link
Copy Markdown
Member

This fixes a legacy semantic issue. In practice, the Empty branch is usually unreachable because empty inputs are already handled by InsertMany, so removing it makes the semantics clearer.

At this point, TryInsertResult is effectively equivalent to Option, so it could be further simplified to use Option instead of a custom type. Users can still reproduce the previous TryInsert::Conflict semantics with their own input.is_empty() and last_insert_id.is_none() checks when needed.

The changelog needs to be updated to explain the corresponding behavioral changes.

Breaking Changes

  • Remove TryInsertResult::Empty

@Huliiiiii Huliiiiii requested review from Expurple and tyt2y3 June 30, 2026 17:11
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