[Dbix-class] info from DBI::column_info to $class->_columns}

Matt S Trout dbix-class at trout.me.uk
Thu Dec 22 18:17:21 CET 2005


On Thu, Dec 22, 2005 at 05:00:22PM +0000, Matt S Trout wrote:
> On Wed, Dec 21, 2005 at 06:04:07PM +0100, Zbigniew Lukasiak wrote:
> > The svn diff is attached.
> > Problems:
> > 
> > 1) Because SQLite (and perhaps other databases) dont implement
> > column_info I used the technique from CDBI - a SELECT selecting no
> > rows.

Additional to my last message, that's a fair enough technique but you're
doing a select per column - surely it would be more effective to do a table's
worth of columns at a time ...
 
> > 2)  I created the storage column_info_for method but storage is not
> > available in the setup phase.  Anyway I think it should not be called
> > for all columns at setup - because this information is needed only
> > ocassionally - I propose to make the column_info method to call the
> > storage column_info_for method and not use the _column class member.
> 
> Actually, I think this info should be pre-populated by Loader if you're
> using a Loader.
> 
> If you aren't, column_type should fill the data out for the table using
> column_info_for if it isn't already present, and then use the contents of
> the column_info hash from then on.

-- 
     Matt S Trout       Offering custom development, consultancy and support
  Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list