1 package DBIx::Class::Storage::DBI::SQL::Statement;
4 use base 'DBIx::Class::Storage::DBI';
8 __PACKAGE__->sql_maker_class('DBIx::Class::SQLMaker::SQLStatement');
9 __PACKAGE__->sql_quote_char('"');
10 __PACKAGE__->sql_limit_dialect('LimitXY_NoBinds');
13 sub _determine_supports_insert_returning { 0 };
15 # Statement caching currently buggy with either S:S or DBD::AnyData (and/or possibly others)
16 # Disable it here and look into fixing it later on
19 $self->next::method(@_);
20 $self->disable_sth_caching(1);
23 # No support for transactions; sorry...
27 # Only certain internal calls are allowed through, and even then, we are merely
28 # ignoring the txn part
29 my $callers = join "\n", map { (caller($_))[3] } (1 .. 4);
30 return $self->_get_dbh
32 DBIx::Class::Storage::DBI::insert_bulk|
33 DBIx::Class::Relationship::CascadeActions::update
36 $self->throw_exception('SQL::Statement-based drivers do not support transactions!');
38 sub svp_begin { shift->throw_exception('SQL::Statement-based drivers do not support savepoints!'); }
40 # Nor is there any last_insert_id support (unless the driver supports it directly)
41 sub _dbh_last_insert_id { shift->throw_exception('SQL::Statement-based drivers do not support AUTOINCREMENT keys! You will need to specify the PKs directly.'); }
43 # leftovers to support txn_begin exceptions
50 DBIx::Class::Storage::DBI::SQL::Statement - Base Class for SQL::Statement- / DBI::DBD::SqlEngine-based
51 DBD support in DBIx::Class
55 This is the base class for DBDs that use L<SQL::Statement> and/or
56 L<DBI::DBD::SqlEngine|DBI::DBD::SqlEngine::Developers>. This class is
62 =item L<DBD::TreeData>
69 =head1 IMPLEMENTATION NOTES
73 These drivers do not support transactions (and in fact, even the SQL syntax for
74 them). Therefore, any attempts to use txn_* or svp_* methods will throw an
77 In a future release, they may be replaced with emulated functionality. (Then
78 again, it would probably be added into L<SQL::Statement> instead.)
80 =head2 SELECT ... FOR UPDATE/SHARE
82 This also is not supported, but it will silently ignore these.
86 See L<DBIx::Class/AUTHOR> and L<DBIx::Class/CONTRIBUTORS>.
90 You may distribute this code under the same terms as Perl itself.