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

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


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.
> 
> 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.

> On 12/18/05, Matt S Trout <dbix-class at trout.me.uk> wrote:
> > On Sat, Dec 17, 2005 at 11:45:33PM +0100, Zbigniew Lukasiak wrote:
> > > Hi,
> > >
> > > I need datatype info for class columns.  If no one is working on that
> > > I propose to write a patch to fill in that info using
> > > DBI::column_info.
> >
> > That would be fantastic, but please write it as a patch to Storage::DBI
> > that adds something like a 'column_info_for' method so that it can be
> > easily replaced for different Storage backends.
> >
> > --
> >      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/ +
> >
> > _______________________________________________
> > List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> > Wiki: http://dbix-class.shadowcatsystems.co.uk/
> > IRC: irc.perl.org#dbix-class
> > SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> >


> _______________________________________________
> List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/

-- 
     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