We need some sort of generic test for this, so we stop dropping stuff
on the floor. The logic is something like "if a public method is overriden
in a DBI:: subclass - we need to mark it for resolution". E.g.
rabbit@Thesaurus:~/devel/dbic/dbgit$ grep deployment_statements -r lib/DBIx/Class/Storage/DBI/
lib/DBIx/Class/Storage/DBI/Pg.pm:sub deployment_statements {
lib/DBIx/Class/Storage/DBI/Replicated.pm: deployment_statements
lib/DBIx/Class/Storage/DBI/mysql.pm:sub deployment_statements {
lib/DBIx/Class/Storage/DBI/SQLite.pm:sub deployment_statements {
lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm:sub deployment_statements {
- Stop Sybase ASE storage from generating invalid SQL in subselects
when a limit without offset is encountered
- Even more robust behavior of GenericSubQuery limit dialect
+ - Make sure deployment_statements() and cursor_class() are called on
+ a resolved storage subclass
0.08210 2013-04-04 15:30 (UTC)
* New Features / Changes
# _determine_supports_X which obv. needs a correct driver as well
my @rdbms_specific_methods = qw/
sqlt_type
+ deployment_statements
+
sql_maker
+ cursor_class
+
build_datetime_parser
datetime_parser_type
txn_begin
+
insert
insert_bulk
update
delete
select
select_single
+
with_deferred_fk_checks
get_use_dbms_capability
use Test::More;
use Test::Exception;
+use Path::Class qw/dir/;
use lib qw(t/lib);
use DBICTest;
unless DBIx::Class::Optional::Dependencies->req_ok_for ('deploy')
}
-use File::Spec;
-use Path::Class qw/dir/;
+# this is how maint/gen_schema did it (connect() to force a storage
+# instance, but no conninfo)
+# there ought to be more code like this in the wild
+like(
+ DBICTest::Schema->connect->deployment_statements('SQLite'),
+ qr/\bCREATE TABLE\b/i
+);
lives_ok( sub {
my $parse_schema = DBICTest->init_schema(no_deploy => 1);