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

Pure functions in the context of databases are a rarity. A database is meant to be persisting data while upholding certain consistency, integrity and isolation guarantees. This basically means that most of the database-using SQL functions can never be pure, because having side effects is their whole purpose. Whats more, integrity and isolation are basically untestable, especially with unit testing.

So imho the DB people are totally right, to test any SQL, you need database tables with data in them.



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

Search: