X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;h=10d3306f55f622225aa468980770a882040c8899;hb=77c7628cbcac4e82096555c0641b712e6f47f616;hp=b47c7cdf06adf1b39c23f2f3340d8121c5c09bee;hpb=6a247f3368100ac0557e33cc534bc8ad0ccb1175;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index b47c7cd..10d3306 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -23,7 +23,7 @@ use namespace::clean; __PACKAGE__->cursor_class('DBIx::Class::Storage::DBI::Cursor'); __PACKAGE__->mk_group_accessors('inherited' => qw/sql_maker_class sql_limit_dialect/); -__PACKAGE__->sql_maker_class('DBIx::Class::SQLAHacks'); +__PACKAGE__->sql_maker_class('DBIx::Class::SQLMaker'); __PACKAGE__->mk_group_accessors('simple' => qw/ _connect_info _dbi_connect_info _dbic_connect_attributes _driver_determined @@ -72,7 +72,6 @@ my @rdbms_specific_methods = qw/ build_datetime_parser datetime_parser_type - insert insert_bulk update @@ -82,6 +81,9 @@ my @rdbms_specific_methods = qw/ get_use_dbms_capability get_dbms_capability + + _server_info + _get_server_version /; for my $meth (@rdbms_specific_methods) { @@ -94,9 +96,15 @@ for my $meth (@rdbms_specific_methods) { *{__PACKAGE__ ."::$meth"} = subname $meth => sub { if (not $_[0]->_driver_determined and not $_[0]->{_in_determine_driver}) { $_[0]->_determine_driver; - goto $_[0]->can($meth); + + # This for some reason crashes and burns on perl 5.8.1 + # IFF the method ends up throwing an exception + #goto $_[0]->can ($meth); + + my $cref = $_[0]->can ($meth); + goto $cref; } - $orig->(@_); + goto $orig; }; } @@ -448,9 +456,9 @@ statement handles via L. =item limit_dialect -Sets the limit dialect. This is useful for JDBC-bridge among others -where the remote SQL-dialect cannot be determined by the name of the -driver alone. See also L. +Sets a specific SQL::Abstract::Limit-style limit dialect, overriding the +default L setting of the storage (if any). For a list +of available limit dialects see L. =item quote_char @@ -2019,7 +2027,7 @@ sub _select_args { } } - # Sanity check the attributes (SQLAHacks does it too, but + # Sanity check the attributes (SQLMaker does it too, but # in case of a software_limit we'll never reach there) if (defined $attrs->{offset}) { $self->throw_exception('A supplied offset attribute must be a non-negative integer') @@ -2132,6 +2140,13 @@ sub select_single { return @row; } +=head2 sql_limit_dialect + +This is an accessor for the default SQL limit dialect used by a particular +storage driver. Can be overriden by supplying an explicit L +to L. For a list of available limit dialects +see L. + =head2 sth =over 4