[Dbix-class] SELECT from $schema1, INSERT into $schema2 ?
Chisel Wright
chisel at herlpacker.co.uk
Mon Feb 25 08:48:01 GMT 2008
Morning all,
I'm just about to embark on an exercise that's a sync of sorts from a Pg
database to a mysql database (backend app to public website).
The table(s) I'm interested in do not comprise the whole database, I'm
just pushing data (on demand) for a record and relevant join data.
The table schemas match on both sides, so no evil column mapping to
worry about.
With this in mind, I was wondering if there was some way of doing
something like the psudo-ish code below:
$record = $schema_pg->resultset('MainTable')->find($id);
$coldata_hashref = $record->MAGIC_FUNCTION();
$schema_mysql->create_or_update($coldata_hashref);
I've had a quick run through the docs for ::ResultSet and
::Manual::Cookbook but nothing leaps out as being MAGIC_FUNCTION()
Cheers,
Chisel
--
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/
I would love to change the world but
they won't give me the source code.
More information about the DBIx-Class
mailing list