2 ms·
I like the premise, that query-builders are lower-abstraction hearts of how programming languages and SQL can meet. In my limited experience though, I feel like
by rektide 4y ago
I like the premise, that query-builders are lower-abstraction hearts of how programming languages and SQL can meet. In my limited experience though, I feel like there's almost always very painful limits to query-builders and it's unclear where the boundaries are.
I wish I knew more good options to try, but in JS, I've tangled with Knex (and some Bookshelf, which I have over time felt compounds the problems), and while it usually starts off okay but repetitive, with little shared code, it's rarely clear whether what you want to do is just impossible without gratuitous .raw() madness spiced in or not.
I've seen too many engineers try to out-engineer the limited help something like Knex can offer, try to make better libraries of tools to do common queries. These confound & limit, again and again, provide long term pain, suffering, & misery for everyone who latter stumbles upon them. There's good heart here, but we'd have been better served by a library of knex and/or sql queries to derive from & rewrite, rather than these painful attempts to write higher level tools, which always fall short of the in-practice needs. The sheer expressiveness of sql keeps feeling unmatched, and attempts to capture the main cases keep becoming painful stumbling blocks that limit comprehension & growability. SQL keeps feeling more appealing.