From: Arthur Axel 'fREW' Schmidt Date: Fri, 19 Jul 2013 17:35:56 +0000 (-0500) Subject: more fine grained versioning X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3e4a74aa6eeb3ad2b9d5979ec7d41adc6efe9be2;p=dbsrgits%2FDBIx-Class.git more fine grained versioning --- diff --git a/lib/DBIx/Class/Storage/DBI/MSSQL.pm b/lib/DBIx/Class/Storage/DBI/MSSQL.pm index 5cc2644..a147091 100644 --- a/lib/DBIx/Class/Storage/DBI/MSSQL.pm +++ b/lib/DBIx/Class/Storage/DBI/MSSQL.pm @@ -27,9 +27,11 @@ __PACKAGE__->datetime_parser_type ( __PACKAGE__->new_guid('NEWID()'); -sub _sql_server_2005_or_higher { +sub __sql_server_x_or_higher { + my ($self, $version) = @_; + if (exists $_[0]->_server_info->{normalized_dbms_version}) { - if ($_[0]->_server_info->{normalized_dbms_version} >= 9) { + if ($_[0]->_server_info->{normalized_dbms_version} >= $version) { return 1 } else { return 0 @@ -38,6 +40,9 @@ sub _sql_server_2005_or_higher { return undef; } +sub _sql_server_2005_or_higher { shift->__sql_server_x_or_higher(9) } +sub _sql_server_2012_or_higher { shift->__sql_server_x_or_higher(11) } + sub _prep_for_execute { my $self = shift; my ($op, $ident, $args) = @_;