On Tue, 12 Apr 2005, Terrence Brannon wrote:

Well Class::DBI::AbstractSearch makes SQL::Abstract available to
CDBI. It doesn't appear easy to go from form data (or let's just stay
a hash of query data) to query generation
in Alzabo. For example, you can take HTML::Mason's %ARGS and submit it
directly to DBIx::Recordset->Search() to issue a SQL query.

Well, it's hardly all that difficult. Assuming you're doing a one table query it'd be:


 my @where = map { [ $table->column($_), '=', $ARGS{$_} ] } keys %ARGS;

 $table->rows_where( where => [EMAIL PROTECTED] );

The nail in the coffin for my interest in Alzabo came when I asked if
I could catalog and formulate my own pure SQL and use it with Alzabo
and the answer was no... this feels very limiting to me.

Err, the answer is yes.

 my $dbh = $schema->driver->handle;

The most complete comparison of DBI wrappers I have seen is here:

http://search.cpan.org/~evo/DBIx-SQLEngine-0.93/SQLEngine/Docs/Related.pod

Is there an update on Alzabo's ability to easily switch between dev
and production database connection information? If so, then the table
in that doc needs updating.

If by that you're referring to what called "named configs" in that table, then no. But bolting it on is easy enough, since connections are simply a hash of parameters.


 $schema->connect( My::Config->production_config );

 $schema->connect( My::Config->dev_config );

I do this sort of thing all the time.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

_______________________________________________
sw-design mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/sw-design

Reply via email to