[Dbix-class] A start of supporting non-unique indices in DBIC-Schema-Loader\

Peter Rabbitson rabbit+dbic at rabbit.us
Mon Jan 13 06:43:43 GMT 2014


On Sun, Jan 12, 2014 at 10:45:56PM -0500, Rob Kinyon wrote:
> 
> 2. Add an add_index() to DBIx::Class::ResultSource. This would be
> useful not just for managing your SQL, but could also be useful for
> figuring out what keys would be useful in find().

Sorry but I remain against this change as index information is not only 
not relevant to the metadata model of DBIC, but the concept of indices 
is not uniform to begin with.

That is depending on engine etc a multicolumn index may be used for a 
partial column set lookup or may not be. Hence the idea of "using it as 
cardinality hint to find()" will backfire if anything.

With that out of the way the only point left is "deployment management" 
and this is squarely out of the scope of DBIC (incidentally the deploy 
hook is a hack which all devs consider a horrible idea in retrospect). 
Have you given thought to adding this support to a *real* deploy tool, 
say DBIx::Class::DeploymentHandler?




More information about the DBIx-Class mailing list