use strict;
use warnings;
-use DBI;
use base qw/DBIx::Class::Storage::DBI/;
+use mro 'c3';
+
+use DBI;
my $ERR_MSG_START = __PACKAGE__ . ' failed: ';
+__PACKAGE__->sql_limit_dialect ('Top');
+__PACKAGE__->sql_quote_char ([qw/[ ]/]);
+
sub insert {
my $self = shift;
my ( $source, $to_insert ) = @_;
- my $bind_attributes = $self->source_bind_attributes( $source );
- my ( undef, $sth ) = $self->_execute( 'insert' => [], $source, $bind_attributes, $to_insert );
+ my ( undef, $sth ) = $self->_execute( 'insert', $source, $to_insert );
#store the identity here since @@IDENTITY is connection global and this prevents
#possibility that another insert to a different table overwrites it for this resultsource
sub bind_attribute_by_data_type {
my $self = shift;
-
+
my ( $data_type ) = @_;
-
+
return { TYPE => $data_type } if $data_type == DBI::SQL_LONGVARCHAR;
-
+
return;
}
=head1 IMPLEMENTATION NOTES
-MS Access supports the @@IDENTITY function for retriving the id of the latest inserted row.
+MS Access supports the @@IDENTITY function for retrieving the id of the latest inserted row.
@@IDENTITY is global to the connection, so to support the possibility of getting the last inserted
id for different tables, the insert() function stores the inserted id on a per table basis.
last_insert_id() then just returns the stored value.