DBIx::Class FAQ

Any tutorials/presentations?

Where are the DBIx::Class mailing list archives?

A: There are four archives at the moment:

How can I get DBIx::Class::Schema::Loader working with Inflatecolum::Datetime?

Q: I want to regenerate my schema and keep Inflatecolumn::DateTime in __load_component.
A: There is no way of generating the schema with additional DBIx::Class components at present using the Catalyst helper script. This is also true of all other InflateColumn modules that you'd want to include in your schema. Here is a stand alone script that'll do the job:

#!/usr/bin/perl
use warnings;
use strict;
use DBIx::Class::Schema::Loader qw/ make_schema_at /;

make_schema_at("TextMine::Schema",
    {  components => ['InflateColumn::DateTime'],
       debug => 1,
       dump_directory => './lib' ,
    },
    # SQLite
    ["dbi:SQLite:dbname=../db/schema.db", "",""]
    # mysql 
    #["dbi:mysql:dbname=DBNAME", "USERNAME","PASSWORD"]
);

Arbitrary SQL with DBIC?

Q. How can I use arbitrary SQL with DBIC
A. Define a Custom ResultSource whose virtual table is the SQL query.

How can I keep the DBIC trace out of STDERR / the log file?

A: DBIC_TRACE=1=somefile

Why isn't my "+select => something" and "+as => something" working as it should?

A: Without quoting the hash keys, perl drops the "+", and you're actually doing "select => something" "as => something".

How do I execute raw SQL when my schema is deployed, e.g. in order to create a writable view?

A: See Execute raw SQL upon schema deployment in the DBIC Cookbook, or this patch if the Cookbook hasn't been updated yet. Note that doing this "the right way", by using SQL::Translator::Schema->add_view and add_trigger won't work to make a view writable.

Q. How can I resolve an R6034 pop-up error message when using mod_perl2.0.4 to load DBD::Pg v2.10 in Apache HTTPd v2.2.x in an MS-Windows environment running ActiveState Perl v5.10?

A: Use DBD::ODBC to access your PostgreSQL database for now.

My tags:
 
Popular tags:
 
Powered by Catalyst
Powered by MojoMojo Hosted by Shadowcat - Managed by Nordaaker