no_index 'DBIx::Class::SQLAHacks';
no_index 'DBIx::Class::SQLAHacks::MySQL';
+no_index 'DBIx::Class::SQLAHacks::MSSQL';
no_index 'DBIx::Class::SQLAHacks::OracleJoins';
no_index 'DBIx::Class::Storage::DBI::AmbiguousGlob';
no_index 'DBIx::Class::Storage::DBIHacks';
# get the order_by only (or make up an order if none exists)
my $order_by = $self->_order_by(
- (delete $order->{order_by}) || \ '(SELECT (1))'
+ (delete $order->{order_by}) || $self->_rno_default_order
);
# whatever is left
return $sql;
}
+# some databases are happy with OVER (), some need OVER (ORDER BY (SELECT (1)) )
+sub _rno_default_order {
+ return undef;
+}
+
# Crappy Top based Limit/Offset support. Legacy from MSSQL.
sub _Top {
my ( $self, $sql, $order, $rows, $offset ) = @_;
--- /dev/null
+package # Hide from PAUSE
+ DBIx::Class::SQLAHacks::MSSQL;
+
+use base qw( DBIx::Class::SQLAHacks );
+use Carp::Clan qw/^DBIx::Class|^SQL::Abstract/;
+
+#
+# MSSQL does not support ... OVER() ... RNO limits
+#
+sub _rno_default_order {
+ return \ '(SELECT(1))';
+}
+
+1;