HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Search
-
Re: SQL/Gdn_Model: Get previous and next entry WHERE...
-
Re: SQL/Gdn_Model: Get previous and next entry WHERE...
he want to make a model, not just make calls. Every call isn't necessarily bad, not alt all. A single query may actually less efficient that two. In this case I don't think you will get much difference. GetSelect has some uses, but you are forfeiting some useful abstraction which you need to plug back in. -
Re: SQL/Gdn_Model: Get previous and next entry WHERE...
Most of this would happen on the client side, only if the comment is not on the same page and wasn't already loaded into the dom, it will make a request, otherwise, the script just pulls it from the page or a cache variable. But yes, I will have to throttle requests, thanks for the suggestion. The idea is to eliminate the… -
Re: SQL/Gdn_Model: Get previous and next entry WHERE...
I didn't realise he was doing it for every comment, I assumed he was just doing it for the session user. I agree there shouldn’t be a loop of queries. If you have to do then you would pre query and create lookup. The query would be complex though, it would make more sense to stash the CommentIDs per UserID and… -
Re: SQL/Gdn_Model: Get previous and next entry WHERE...
Would it be a better idea to store the link when the mention is saved, each comment has a permalink? You could put the link in some kind of attribute on client side in the mention link, and make sure that is retained. Do the same for quotes. I have definitely seen such a system for quotes. In reality is all you need to… -
Re: SQL/Gdn_Model: Get previous and next entry WHERE...
Out in the weird and wonderful world of no-SQL, you are actively encourage to make short calls where necessarily. It is your responsibility to come up with an efficient data model, and define relationships between data. It can be very fast indeed done well. SQL is a little bit different becuase it is relational, however it… -
Re: SQL/Gdn_Model: Get previous and next entry WHERE...
I second that. From the description, it looks like a "navigator" of some sort (something like next comment, previous comment), which is usually best avoided, due to the excessive workload it involves. Essentially, it adds two extra queries every time a comment is retrieved, and that's very inefficient. Regarding the actual…
7 results