# will get the same rdbms version). _determine_supports_X does not need to
# exist on a driver, as we ->can for it before calling.
-my @capabilities = (qw/insert_returning placeholders typeless_placeholders/);
+my @capabilities = (qw/insert_returning placeholders typeless_placeholders join_optimizer/);
__PACKAGE__->mk_group_accessors( dbms_capability => map { "_supports_$_" } @capabilities );
-__PACKAGE__->mk_group_accessors( use_dbms_capability => map { "_use_$_" } @capabilities );
+__PACKAGE__->mk_group_accessors( use_dbms_capability => map { "_use_$_" } (@capabilities ) );
+# on by default, not strictly a capability (pending rewrite)
+__PACKAGE__->_use_join_optimizer (1);
+sub _determine_supports_join_optimizer { 1 };
# Each of these methods need _determine_driver called before itself
# in order to function reliably. This is a purely DRY optimization
if ( defined( $_ && $_->[1] ) ) {
map { qq{'$_'}; } @{$_}[ 1 .. $#$_ ];
}
- else { q{'NULL'}; }
+ else { q{NULL}; }
} @bind;
}
my ($self, $source) = @_;
my $bind_attributes;
- foreach my $column ($source->columns) {
- my $data_type = $source->column_info($column)->{data_type} || '';
- $bind_attributes->{$column} = $self->bind_attribute_by_data_type($data_type)
- if $data_type;
+ my $colinfo = $source->columns_info;
+
+ for my $col (keys %$colinfo) {
+ if (my $dt = $colinfo->{$col}{data_type} ) {
+ $bind_attributes->{$col} = $self->bind_attribute_by_data_type($dt)
+ }
}
return $bind_attributes;