4 ms·
Constructing the query as a string is actually much more difficult for clients. Basically it comes down to the difference between having to splice little snippe
by jdoliner 14y ago
Constructing the query as a string is actually much more difficult for clients. Basically it comes down to the difference between having to splice little snippets of code into a string, being careful that you get it on the right side of the parentheses. And just setting a field on a structure where you have no chance of misplacing the value. Not to mention, assuming results came back in the same format client developers would need to write a string parser and with protocol buffers it's written for them.
It also makes it much easier for developers because the server can better detect errors and send more meaningful responses.