Refactor.  Each database vendor API is now a subclass, so we don't die in switch() hell.