[Dbix-class] Oracle Column Quoting
zefonseca at gmail.com
Wed Feb 13 20:25:01 GMT 2008
Steve, I don't know what Gmail did to my reply, everything above "Show
quoted text" was deleted. Sorry about that.
Original reply was:
Steve, SQL::Abstract does quote columns and tables for you. It's just that
quote_char is empty by default. To change it from DBIx::Class you probably
need to have a look at this section from
Specifies what characters to use to quote table and column names. If you use
this you will want to specify
quote_char expects either a single character, in which case is it is placed
on either side of the table/column, or an arrayref of length 2 in which case
the table/column name is placed between the elements.
For example under MySQL you'd use quote_char =3D> '`', and user SQL Server
you'd use quote_char =3D> [qw/[ ]/].
Hope that helps!
On Feb 13, 2008 5:58 PM, Steve Kirkup <skirkup at jupiterimages.com> wrote:
> I have a rather unique problem and I am unsure of how to fix this. I
> am connecting to Oracle, one of the tables I HAVE to work with is using
> a keyword as the column name (I didn't do it!).
> The way to get select statements to work is by single-quoting the
> column call. Example:
> test me;
> The problem is that DBIx::Class does not do the single quoting by
> default and the single-quoting behavior, I don't believe, does not work
> for all databases.
> Does anyone have suggestions about how this problem could be addressed?
> Steve Kirkup
> 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:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the DBIx-Class