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

C# LINQ comes close.

It basically allows to express queries independent of the target language. E.g. it's entirely possible that the same LINQ query can target PG, MSSQL Server, objects in local memory or RavenDB (NoSql). Quality of the generated query depends on the translating library ofc.

Syntax is very nice and much more aligned with programming than SQL. E.g: someData.Where(x => x.id =="someId").OrderBy(x => x.LastModified).Take(10).ToListAsync()

Note that the query is not executed until ToListAsync (or other materializing calls) is called. This allows for composabillity.

There is an alternative form of writing it more resembling SQL, but I've never seen it much used.



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

Search: