projects
/
dbsrgits/DBIx-Class-Historic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
cf14883
)
Sometimes _prepare_for_execute may not return a set of bind vars - guard against...
Peter Rabbitson [Thu, 14 May 2009 10:12:44 +0000 (10:12 +0000)]
lib/DBIx/Class/Storage/DBI/Cursor.pm
patch
|
blob
|
blame
|
history
lib/DBIx/Class/Storage/DBI/NoBindVars.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/DBIx/Class/Storage/DBI/Cursor.pm
b/lib/DBIx/Class/Storage/DBI/Cursor.pm
index
0fe570f
..
ddad661
100644
(file)
--- a/
lib/DBIx/Class/Storage/DBI/Cursor.pm
+++ b/
lib/DBIx/Class/Storage/DBI/Cursor.pm
@@
-72,7
+72,7
@@
sub as_query {
my @args = $storage->_select_args(@{$self->{args}});
my ($sql, $bind) = $storage->_prep_for_execute(@args[0 .. 2], [@args[4 .. $#args]]);
- return \[ "($sql)", @$bind ];
+ return \[ "($sql)", @{ $bind || [] }];
}
=head2 next
diff --git
a/lib/DBIx/Class/Storage/DBI/NoBindVars.pm
b/lib/DBIx/Class/Storage/DBI/NoBindVars.pm
index
349f658
..
7027ad6
100644
(file)
--- a/
lib/DBIx/Class/Storage/DBI/NoBindVars.pm
+++ b/
lib/DBIx/Class/Storage/DBI/NoBindVars.pm
@@
-61,7
+61,7
@@
sub _prep_for_execute {
}
$new_sql .= join '', @sql_part;
- return ($new_sql);
+ return ($new_sql, []);
}
=head1 AUTHORS