3 ms·
We use it for analytics/data related analysis, so we use straight (or templated) SQL queries. The queries are a bit too thick for using an ORM. The boilerplate
by RBerenguel 10y ago
We use it for analytics/data related analysis, so we use straight (or templated) SQL queries. The queries are a bit too thick for using an ORM. The boilerplate is a set of helpers to make sure what the SQL's intention is, is actually fulfilled without problems (lots of sanity checks to make sure the queries are correct before running, column stability, etc). Basically to ensure anything depending on the output still can trust it after the changes.
- mamcx 10y agoSo, basically a kind of static type system? Anyway, reporting is a very hard problem. I don't know if exist a truly good way to solve it in a general case. --- Is part of this not solve with views? Any example to showcase the trouble?
- RBerenguel 10y agoDon't have examples (that I can show). It's trying to be a static check (more than type, but it's close enough) system, indeed. With views, we can isolate the used data, as long as we don't modify too much the underlying structure. Also, the biggest chunks of SQL we handle are essentially "computational": take this, join with that, mangle a lot what we have now, repeat several times and get an output we can use. Can't avoid the big part in the middle
- vog 10y agoNote that the well-designed ORMs have a good query builder that can be used on its own. For example, I've heard many people use Python's SQLAlchemy just to have a more sane SQL syntax. (See also my other comment: https://news.ycombinator.com/item?id=13929111 https://news.ycombinator.com/item?id=13929111 )