use base qw/DBIx::Class::Storage::DBI/;
use mro 'c3';
+sub deployment_statements {
+ my $self = shift;;
+ my ($schema, $type, $version, $dir, $sqltargs, @rest) = @_;
+
+ $sqltargs ||= {};
+ my $quote_char = $self->schema->storage->{'_sql_maker_opts'}->{'quote_char'};
+ $sqltargs->{quote_table_names} = 0 unless $quote_char;
+ $sqltargs->{quote_field_names} = 0 unless $quote_char;
+
+ my $oracle_version = eval { $self->_get_dbh->get_info(18) };
+
+ $sqltargs->{producer_args}{oracle_version} = $oracle_version;
+
+ $self->next::method($schema, $type, $version, $dir, $sqltargs, @rest);
+}
+
sub _dbh_last_insert_id {
my ($self, $dbh, $source, @columns) = @_;
my @ids = ();
sub _dbh_get_autoinc_seq {
my ($self, $dbh, $source, $col) = @_;
- my $quote_char = $self->schema->storage->{'_sql_maker_opts'}->{'quote_char'};
- my $name_sep = $self->schema->storage->{'_sql_maker_opts'}->{'name_sep'};
-
# look up the correct sequence automatically
my $sql = q{
SELECT trigger_body FROM ALL_TRIGGERS t
$source_name = ${$source->name};
}
+ unless ($self->schema->storage->{'_sql_maker_opts'}->{'quote_char'}) {
+ $source_name = uc($source_name);
+ }
+
# check for fully-qualified name (eg. SCHEMA.TABLENAME)
if ( my ( $schema, $table ) = $source_name =~ /(\w+)\.(\w+)/ ) {
$sql = q{
AND t.status = 'ENABLED'
};
$sth = $dbh->prepare($sql);
- my $table_name = $quote_char ? "$quote_char$table$quote_char" : uc($table);
- die $table_name;
- $sth->execute( uc($schema), $table_name );
+ my $table_name = $self -> sql_maker -> _quote($table);
+ my $schema_name = $self -> sql_maker -> _quote($schema);
+
+ $sth->execute( $schema_name, $table_name );
}
else {
$sth = $dbh->prepare($sql);
sub columns_info_for {
my ($self, $table) = @_;
- $self->next::method(uc($table));
+ $self->next::method($table);
}
=head2 datetime_parser_type