Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For reference, to achieve what IQueryable does with 100% normal code in JavaScript you need something like Qustar that was posted here a month ago.

Regular transform code in JS (Like IEnumerable)

const ids = users.filter(user => user.age<18).map(user => user.id);

IQueryable like to be transformed to the server:

const ids = users.filter(user => user.age.lt(18)).map(user => user.id);

In C# it'd look identical, but in JS or Java this would be achieved via proxy-object hacks (the .lt() function in the filter instead of the < operator and the .id property getter for the user map to send a flag under the hood for the mapping function).

https://github.com/tilyupo/qustar



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: