Re: [testdrivendevelopment] "Find or Create" functions: a discussion
"Voris, John" <[email protected]> Mon, 25 Nov 2019 15:15:21 -0800
| Newsgroups | gmane.comp.programming.test-driven-development |
|---|---|
| Message-ID | <[email protected]> |
--LFsdOUJ81IVIK66NWTWL Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I have a system that is doing this part of the time.=C2=A0 It is fraught wi= th problems when doing the search.=C2=A0 In your case, searching for "John = Smith" may return a set of records, while the creation is creating a record= which needs some unique identifier for the real John Smith you want to add= to the database.=C2=A0 Even just using first name and last name , or parti= al of SSN , etc=C2=A0 makes for complicated code for what keys you are goin= g to use , are those keys also using SOUNDEX() feature of SQL ?=C2=A0 For t= hose who will follow you, just make it classical CRUD application without m= ixed or confusing methods or functions. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#35787): https://groups.io/g/testdrivendevelopment/mess= age/35787 Mute This Topic: https://groups.io/mt/61872506/3268755 Group Owner: [email protected] Unsubscribe: https://groups.io/g/testdrivendevelopment/leave/6156322/74455= 6386/xyzzy [[email protected]] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --LFsdOUJ81IVIK66NWTWL Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable I have a system that is doing this part of the time. It is fraught wi= th problems when doing the search. In your case, searching for "John = Smith" may return a set of records, while the creation is creating a record= which needs some unique identifier for the real John Smith you want to add= to the database. Even just using first name and last name , or parti= al of SSN , etc makes for complicated code for what keys you are goin= g to use , are those keys also using SOUNDEX() feature of SQL ? For t= hose who will follow you, just make it classical CRUD application without m= ixed or confusing methods or functions. <div width=3D"1" style=3D"color:white;clear:both">_._,_._,_</div> <hr> Groups.io Links:<p> You receive all messages sent to this group. <p> <a target=3D"_blank" href=3D"https://groups.io/g/testdrivendevelopment/mes= sage/35787">View/Reply Online (#35787)</a> | <a target=3D"_blank" href=3D"mailto:[email protected]?subj= ect=3DRe:%20Re%3A%20%5Btestdrivendevelopment%5D%20%22Find%20or%20Create%22%= 20functions%3A%20a%20discussion">Reply To Group</a> | <a target=3D"_blank" href=3D"mailto:[email protected]?subject= = =3DPrivate:%20Re:%20Re%3A%20%5Btestdrivendevelopment%5D%20%22Find%20or%20C= reate%22%20functions%3A%20a%20discussion">Reply To Sender</a> | <a target=3D"_blank" href=3D"https://groups.io/mt/61872506/3268755">Mu= te This Topic</a> | <a href=3D"https://groups.io/g/testdrivendevelopment/post">New Topic</a>= <br> <br> <a href=3D"https://groups.io/g/testdrivendevelopment/editsub/3268755">Your= Subscription</a> | <a href=3D"mailto:[email protected]">Contact Group Own= er</a> | <a href=3D"https://groups.io/g/testdrivendevelopment/leave/6156322/7445563= 86/xyzzy">Unsubscribe</a> [[email protected]]<br> <div width=3D"1" style=3D"color:white;clear:both">_._,_._,_</div> --LFsdOUJ81IVIK66NWTWL--