Hi,
How do I quote table names in the SQL generated
by the Schema::Loader class?
The problem I'm trying to solve is that a
particular table name has become a
reserved word in a version of MySQL
(i.e. table name "condition" is now a problem)
I've tried using
moniker_map => sub { return '"'.$_[0].'"' }
however, this /always/ quotes the name; which
technique generates bad code. For
example, the table name ACCESS gets quoted in
the generated Perl code:
fori::inspect::"access"->load_components("PK::Auto", "Core");
I can rename the table, but that's a lot of work.
I'm also using Catalyst, but I don't think that's
the issue here. I'm hoping that quoting in Storage::DBI
class will work via the "quote_char" setting.
However, that may be a unreliable assumption.
_______________________________________________
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/
Searchable Archive: http://www.mail-archive.com/[email protected]/