6 ms·
I heavily disagree with the notion that most developers would rather query with something that isn't SQL.
by nilamo 2y ago
I heavily disagree with the notion that most developers would rather query with something that isn't SQL.
- kreetx 2y agoFunny, as Triplit front page shows a query much like SQL: const deliveredMessagesQuery = client .query("messages") .Where("conversationId", "=", convoId) .Order("created_at", "DESC")
- blatantly 2y 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 2y ago[deleted]
- nilamo 2y 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 2y 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 2y agoProbably the biggest upgrade SQL could have is putting the SELECT after the FROM, so autocomplete would work nicely.