this post was submitted on 17 Jun 2023
1 points (55.6% liked)
Experienced Devs
3956 readers
1 users here now
A community for discussion amongst professional software developers.
Posts should be relevant to those well into their careers.
For those looking to break into the industry, are hustling for their first job, or have just started their career and are looking for advice, check out:
- Logo base by Delapouite under CC BY 3.0 with modifications to add a gradient
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
If the function is doing input validation, it might be cleaner to have a single code path for both creation and update. Especially if you eventually assemble an SQL statement that is INSERT OR UPDATE.