On Mon, 15 Aug 2005 15:12:21 +0200, "H.Merijn Brand" <[EMAIL PROTECTED]>
wrote:

> I'm in the process of trying to have foreign_key_info () implemented on
> DBD::Unify, and replacing DBD::Unify::db::link_info () with the correct
> equivalent

I managed to get the needed data, but I have different hash key/field names

Oracle:

$VAR1 = \{
            'update_rule' => '3',
            'fk_table_name' => 'LEERLING',
            'deferability' => undef,
            'fk_name' => 'L_LEERLING_C_STRAAT_STRAAT',
            'ordinal_position' => '1',
            'fk_column_name' => 'C_STRAAT',
            'fk_table_cat' => undef,
            'unique_or_primary' => 'PRIMARY',
            'uk_name' => 'PK_STRAAT',
            'uk_column_name' => 'C_STRAAT',
            'uk_table_cat' => undef,
            'uk_table_schem' => 'PROLEP',
            'uk_table_name' => 'STRAAT',
            'delete_rule' => '3',
            'fk_table_schem' => 'PROLEP'
          };

Unify:

$VAR1 = \{
            'REFERENCED_TABLE' => 'straat',
            'REFERENCED_OWNER' => 'PROLEP',
            'REFERENCED_COLUMN' => 'c_straat',
            'REFERENCING_COLUMN' => 'c_straat',
            'REFERENCING_OWNER' => 'PROLEP',
            'REFERENCING_COLUMN_ORD' => 0,
            'REFERENCED_COLUMN_ORD' => 0,
            'INDEX_NAME' => 'L_leerling_c_straat_straat',
            'REFERENCING_TABLE' => 'leerling'
          };

is there a way to make it comply to the documented fields in DBI?
FWIW Unify does not support field renaming/aliasing in the select statement,
so the only alternative I can think of is a view, which would alter the
database, and that is not something to aim for.

-- 
H.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using Perl 5.6.2, 5.8.0, 5.8.5, & 5.9.2  on HP-UX 10.20, 11.00 & 11.11,
 AIX 4.3 & 5.2, SuSE 9.2 & 9.3, and Cygwin. http://www.cmve.net/~merijn
Smoking perl: http://www.test-smoke.org,    perl QA: http://qa.perl.org
 reports  to: [EMAIL PROTECTED],                [email protected]

Reply via email to