-
Notifications
You must be signed in to change notification settings - Fork 61
Update StringBuilder.cls #9
base: master
Are you sure you want to change the base?
Conversation
String list support in order to low the cpu consumption when creating the string
String list support in order to low the cpu consumption when creating the string
Conflicts: df12/src/classes/StringBuilder.cls
Thanks for this contribution! However there are a couple of things that prevent me merging this unfortunately... Firstly this repo is no longer used to manage the latest apex enterprise patterns library, it was retired and instead as per the readme the latest library is moved to https://github.com/financialforcedev/fflib-apex-common. My aim is to keep this repo the same as per the presentations in 2012. Secondly, while i can see what your wanting to do, and I'm curious as to your uses cases and motivations? As it stands it does I am afraid make me feel that it could lead to bad programming practices and also odd behaviour in the calling code. Queries, like DML, should not be performed in loops or over and over, so if the same query needs to be made twice or more in one execution context it's usually a code smell for a poor optimisation or design (though as with all things there can be exceptions of course). Also your logic does not currently take into account variances in the variables used in the criteria, so while the SOQL string maybe the same between two calls, the variables / filter values might be different. Can i suggest that you raise a GitHub Issue over in the main repo, to discuss the use cases and requirement you have and we can brainstorm together? 👍 https://github.com/financialforcedev/fflib-apex-common/issues |
Hello Andrew, Thanks for your analysis. I do not understand you point for the variable/filter. If the query is a string, it contains every filter and variables stringified in my point of view. The only limitation should be the sharing but in the same context it does not apply I think. I did not see the second repo, thanks for the information. :) |
Your welcome! Regarding the point on variable/filter, i was thinking of a query like this 'Select Id from Account where Ids in :myIds', as a string form the query matches. However the contents of 'myIds' would be different between each call. If your not using variables in your queries then your code is fine. |
Ok, I was rather thinking about dynamic SOQL query construct explicitly like On Thu Feb 19 2015 at 14:14:23 Andrew Fawcett [email protected]
|
Your very welcome, check out the links in the README to various Wiki and my own blog entries. |
Bonjour financialforcedev/df12-apex-enterprise-patterns, L'équipe d'IQ Elite Ce message est destiné à [email protected]. Si vous ne souhaitez pas recevoir d'autres messages de la part de IQ Elite, veuillez cliquer sur ce lien : a.iqelite.com/common/unsubscribe/?code=19cfad4d&email=[email protected].&hg=BLWDpeq7cT IQ Elite est un service de IQ Elite S.L., dont le siège se trouve à : C/ Gran De Gràcia 15, 1a 1a, 08012 Barcelone, Espagne. |
Sorry @ForceComDeveloper i don't understand your last message? |
String list support in order to low the cpu consumption when creating the string