One of the probably most unnerving things in databases is dealing with NULLs, especially when comparing data. The necessary logic to deal with NULLs can lead to very verbose code – but if you’re using Oracle, there is a very neat function you can use.
Sometimes we have data that is not split into columns and rows, but SQL can only really thrive on structured data.
But thanks to recursive queries we can split any string into rows – with pure SQL.
My last example of controlling a sequence to test some default-behavior was not “well-testable” PL/SQL code.
In this example I show how we can achieve a method that is much easier to test, doesn’t require touching internals – all without changing the public API of the method.
A combination of Package global state and Package invalidation can easily lead to ORA-04061 errors, especially in unit-testing situations.
This blog-post explains the problem and shows possible solutions (all with examples)
Unit-Tests are automated checks of certain behavior. But what if we could also use them to describe what the functionality they’re checking is supposed to do?
How to explore some functionality you don’t know but want to change or improve?
Write a unit test with utPLSQL and use the force-manual-rollback param!