Adding support for a toRaw method, mirroring postgres' toPostgres at a h...

...igher level