[email protected] wrote: > On Fri, 16 Jan 2009 10:52:05 +0100, Peter Rabbitson <[email protected]> > wrote: >> [email protected] wrote: >>> Hi, >>> >>> I noticed that $schema->deploy doesn't seem to use the value of >>> quote_char >>> to quote the output. >>> The create table commands are not quoted (neither the table name nor the >>> columns). >>> After deploying, all selects use quoting correctly. >>> I am using SQLite. >>> >> ->deploy uses SQL::Translator directly, thus DBIC quoting will not >> apply. In the latest version of SQL::Translator we have: >> >> quote_table_names >> >> Toggles whether or not to quote table names with " in DROP and CREATE >> statements. The default (true) is to quote them. >> >> quote_field_names >> >> Toggles whether or not to quote field names with " in most statements. >> The default (true), is to quote them. >> >> So unless you are running an old SQLT version, you have encountered some >> sort of bug. Come back with more info if this is the case. >> >> _______________________________________________ > > SQLT is up to date (CPAN). > > > $ DBIC_TRACE=1 re.pl > > > $ use lib qw (lib); > > > > $ use Laden::Schema; > > > > $ my $schema = Laden::Schema->connect('dbi:SQLite:dname=test'); > > [snip] > > $ $schema->deploy; > > [snip] > > CREATE TABLE user ( > > password character varying(38) NOT NULL, > > email character varying(150) NOT NULL, > > id character(36) NOT NULL, > > registered datetime NOT NULL, > > admin integer NOT NULL DEFAULT '0', > > PRIMARY KEY (id) > > ): > > CREATE UNIQUE INDEX user_email_user ON user (email): > > > So you see, there is no quoting of names. > > moritz >
Hmmm... I use deploy() on MySQL predominantly, and browsing through the SQLT source it seems that only the MySQL and the PG producers support it (egrep 'quote_.*_names' -r lib/SQL/Translator/Producer). All other producers are more or less oblivious to this setting. Which one do you use? _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[email protected]
