[Dbix-class] Creating a table on the fly

Matt S Trout dbix-class at trout.me.uk
Fri Mar 14 19:49:37 GMT 2008

On Tue, Mar 11, 2008 at 08:18:45AM +0100, Peter Sørensen wrote:
> Hi,
> I have a scenario where I have a model with 3 tables used 
> to fill out fields in my webforms. This is information of 
> logtype( mail,http...) and which fields I would like to extract.
> It contains a lot of predefined regex to extract the information.
> It could be a query to extract all ip's starting with 10. or a query
> extracting all mail sendt from or to a specific domain.
> It is an interface to create queries against Logfiles ( maillog, httplog ...)
> When a query is created and processed I need a new table 
> to save this output into. Depending of what the user has selected
> this will be information from the logfile like:
> 	Date Mail from	Mail To	Relay Ip   
> I don't know what in advance so I have to create the tables on the fly.
> The interface is made in Catalyst with TT as view.
> I use Mysql and could of course use the DBI interface for this part but I would
> like to stick with DBIx class.
> Is this possible?

Have you tried registering a ResultSource on the fly and using ->deploy with
a filter to only deploy that table?

Or even hooking into the versioning code so you create new versions on
the fly?

      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/

More information about the DBIx-Class mailing list