__PACKAGE__->new_guid('NEWID()');
+sub _sql_server_2005_or_higher {
+ if (exists $_[0]->_server_info->{normalized_dbms_version}) {
+ if ($_[0]->_server_info->{normalized_dbms_version} >= 9) {
+ return 1
+ } else {
+ return 0
+ }
+ }
+ return undef;
+}
+
sub _prep_for_execute {
my $self = shift;
my ($op, $ident, $args) = @_;
sub sql_limit_dialect {
my $self = shift;
- my $supports_rno = 0;
+ my $supports_rno = $self->_sql_server_2005_or_higher;
- if (exists $self->_server_info->{normalized_dbms_version}) {
- $supports_rno = 1 if $self->_server_info->{normalized_dbms_version} >= 9;
- }
- else {
+ unless (defined $supports_rno) {
# User is connecting via DBD::Sybase and has no permission to run
# stored procedures like xp_msver, or version detection failed for some
# other reason.