Hacker News new | past | comments | ask | show | jobs | submit login

> You could even go as far as to unit test just your SQL code if you wanted, something you can't do too easily when it's in your application.

How do you unit test SQL code? You could integration test against something like sqlite but unit testing stored procs sounds very difficult.

I worked with a big C# .net core ecommerce platform that had a big stored proc used for ingest. It was an absolute pain in the ass to debug and fix issues because testing it was so difficult. Eventually we replaced it with C# code. Access to full software dev tools (debugger, automated tests) is really something you don't want to be without on large projects...




> How do you unit test SQL code?

e.g. https://pgtap.org/documentation.html

There are similar solutions for Oracle's PL/SQL and SQL Server




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

Search: