1 package DBIx::Data::Store::Raw;
9 bless({ %{$_[0]} }, ref($proto)||$proto);
14 $class->new({ connect_info => [ @_ ] });
17 sub connect_info { shift->{connect_info} }
19 sub _connector { $_[0]->{_connector} ||= $_[0]->_build__connector }
21 sub _build__connector {
22 DBIx::Connector->new(@{$_[0]->connect_info});
25 sub run_row { shift->_exec_calling('fetchrow_arrayref', @_) }
27 sub run_rowset { shift->_exec_calling('fetchall_arrayref', @_) }
30 shift->_exec_calling(sub {
31 DBIx::Data::Stream::STH->new({ sth => $_[0] })
36 my ($self, $sth_method, $to_call, $sth_args) = @_;
39 ref($to_call) eq 'CODE'
40 ? sub { $self->$to_call($sth_method, $_[0], $sth_args) }
42 $self->_sth_for($_[0], $to_call, $sth_args)->$sth_method
48 $_[0]->_connector->run($_[1]);
52 my ($self, $dbh, $sql, $args) = @_;
53 my $sth = $dbh->prepare_cached($sql, {}, 3);
54 $sth->execute(@$args);