Jose,

Thank you that was exactly what I needed. I think one of the problems with DBIx::Class is that the documentation and work is scattered among so many places it is hard to leap in and put it all together.

Steve Kirkup


Jose Fonseca wrote:
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 http://search.cpan.org/~ash/DBIx-Class-0.08008/lib/DBIx/Class/Storage/DBI.pm#txn_do <http://search.cpan.org/%7Eash/DBIx-Class-0.08008/lib/DBIx/Class/Storage/DBI.pm#txn_do>

quote_char

    Specifies what characters to use to quote table and column names.
    If you use this you will want to specify name_sep
    <http://search.cpan.org/perldoc?name_sep> as well.

    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 => '`'|, and user
    SQL Server you'd use |quote_char => [qw/[ ]/]|.

Hope that helps!
Cheers, Ze



On Feb 13, 2008 5:58 PM, Steve Kirkup <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Howdy,


     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:

    SELECT
     'me.level'
    FROM
     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:
    http://www.grokbase.com/group/[EMAIL PROTECTED]


------------------------------------------------------------------------

_______________________________________________
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]


_______________________________________________
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]

Reply via email to