perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Spoerri <>
Subject TabRelation and inserts
Date Tue, 18 Feb 2003 20:48:28 GMT
What does everyone think about allowing special handling of !Table and
!TabRelation for inserts? For example, ignoring all but the first table?
Or maybe even performing a separate insert for each table?

I'm implementing permissions with a bridge table (between users and
resources), and would like to use a _single dbix object_ for each
resource, for both reading and writing.

The later 4.0 releases of mysql allow multi-table updates, but not
multi-table inserts. Would it be more appropriate for multi-table inserts
to be implemented in the database? To be at all useful, it would probably
be too nontraditional (imagine "insert into x, y (x.a, y.b) values (1, 2)
where = y.x_id;" where is an auto incremented key).
And besides, in dbix::recordset, the feature could be configured to work
for both inserts and updates, for databases that don't even support
multi-tables updates.

Here's an example of what I'm talking about:
$resource = DBIx::Recordset(
	'!Table'=>'resource, permission',
	'!TabRelation'=>' = perm.resource_id'
#but also:
#and it would be nice if the following could be done by the preceding:

Thanks in advance,
Joshua Spoerri

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message