frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Adding OR logic forced us to confront why users preferred raw SQL

https://signoz.io/blog/query-builder-v5/
27•ak_builds•3d ago

Comments

ryoshu•1h ago
I still struggle with ORMs. SQL is... declarative. If you're working with multiple RDBMSs, sure? Maybe I want my local dev to be sqlite and scaled be postgres? I've never run into that in production. A DSL on top of a DSL doesn't make a lot of sense.
dec0dedab0de•47m ago
I just want to write one language at a time if I can. I like sql when querying directly, almost as a UI of sorts, but it’s not my favorite when I am just trying to get my code to work, and the database is a relatively minor detail.
never_inline•37m ago
How do you do conditional filters in pure SQL from a backend Java / Python app, without doing string concatenation?

Not a fan of all the proxy object circus ORMs do but I'd leave row-> domain object mapping and filter building to some library. Sweet spot is probably something akin to Android Room / Micronaut Data JDBC.

paulddraper•35m ago
String concatenation
Xss3•28m ago
No, we must build 16 more layers of pointless abstraction in a new DSL.
minitech•30m ago
Query builders that operate at the SQL level. (A popular example of that in Python is SQLAlchemy Core, but there are better ways to do it, especially in better-typed languages.)
crazygringo•22m ago
What's wrong with string concatenation?
t-writescode•18m ago
Simpler SQL injection risk and more testing to make sure all potential branching paths don’t result in invalid SQL.
chillfox•23m ago
My main issue with ORMs is they always end up being just another thing to learn, adding needless complexity. They are not an alternative to SQL as you always end up having to understand what kind of SQL they create and how it works for either performance or complex queries.
t-writescode•19m ago
Hand-rolling SQL inside another programming language comes with some unpleasantness, like protecting against SQL injection and making sure the SQL is valid, especially when hand-constructing the query based on input parameters: “sort ascending? Descending? Filter all but things in this group? etc.”

Parameter management in some languages are unpleasant, like how JDBC only has positional arguments; and any time you do string concat in a language, you start getting in danger of misformed SQL.

Ultra basic ORMs, like Exposed (Kotlin), are well-tested frameworks that do exactly what I want. Want a single value in the =? Or want it to be an “in”? Or what if it’s null? Handled. No special string management. Want parameters? Handled.

When I see pure ORM’d code, I can feel safe expecting it to be protected from injection and formatting issues. It’s reduced cognitive load and greater safety.

When I see raw string SQL management, I have to put another layer of care and attention to try and make sure (and maybe still fail) there’s no application-crashing mistakes in that part of code.

It’s kinda like working with typed and compiled code. Greater protection from error.

jerf•18m ago
At the risk of getting run off this site... Jira's search query widget, which allows in some sense nearly arbitrary SQL while providing syntax completion, making sure you don't run off the rails with actual arbitrary SQL, and supporting very deeply nested conditionals correctly is probably one of the most impressive things to me about that system. I just wish it was not such a staggeringly large pile of work to get to such a thing in other systems. Even if someone cites some sort of open source library that supports this, simply defining to that library what columns and operations you support would be a lengthy task of specification, refinement, and testing.

It'd be neat if you could let more users just have SQL but there's so many ways for that to go terribly wrong nowadays, with all those nice juicy SQL features that so many engines now support.

Myocardial infarction may be an infectious disease

https://www.tuni.fi/en/news/myocardial-infarction-may-be-infectious-disease
247•DaveZale•4h ago•93 comments

Pass: Unix Password Manager

https://www.passwordstore.org/
64•Bogdanp•3h ago•30 comments

Show HN: A store that generates products from anything you type in search

https://anycrap.shop/
763•kafked•14h ago•252 comments

If my kids excel, will they move away?

https://jeffreybigham.com/blog/2025/where-will-my-kids-go.html
34•azhenley•2h ago•6 comments

AMD's RDNA4 GPU Architecture at Hot Chips 2025

https://chipsandcheese.com/p/amds-rdna4-gpu-architecture-at-hot
59•rbanffy•5h ago•2 comments

Lexy: A parser combinator library for C++17

https://github.com/foonathan/lexy
15•klaussilveira•3d ago•0 comments

RFC9460: SVCB and HTTPS DNS Records

https://datatracker.ietf.org/doc/html/rfc9460
19•codewiz•2h ago•1 comments

Recreating the US time zone situation

https://rachelbythebay.com/w/2025/09/12/tz/
23•move-on-by•10h ago•11 comments

RIP pthread_cancel

https://eissing.org/icing/posts/rip_pthread_cancel/
158•robin_reala•9h ago•69 comments

Two Slice, a font that's only 2px tall

https://joefatula.com/twoslice.html
25•JdeBP•2h ago•7 comments

Adding OR logic forced us to confront why users preferred raw SQL

https://signoz.io/blog/query-builder-v5/
27•ak_builds•3d ago•11 comments

486Tang – 486 on a credit-card-sized FPGA board

https://nand2mario.github.io/posts/2025/486tang_486_on_a_credit_card_size_fpga_board/
150•bitbrewer•11h ago•42 comments

Safe C++ proposal is not being continued

https://sibellavia.lol/posts/2025/09/safe-c-proposal-is-not-being-continued/
115•charles_irl•7h ago•75 comments

How Ruby executes JIT code

https://railsatscale.com/2025-09-08-how-ruby-executes-jit-code-the-hidden-mechanics-behind-the-ma...
101•ciconia•4d ago•13 comments

EFF to court: The Supreme Court must rein in secondary copyright liability

https://www.eff.org/deeplinks/2025/09/eff-court-supreme-court-must-rein-expansive-secondary-copyr...
52•walterbell•2h ago•12 comments

Orange rivers signal toxic shift in Arctic wilderness

https://news.ucr.edu/articles/2025/09/08/orange-rivers-signal-toxic-shift-arctic-wilderness
48•hbcondo714•2d ago•1 comments

Four-year wedding crasher mystery solved

https://www.theguardian.com/uk-news/2025/sep/12/wedding-crasher-mystery-solved-four-years-bride-s...
257•wallflower•11h ago•79 comments

How the restoration of ancient Babylon is drawing tourists back to Iraq

https://www.theartnewspaper.com/2025/09/12/how-the-restoration-of-ancient-babylon-is-helping-to-d...
4•leoh•2h ago•0 comments

My first impressions of gleam

https://mtlynch.io/notes/gleam-first-impressions/
165•AlexeyBrin•13h ago•61 comments

The Socratic Journal Method: A Simple Journaling Method That Works

https://mindthenerd.com/the-socratic-journal-method-a-simple-journaling-method-that-actually-works/
6•surprisetalk•3d ago•0 comments

The case against social media is stronger than you think

https://arachnemag.substack.com/p/the-case-against-social-media-is
156•ingve•7h ago•134 comments

Show HN: CLAVIER-36 – A programming environment for generative music

https://clavier36.com/p/LtZDdcRP3haTWHErgvdM
105•river_dillon•12h ago•22 comments

SkiftOS: A hobby OS built from scratch using C/C++ for ARM, x86, and RISC-V

https://skiftos.org
425•ksec•21h ago•86 comments

Perrinn 424 – An open access electric hyper car designed for racing

https://discover.perrinn.com/home
16•pillars•3d ago•1 comments

Open Source SDR Ham Transceiver Prototype

https://m17project.org/2025/08/18/first-linht-tests/
83•crcastle•4d ago•8 comments

Will AI be the basis of many future industrial fortunes, or a net loser?

https://joincolossus.com/article/ai-will-not-make-you-rich/
64•saucymew•4h ago•63 comments

Magical systems thinking

https://worksinprogress.co/issue/magical-systems-thinking/
254•epb_hn•10h ago•78 comments

An open-source maintainer's guide to saying “no”

https://www.jlowin.dev/blog/oss-maintainers-guide-to-saying-no
149•jlowin•7h ago•72 comments

Lessons in disabling RC4 in Active Directory (2021)

https://syfuhs.net/lessons-in-disabling-rc4-in-active-directory
20•speckx•2d ago•9 comments

Wayland breaks the tools I use to make a living

https://rykarn.se/2025/01/26/wayland
19•junkblocker•4h ago•4 comments