[Dbix-class] Prefetch problem

Jess Robinson castaway at desert-island.me.uk
Thu Oct 9 23:48:59 BST 2008



On Tue, 7 Oct 2008, peter at dragonstaff.com wrote:

> mst wrote:
>> 
>>> On Thu, Oct 02, 2008 at 04:50:23PM +0100, peter at dragonstaff.com wrote:
>>> In theory you can set quoting on table and field names:
>>> http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Manual/Cookboo
> k.pod#Setting_quoting_for_the_generated_SQL.
>>> 
>>> In practice, though, that doesn't work 100% on DBs like Oracle
>> 
>> Where are my failing tests for that? :)
>
> Please find attached a gzipped tar demonstrating a few DBIC problems using 
> Oracle.

This thread made sense up to here ;)

In practice, that bit of documentation doesn't apply to deployment in the 
slightest. It should be improved. It's not all that obvious now that DDL 
and DML are produced by two completely separate systems.

> 1. Quoting doesn't work with Oracle when calling 
> DBIx::Class::Schema->deploy()

It might have a better chance if you passed { quote_table_names => 1} as 
the "sqltargs" to deploy().
In practice that doesn't either, cos nobody's come forward and patched the 
SQL::Translator::Producer::Oracle to care about quoting yet.. Patches?

> 2. Oracle SQL generator DBIx::Class::Schema->create_ddl_dir() ignores 
> schema connection quoting parameters

See above.

Not that it wouldn't be nice if deploy/ddl_dir read the sql_a quote 
settings and deduced what the user wants in deploy..

> 3. When populating an Oracle table without an automatic PK, 
> DBIx::Class::Schema->populate() has to be called in list context or no 
> population happens

That's odd.. In void context it uses DBIs insert_bulk, does DBD::Oracle 
not have that one? (considering TIMB does the oracle dbd, I'm surprised)

Jess




More information about the DBIx-Class mailing list