Skip to content

Add set_ne aliases to ActiveValue#3040

Merged
tyt2y3 merged 2 commits intoSeaQL:masterfrom
WaterWhisperer:active-value-set-ne
Apr 8, 2026
Merged

Add set_ne aliases to ActiveValue#3040
tyt2y3 merged 2 commits intoSeaQL:masterfrom
WaterWhisperer:active-value-set-ne

Conversation

@WaterWhisperer
Copy link
Copy Markdown
Contributor

PR Info

Changes

  • add ActiveValue::set_ne as a shorter alias for set_if_not_equals
  • add ActiveValue::set_ne_and as a shorter alias for set_if_not_equals_and
  • keep the existing methods as compatibility aliases
  • update the ActiveValue docs and examples in both sea-orm and sea-orm-sync to prefer the shorter names

@WaterWhisperer
Copy link
Copy Markdown
Contributor Author

Note that ActiveModelTrait also has set_if_not_equals, but it's a trait instead of an enum like ActiveValue, maybe it doesn't need a shorter set_ne?

@WaterWhisperer
Copy link
Copy Markdown
Contributor Author

Also, since set_if_not_equals is retained as an alias, I haven't updated the original call to set_ne. Looking forward to receiving reviews and thoughts.

@Huliiiiii Huliiiiii requested review from Expurple and tyt2y3 April 7, 2026 08:36
@Huliiiiii
Copy link
Copy Markdown
Member

Actually, I prefer set_if_ne. set_ne feels a bit unnatural to me.

Copy link
Copy Markdown
Member

@Expurple Expurple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I slightly prefer set_ne over set_if_ne because it's shorter and clear enough to me.

@WaterWhisperer
Copy link
Copy Markdown
Contributor Author

Seems that there are different opinions on the short name, perhaps more opinions are needed :)

Copy link
Copy Markdown
Member

@Expurple Expurple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tyt2y3 tyt2y3 merged commit a10b987 into SeaQL:master Apr 8, 2026
39 checks passed
@WaterWhisperer WaterWhisperer deleted the active-value-set-ne branch April 9, 2026 01:51
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.

Shorter name for set_if_not_equals

4 participants