This operation should be performed by the DBAL, but I don't know if there's anything like that. Ping @deeky666? (sorry for always poking you around about DBAL :( )