Modified testReadAll, testReadFolder and testReadAll SQL quieries