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

Can’t wait for something better to come along. The text orientedness of SQL is annoying. Something like Linq without the underlying SQL.


Amen. I made this point over and over. Sql is fairly annoying to deal with, linq is very close to me being perfect, prql is close

https://github.com/prql/prql


Isn't "LINQ without the underlying SQL" simply list comprehensions?



Well plus serialization that’s not SQL.


The thing I always liked about linq was it’s lazy evaluation. You could write simple selects on your data model and join and filter in the service. Allowing unit tests that operated on the joins.

I’m yet to find a better way to write crud apps than that pattern.


I know not what you ment but just mentioning that if one uses entity framework or linq to sql in .net, linq should work with sqlite.


Use an object-relational mapper and leave the boring stuff to a library.


I hate ORMs.

After days of fumbling in the dark you finally isolate the problematic query, post it like "guys I found it," and still nobody speaks up. So you hack the ORM to attach tracebacks as comments to each query, retest everything, and finally git-blame your way to somebody who owns that bit of code and they're always like "wait, the ORM did WHAT?"

I'd rather grep code for SQL any day.


That's why my favorite ORM in Java is MyBatis. It doesn't do SQL generation; it only maps objects to SQL parameters and results to objects.


That's no longer an ORM. These are called data mappers.


Sadly the choice of sql tends to make underlying framework very complicated and sometimes incapable.

Some things got easier to express with SQL after Json_agg in postgres became a thing (now you can do multi-depth relations without blowing up the result table with Cartesian product) but it's still massive pain in the ass and Json agg has performance overhead too.


Especially for reporting, I'm just as happy to write a serious piece of SQL and execute it directly.

This is the joy of SQLAlchemy: great features when you want to use them; escape hatches when you don't.


Right, most ORM tools give an escape hatch to execute raw SQL queries. However, even though SQL is turing complete, it's not a great language for retrieval imho. It's probably an artifact of the underlying relational models (and the relational output it has to generate) but still.


I was all set to disagree with you, but a bit of googling yields => https://localcoder.org/is-sql-or-even-tsql-turing-complete


It could have been wrong, but main argument was whether SQL was a good language for retrieval or not, and for me that's a no. It's probably subjective though :)




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

Search: