3 ms·
SQL is fantastic, but the annoying bit is that you have to create strings to send to the database, and generating these strings correctly is hard. One of the k
by twp 15y ago
SQL is fantastic, but the annoying bit is that you have to create strings to send to the database, and generating these strings correctly is hard. One of the key features of libraries like Korma and SQLAlchemy is that they provide a very eloquent way of robustly creating these strings. Yes, things like prepared statements help, but dealing with strings and prepared statements is not relevant to the problem that you want to solve. Korma et al. shave the yaks for you.
Without something like Korma, your process looks something like:
structural-description-of-query --(string operations)--> query-string-to-db --(careful unpacking of response)--> structured-results
With Korma and its ilk, this process becomes:
structural-description-of-query --(somebody else's problem)--> structured-results