Live data from Hacker News

Flyweight: A Node.js ORM Specifically for SQLite

github.com

41–45 of 45 posts

Re: Flyweight: A Node.js ORM Specifically for SQLite

#41
post #18

As a database person, I think most ORMs lack the ability to run complex queries. Sure, for a simple OLTP system, you might just need a few simple joins. But if you store valuable data (otherwise why store it), you will eventually want to ask questions about it. So this ORM positively surprised me, as you can still just use SQL and get a JS function generated from it. To bridge object-to-relational mapping, Oracle has…

You can definitely tell when an ORM was written by people who actually -like- databases rather than people who want to not have to think about them. perl's DBIx::Class ORM had a rule from day one of "if you can't get the exact same SQL you'd've written by hand, that's either a bug or a missing feature" and close to two decades on people who've moved to other languages still regularly tell me they miss that aesthetic.

That is my biggest gripe with Mongo. As much as SQL requires a totally different way of thinking, as a query language ts simply unmatched for its expressive power, except by maybe Datalog.

Mongo just doesn't feel like that. Every example I have seen is simply "KV lookup". No discussion of things like range based queries, or how data relates to each other. Yes of course these things are possible, but it requires writing a imperative query. Seems like it encourages people to be lazy and duplicate data everywhere, which results in a poor data model.

Re: Flyweight: A Node.js ORM Specifically for SQLite

#42

Earlier quoted context omitted.

To echo this sentiment, it always reminds me of meme where on a bell curve we have : Just use SQL on both ends "SQL IS OLD AND ISN'T A REAL LANGUAGE WRITE ACTUAL CODE WITH PANDAS OR SPARK" in the middle I'm getting old :( https://www.reddit.com/r/datascience/comments/s0dn5b/2022_mo...

> Just use SQL on both ends Sure, but this ORM does exactly that.

Your idea of an 'end' seems to start somewhere other than the developer inputting the code which seems odd.

Re: Flyweight: A Node.js ORM Specifically for SQLite

#43
post #36

Earlier quoted context omitted.

you write your SQL in javascript/typescript? That's a big fat ugly anti-pattern, IMO. Any other solution sucks more.

You could write your SQL in SQL.

Ah, I misunderstood you at first. I agree.

Re: Flyweight: A Node.js ORM Specifically for SQLite

#45

Earlier quoted context omitted.

> Just use SQL on both ends Sure, but this ORM does exactly that.

Your idea of an 'end' seems to start somewhere other than the developer inputting the code which seems odd.

GP was referring to the ends of a bell curve in a meme picture. I’m not sure what you are referring to but I think it’s something else.
Post reply on HN