[Bast-commits] r9049 - in DBIx-Class/0.08/trunk: . lib/DBIx/Class
lib/DBIx/Class/Storage/DBI
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Wed Mar 24 13:30:16 GMT 2010
Author: ribasushi
Date: 2010-03-24 13:30:16 +0000 (Wed, 24 Mar 2010)
New Revision: 9049
Modified:
DBIx-Class/0.08/trunk/Changes
DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Pg.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated.pm
Log:
Cosmetics + changes
Modified: DBIx-Class/0.08/trunk/Changes
===================================================================
--- DBIx-Class/0.08/trunk/Changes 2010-03-24 13:10:33 UTC (rev 9048)
+++ DBIx-Class/0.08/trunk/Changes 2010-03-24 13:30:16 UTC (rev 9049)
@@ -1,6 +1,8 @@
Revision history for DBIx::Class
- Support for Firebird RDBMS with DBD::InterBase and ODBC
+ - Add core support for INSERT RETURNING (for storages that
+ supports this syntax, currently PostgreSQL and Firebird)
- DBIx::Class::InflateColumn::File entered deprecated state
- DBIx::Class::Optional::Dependencies left experimental state
- Add req_group_list to Opt::Deps (RT#55211)
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm 2010-03-24 13:10:33 UTC (rev 9048)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm 2010-03-24 13:30:16 UTC (rev 9049)
@@ -364,7 +364,7 @@
$source,
{ $self->get_columns },
(keys %auto_pri) && $source->storage->can_insert_returning
- ? { returning => [ sort { $auto_pri{$a} cmp $auto_pri{$b} } keys %auto_pri ] }
+ ? { returning => [ sort { $auto_pri{$a} <=> $auto_pri{$b} } keys %auto_pri ] }
: ()
,
);
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Pg.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Pg.pm 2010-03-24 13:10:33 UTC (rev 9048)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Pg.pm 2010-03-24 13:30:16 UTC (rev 9049)
@@ -62,8 +62,7 @@
$self->throw_exception('No sequence to fetch') unless $sequence;
my ($val) = $self->_get_dbh->selectrow_array(
- sprintf "select $function('%s')",
- $sequence
+ sprintf ("select %s('%s')", $function, $sequence)
);
return $val;
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated.pm 2010-03-24 13:10:33 UTC (rev 9048)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated.pm 2010-03-24 13:30:16 UTC (rev 9049)
@@ -306,6 +306,7 @@
backup
is_datatype_numeric
+ can_insert_returning
_count_select
_subq_count_select
_subq_update_delete
More information about the Bast-commits
mailing list