Re:Show HN: Node.js ORM to query SQL database through an arr...
by jgoyvaerts on Thursday September 05, 2024 @10:54AM
(#41457220)
What about moving the connector to the table declaration, similar to dbcontext in .net?
Something like Q.table(definition, connector), which would then allow you to just write users.filter(user => user.id.eq(42).fetch()
Re:Show HN: Node.js ORM to query SQL database through an arr...
by williamdclt on Friday September 06, 2024 @04:57AM
(#41464282)
I’m not sure I can say which is _objectively_ better, but I was also surprised, connector.fetch would be more consistent with common JS practices
But I might be wrong, your idea makes more sense from logical perspective.