News for hackers. Stuff that matters.
Re:Ent: An Entity Framework for Go by unemployable on Monday October 31, 2022 @02:28AM (#33402630)
It isn't possible because JavaScript doesn't have the required reflection abilities to understand what the anonymous function in

  users.Where(u => u.id == id); 
means. It can get a string representation, eg. 'u => u.id == id', but it has no access to id, so it won't know what to put in place of $id here:

  select * from users where id = $id
I used to use EF a lot, and it does feel very easy to write non-complex queries that traverse whatever abstraction it represents the database as, but ultimately, that abstraction is not really what the database is at all, and that can have some downsides.

There are no comments on this comment yet.