From: Peter Rabbitson Date: Wed, 8 Sep 2010 08:51:48 +0000 (+0200) Subject: Make _server_info() _determine_driver-bound X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=77c7628cbcac4e82096555c0641b712e6f47f616;p=dbsrgits%2FDBIx-Class-Historic.git Make _server_info() _determine_driver-bound --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index e84f38d..10d3306 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -81,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) { diff --git a/t/746mssql.t b/t/746mssql.t index a4d6001..674046a 100644 --- a/t/746mssql.t +++ b/t/746mssql.t @@ -12,6 +12,11 @@ my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSSQL_ODBC_${_}" } qw/DSN USER PA plan skip_all => 'Set $ENV{DBICTEST_MSSQL_ODBC_DSN}, _USER and _PASS to run this test' unless ($dsn && $user); +{ + my $srv_ver = DBICTest::Schema->connect($dsn, $user, $pass)->storage->_server_info->{dbms_version}; + ok ($srv_ver, 'Got a test server version on fresh schema: ' . ($srv_ver||'???') ); +} + DBICTest::Schema->load_classes('ArtistGUID'); my $schema = DBICTest::Schema->connect($dsn, $user, $pass); diff --git a/t/74mssql.t b/t/74mssql.t index 99eb601..5df9b5e 100644 --- a/t/74mssql.t +++ b/t/74mssql.t @@ -18,6 +18,11 @@ my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSSQL_${_}" } qw/DSN USER PASS/}; plan skip_all => 'Set $ENV{DBICTEST_MSSQL_DSN}, _USER and _PASS to run this test' unless ($dsn); +{ + my $srv_ver = DBICTest::Schema->connect($dsn, $user, $pass)->storage->_server_info->{dbms_version}; + ok ($srv_ver, 'Got a test server version on fresh schema: ' . ($srv_ver||'???') ); +} + my $testdb_supports_placeholders = DBICTest::Schema->connect($dsn, $user, $pass) ->storage ->_supports_typeless_placeholders;