- add hashref form of generate_pod to control which POD is generated
- add hashref form of components to control which components are added to
which classes
- - add common tests for preserve_case option
+ - add common tests for preserve_case option where it must be exclusive
+ (Oracle, Firebird)
- check rel accessors for method conflicts
- add an option to add extra code to Result classes
- redo in-memory schema as an @INC coderef rather than temp files
- add option to filter out views
+ - support columns with names like "ro'd p/n"
- Relationships
- Re-scan relations/tables after initial relation setup to find
- Pg
- introspect on_update/on_delete/is_deferrable
- introspect view SQL
- - preserve_case mode
- domains
- DB2
- data_type tests
my $i = 1; # for unnamed rels, which hopefully have only 1 column ...
while(my $raw_rel = $sth->fetchrow_arrayref) {
my $uk_tbl = $raw_rel->[2];
- my $uk_col = lc $raw_rel->[3];
- my $fk_col = lc $raw_rel->[7];
+ my $uk_col = $self->_lc($raw_rel->[3]);
+ my $fk_col = $self->_lc($raw_rel->[7]);
my $relid = ($raw_rel->[11] || ( "__dcsld__" . $i++ ));
$uk_tbl =~ s/\Q$self->{_quoter}\E//g;
$uk_col =~ s/\Q$self->{_quoter}\E//g;
$fk_col =~ s/\Q$self->{_quoter}\E//g;
$relid =~ s/\Q$self->{_quoter}\E//g;
$rels{$relid}->{tbl} = $uk_tbl;
- $rels{$relid}->{cols}->{$uk_col} = $fk_col;
+ $rels{$relid}->{cols}{$uk_col} = $fk_col;
}
$sth->finish;
},
);
+ # some DBs require mixed case identifiers to be quoted
+ # XXX should get quote_char from the storage of an initialized loader.
+ my ($oqt, $cqt); # open quote, close quote
+ if (ref $self->{quote_char}) {
+ ($oqt, $cqt) = @{ $self->{quote_char} };
+ }
+ else {
+ $oqt = $cqt = $self->{quote_char} || '';
+ }
+
@statements_reltests = (
qq{
CREATE TABLE loader_test3 (
q{ INSERT INTO loader_test4 (id,fkid,dat) VALUES(125,3,'ccc') },
q{ INSERT INTO loader_test4 (id,fkid,dat) VALUES(126,4,'ddd') },
- qq{
+ qq|
CREATE TABLE loader_test5 (
id1 INTEGER NOT NULL,
- iD2 INTEGER NOT NULL,
+ ${oqt}iD2${cqt} INTEGER NOT NULL,
dat VARCHAR(8),
from_id INTEGER $self->{null},
to_id INTEGER $self->{null},
- PRIMARY KEY (id1,iD2),
+ PRIMARY KEY (id1,${oqt}iD2${cqt}),
FOREIGN KEY (from_id) REFERENCES loader_test4 (id),
FOREIGN KEY (to_id) REFERENCES loader_test4 (id)
) $self->{innodb}
- },
+ |,
- q{ INSERT INTO loader_test5 (id1,iD2,dat) VALUES (1,1,'aaa') },
+ qq| INSERT INTO loader_test5 (id1,${oqt}iD2${cqt},dat) VALUES (1,1,'aaa') |,
- qq{
+ qq|
CREATE TABLE loader_test6 (
id INTEGER NOT NULL PRIMARY KEY,
- Id2 INTEGER,
+ ${oqt}Id2${cqt} INTEGER,
loader_test2_id INTEGER,
dat VARCHAR(8),
FOREIGN KEY (loader_test2_id) REFERENCES loader_test2 (id),
- FOREIGN KEY(id,Id2) REFERENCES loader_test5 (id1,iD2)
+ FOREIGN KEY(id,${oqt}Id2${cqt}) REFERENCES loader_test5 (id1,${oqt}iD2${cqt})
) $self->{innodb}
- },
+ |,
- (q{ INSERT INTO loader_test6 (id, Id2,loader_test2_id,dat) } .
+ (qq| INSERT INTO loader_test6 (id, ${oqt}Id2${cqt},loader_test2_id,dat) | .
q{ VALUES (1, 1,1,'aaa') }),
qq{