5 ms·
My ideal version of this is simple: just define the queries you want (no matter how complex) and the you'll get exactly the data you need to fulfill those queri
by matlin 1y ago
My ideal version of this is simple: just define the queries you want (no matter how complex) and the you'll get exactly the data you need to fulfill those queries, no more, no less. And the cherry on top would be to have your queries update automatically with changes both locally and remote in close to real-time.
That's basically what we're doing with Triplit (https://triplit.dev https://triplit.dev), be it, not with SQL--which is a plus for most developers.
- nilamo 1y agoI heavily disagree with the notion that most developers would rather query with something that isn't SQL.
- kreetx 1y agoFunny, as Triplit front page shows a query much like SQL: const deliveredMessagesQuery = client .query("messages") .Where("conversationId", "=", convoId) .Order("created_at", "DESC")
- blatantly 1y agoWell yeah choosing what to query, a filter and an order is at the heart of all query-like things. Buy SQL specifically is a text language not a fluent api.
- deleted 1y ago[deleted]
- nilamo 1y agoExactly. Hard to improve on something so great. We love a ``` select {what} from {where} left join {where} on {how} where {why} ``` A simple query, concisely answering every relevant question, while hiding all of the details of how any of it works. Beautiful.
- kreetx 1y agoSQL is a relational algebra language which, unlike imperative languages, is compiled into an execution plan depending on the existence of indexes, table sizes, data types, etc. The reason you should love it is that you don't need to know the details when the data model is set up well. And DBMSs also have commands to view the execution plan, should it have otherwise been slow, such that you know what to do to improve it. It's really not that complicated once you learn how it works.
- robertlagrant 1y agoProbably the biggest upgrade SQL could have is putting the SELECT after the FROM, so autocomplete would work nicely.
- gbalduzzi 1y ago> just define the queries you want (no matter how complex) and the you'll get exactly the data you need to fulfill those queries, no more, no less So GraphQL?