Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 45567
Status: rejected
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: pshangov [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.08101
Fixed in: (no value)



Subject: DBIC::SQL::Abstract problems with tables whose names are reserved words
Download (untitled) / with headers
text/plain 800b
DBIx::Class fails to work with tables whose names are reserved SQL keywords (e.g. "group"). I get the following error DBIx::Class::Schema::Loader::make_schema_at(): DBI Exception: DBD::SQLite::db prepare failed: near "group": syntax error [for Statement "SELECT * FROM group WHERE ( 1 = 0 )"] at C:/strawberry/perl/site/lib/Catalyst/Helper/Model/DBIC/Schema.pm line 173 I traced this down to DBIC::SQL::Abstract, which has the following code: sub select { my ($self, $table, $fields, $where, $order, @rest) = @_; $table = $self->_quote($table) unless ref($table); SQL::Abstract has a "quote_char" option which is empty by default and if it is not set "$self->_quote($table)" has no effect. DBIx::Class should provide the user with an option to use a quote character when generating queries.
Download (untitled) / with headers
text/plain 347b
On Wed Apr 29 14:12:50 2009, pshangov wrote: Show quoted text
> ... DBIx::Class should > provide the user with an option to use a quote character when generating > queries.
And lo and behold - it does :) http://search.cpan.org/~ribasushi/DBIx-Class-0.08101/lib/DBIx/Class/Storage/DBI.pm#DBIx::Class_specific_connection_attributes Rejecting bug, as classic RTFM.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.