Some completely untested code that should enable the use of raw SOQL

This should fix the broken raw query support referred to in #7