[Catalyst] Transactions with mysql - can't locate db_Main

Brandon Black blblack at gmail.com
Fri Jan 20 14:30:29 CET 2006


On 1/20/06, Will Hawes <info at whawes.co.uk> wrote:
> Joshua J. Kugler wrote:
> > On Thursday 19 January 2006 10:09, Matt S Trout said something like:
> >> I long since started using a common format that generates both my
> >> CREATE TABLE staments and my class definitions.
> >
> > If you don't mind sharing your code, could you post this?
> >
> > - joshua
> >
>
> +1 :)

I think he's going to make a new declarative format for defining a
schema in a single file, which can be imported into DBIx::Class, which
in turn can be exported to SQL for $db_vendor_of_choice via the new
SQLT code.  This was a hypothetical paste of what the syntax might
resemble from irc last nite:

-----------------------------------------
package FooDB;

use DBIx::Class::Schema::Declare;

table 'Foo' {
  columns 'bar' => { type => 'String' },
    'baz' => { type => 'Integer' };
  has_many 'spoons' => 'Spoon';
};

table 'Spoon' {
  columns 'fork' => { type => 'DateTime' };
  belongs_to 'Foo';
};
-----------------------------------------

-- Brandon



More information about the Catalyst mailing list