Hacker Newsnew | past | comments | ask | show | jobs | submit | fstephany's commentslogin

I agree with you that dynamic query building can be tedious with a pure SQL approach. The use case you are describing can be solved with something alone the lines of:

  WHERE organization = $1
     AND ($2 IS NULL OR starts_with(first_name, $2)
     AND ($3 IS NULL OR birth_date > $3)
With SQLx you would have all the params to be Options and fill them according the parameters that were sent to your API.

Does that make sense?


I think the dynamic part is where the clauses themselves are optional. For example, say you have a data table that a user can filter rows using multiple columns. They can filter by just `first_name` or by `birth_date` or both at the same time using AND / OR, and so on. So you’re dynamically needing to add more or less “WHERE” clauses and then it gets tricky when you have to include placeholders like `$1` since you have to keep track of how many parameters your dynamic query is actually including.


That's relying a lot on the DB engine, which will struggle as the condition gets more complex. I've had MySQL make stupid choices of query plans for very similar queries, I had to break the OR into UNIONs


You are not alone!


Oh wow, thank you. I didn't know nested CSS was a real thing nowadays.


I have the same feeling performance-wise with the laptop I bought in 2020 with a Ryzen 7 4800H.

But it's a heavy brick with a short battery life compared to the M1/2/3 Mac.


It makes me think of https://moldabledevelopment.com/

You do not code in the visual environment but it helps you to create tools to visualize exactly what you want/need to see. The interactivity is hard to beat and once you are used to it, you can quickly create visualizations that you can throw away (or keep).


I would go full text-mode (Markdown), Keynote or Ludus[1]

[1]: https://ludus.one/


It's listed at 3700€ on Coolblue (online shop in The Netherlands).

https://www.coolblue.nl/en/product/905010/asus-zenbook-17-fo...


Beware that there could be some differences that can affect the experience: https://twitter.com/jeremy_soller/status/1322954964549824512


I always thought about it as the "vinyl master" analogy as well but it looks like it has a master/slave origin from the Bitkeeper days.

https://mail.gnome.org/archives/desktop-devel-list/2019-May/...


Honestly, why does it matter where the word comes from? Virtually no one ever used a git master branch thinking about slavery and not the "vinyl master" analogy. Shouldn't that be the actual meaning that is worth evaluating? Language evolves over time, the "master" in the git context doesn't have any reference anymore (in meaning) to the master/slave (which is a stupid wording to be honest) from bitkeeper. A soft proof to that is that every time that discussion occurs, you have lot of comments expressing their confusion given that the word in git context is actually used as a "master record".


Interesting, thanks for finding that. I wasn't aware of that.


Depending on which model you are interested in, you might find some European company offering the same chassis (usually Clevo or Tongfang).

For example, the Lemur Pro 14 looks like a Clevo L141CU which is also sold by Schenker (or Tuxedo for a Linux version). You can probably find a brand that retails in your area/country/continent.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: