5 ms·
That is actually currently being contested by React and .jsx. That said, I've seen multiline abused for writing SQL queries as well, which would have been bett
by biscarch 12y ago
That is actually currently being contested by React and .jsx.
That said, I've seen multiline abused for writing SQL queries as well, which would have been better off being written in a separate .SQL file and `fs.read` into a string with a descriptive var name. (Ignoring that massive SQL strings is a code smell imo).
- siculars 12y agoExcept if your application generates dynamic queries. And not of the sort where variables in the WHERE clause are dynamically evaluated. Of the sort where the entire structure of your SQL is dynamically driven by user interaction with your application.
- biscarch 12y agoAre you saying that large SQL strings isn't a code smell if the application is dynamically putting them together? That seems like DSL/Query Builder territory to me. Perhaps you could share an example?