News for hackers. Stuff that matters.
Re:Literate SQL by zzzeek on Sunday June 25, 2017 @10:49AM (#14630232)
You can have functional SQL query languages that map directly to SQL without object oriented row mapping. Everyone can use these tools without performance issues.

Disclaimer: i wrote SQLAlchemy.

Re:Literate SQL by mshenfield on Sunday June 25, 2017 @11:19AM (#14630378)
> You can have functional SQL query languages that map directly to SQL without object oriented row mapping.

Well said. I always think of this as the canonical example:

http://sqlkorma.com/

I don't know what rock I've been under, but didn't realize SQLAlchemy had the same idea w/ SQLAlchemy Core.

Re:Literate SQL by Dangeranger on Sunday June 25, 2017 @12:52PM (#14630901)
Another excellent example of this is Elixir's Ecto library for composing SQL from modular fragments https://github.com/elixir-ecto/ecto/blob/master/README.md
Re:Literate SQL by virtualwhys on Sunday June 25, 2017 @02:37PM (#14631424)
> without object oriented row mapping

Korma seems to do exactly that, N+1 lazy loaded queries included. SQLAlchemy, Esqueleto, Slick, Quill, and the like all generate precisely what you tell them to (i.e. queries semantically the same as what you'd write by hand).

This is not to disparage Korma, it looks pretty cool, I'd certainly give it a look if I worked with Clojure.

Re:Literate SQL by nerdponx on Sunday June 25, 2017 @11:03AM (#14630287)
Is that really a disclaimer, or just the source for your claim?

I'm sure you know this, but there are actually several "query builder" tools out there for Python, including SQLAlchemy Core. I'd love to see a side-by-side comparison.

Re:Literate SQL by lobster_johnson on Sunday June 25, 2017 @01:21PM (#14631054)
He probably meant "disclosure", not "disclaimer".
Re:Literate SQL by zzzeek on Sunday June 25, 2017 @01:32PM (#14631123)
The overlords of HN have deemed my post is too old for an "edit" button so, yes, my use of "disclaimer" is a case of auditory familiarity overruling accurate terminology
Re:Literate SQL by nerdponx on Sunday June 25, 2017 @02:49PM (#14631493)
Sorry, it was just my half-assed attempt at flattery anyway ;)